]> git.proxmox.com Git - mirror_qemu.git/commit - hw/net/e1000.c
e1000: emulate auto-negotiation during external link status change
authorGabriel L. Somlo <gsomlo@gmail.com>
Thu, 19 Jun 2014 15:55:33 +0000 (11:55 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 23 Jun 2014 14:38:00 +0000 (17:38 +0300)
commit6a2acedb19221ddf5e6fd3fb3590ba636aa21007
tree902c5d5bd3a5e7dec75b4abe3424fc01a6d5bf56
parentf61badf32f1870e80e579f9dac363891a226e976
e1000: emulate auto-negotiation during external link status change

This patch emulates auto-negotiation when the network link status
is modified externally (i.e. via "set_link <id> off/on").

Also, a couple of cleanup items:
  - unset PHY status reg. AUTONEG_COMPLETE during link_down()
  - set PHY status reg. AUTONEG_COMPLETE during autoneg_timer() only
    if we actually brought the link up.
  - group all checks for "can we, and should we autonegotiate?"
    together for more clarity.

Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/e1000.c