summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roth <mdroth@linux.vnet.ibm.com>2013-01-31 17:43:51 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2013-02-01 10:43:13 -0600
commit70ddd9f66d1d5234b38b4444f209c511e7757ce6 (patch)
tree8614adb51e086f3e367d8567e412c4ba76dc0e83
parent5dea9a694ffa6fdd19ba5ce265c619686c14df1b (diff)
downloadqemu-70ddd9f66d1d5234b38b4444f209c511e7757ce6.tar.gz
Revert "e1000: no need auto-negotiation if link was down"
This reverts commit 84dd2120247a7d25ff1bb337de21c0e76816ad2d. I'm not sure what issue the original commit was meant to fix, or if the logic is actually wrong, but it causes e1000 to stop working after a guest issues a reset. >From what I can tell a guest with an e1000 nic has no way of changing the link status, as far as it's NetClient peer is concerned, except in the auto-negotiation path, so with this patch in place there's no recovery after a reset, since the link goes down and stays that way. Revert this patch now to fix the bigger problem, and handle any lingering issues with a follow-up. Reproduced/tested with qemu-jeos and Ubuntu 12.10. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/e1000.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/hw/e1000.c b/hw/e1000.c
index ee85c53d38..56f50d42fe 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -166,11 +166,6 @@ static void
set_phy_ctrl(E1000State *s, int index, uint16_t val)
{
if ((val & MII_CR_AUTO_NEG_EN) && (val & MII_CR_RESTART_AUTO_NEG)) {
- /* no need auto-negotiation if link was down */
- if (s->nic->nc.link_down) {
- s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE;
- return;
- }
s->nic->nc.link_down = true;
e1000_link_down(s);
s->phy_reg[PHY_STATUS] &= ~MII_SR_AUTONEG_COMPLETE;