diff options
| author | Jason Wang <jasowang@redhat.com> | 2012-03-22 18:02:24 +0800 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2012-04-25 10:53:48 +0300 |
| commit | b9d03e352cb6b31a66545763f6a1e20c9abf0c2c (patch) | |
| tree | c5928aa240eab6232edf6eaab46b9088fa65cbcf /scripts/qapi-commands.py | |
| parent | f9c1cdf4928e6c036a6373e683d1774129a10311 (diff) | |
| download | focaccia-qemu-b9d03e352cb6b31a66545763f6a1e20c9abf0c2c.tar.gz focaccia-qemu-b9d03e352cb6b31a66545763f6a1e20c9abf0c2c.zip | |
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>
Diffstat (limited to 'scripts/qapi-commands.py')
0 files changed, 0 insertions, 0 deletions