rocker: bring link up/down on PHY enable/disable
commit5ff1547b756a820bc7b695fe393b25d82467d1fe
authorScott Feldman <sfeldma@gmail.com>
Thu, 11 Jun 2015 01:21:20 +0000 (10 18:21 -0700)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 12 Jun 2015 12:26:27 +0000 (12 13:26 +0100)
tree86aa10e8028eff1032e73bdc3fffff5ee182abcf
parent73da0232098a69d06ce0d49ad8751b7c5e8b9448
rocker: bring link up/down on PHY enable/disable

When the OS driver enables/disables the port, go ahead and set the port's
link status to up/down in response to the change.  This more closely
emulates real hardware when the PHY for the port is brought up/down
and the PHY negotiates carrier (link status) with link partner.  In
the case of qemu, the virtual rocker device can't really do link
negotiation with the link partner as that requires signally over a
physical medium (the wire), so just pretend the negotiation was
successful and bring the link up when the port is enabled.

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1433985681-56138-4-git-send-email-sfeldma@gmail.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/net/rocker/rocker_fp.c