Jason Wang b9d03e352c e1000: link auto-negotiation emulation
Indeed, there's nothing else except for the time spent on the
negotiation needs to be emulated. This is needed for resuming windows
guest from hibernation, as without a proper delay, qemu would send the
packet too early ( guest even does not have a proper intr handler),
which could lead windows guest hang.

This patch first introduces an array of function pointers to make it
possible to emulate per-register write behavior. Then traps the
PHY_CTRL register write and when guest want to restart the link auto
negotiation, we would down the link and mark the auto negotiation in
progress in PHY_STATUS register. After time, a timer with 500 ms (
which is the minimum timeout of auto-negotation specified in 802.3
spec). The link would be up when timer expired.

Test with resuming windows guest plus flood ping and linux ethtool
linkstatus test.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2012-04-25 10:53:48 +03:00
..
2012-04-12 19:01:42 -03:00
2012-04-17 10:23:29 +02:00
2012-04-17 16:57:58 +04:00
2012-04-25 10:53:48 +03:00
2012-04-25 10:53:47 +03:00
2012-03-30 08:14:11 -05:00
2012-03-30 08:14:11 -05:00
2012-04-17 10:23:21 +02:00
2012-03-30 10:31:23 +00:00
2012-04-07 14:00:45 +00:00
2012-04-12 11:14:29 +01:00
2012-04-19 16:26:33 +02:00
2012-04-19 16:26:33 +02:00
2012-04-15 20:02:28 +02:00
2012-04-07 14:00:45 +00:00
2012-04-04 19:20:44 +00:00
2012-04-17 10:23:21 +02:00
2012-04-11 13:19:32 +03:00
2012-04-25 10:53:47 +03:00
2012-04-19 10:31:05 +02:00