)]}'
{
  "commit": "d4044c2a6b9ba4a00dd653f515a4b0ebfcb7e125",
  "tree": "ae5699cbaefe863f224b27e4bfba0fcb241f5f7d",
  "parents": [
    "2011fe5657f421e919eb6fed826ad2413e375673"
  ],
  "author": {
    "name": "Bjørn Mork",
    "email": "bjorn@mork.no",
    "time": "Wed Aug 17 11:03:14 2011 +0200"
  },
  "committer": {
    "name": "Anthony Liguori",
    "email": "aliguori@us.ibm.com",
    "time": "Mon Aug 22 10:17:51 2011 -0500"
  },
  "message": "e1000: use MII status register for link up/down\n\nSome guests will use the standard MII status register\nto verify link state.  They will not notice link changes\nunless this register is updated.\n\nVerified with Linux 3.0 and Windows XP guests.\n\nWithout this patch, ethtool will report speed and duplex as\nunknown when the link is down, but still report the link as\nup.  This is because the Linux e1000 driver checks the\nmac_reg[STATUS] register link state before it checks speed\nand duplex, but uses the phy_reg[PHY_STATUS] register for\nthe actual link state check.  Fix by updating both registers\non link state changes.\n\nLinux guest before:\n\n (qemu) set_link e1000.0 off\n\n kvm-sid:~# ethtool eth0\n Settings for eth0:\n        Supported ports: [ TP ]\n        Supported link modes:   10baseT/Half 10baseT/Full\n                                100baseT/Half 100baseT/Full\n                                1000baseT/Full\n        Supports auto-negotiation: Yes\n        Advertised link modes:  10baseT/Half 10baseT/Full\n                                100baseT/Half 100baseT/Full\n                                1000baseT/Full\n        Advertised pause frame use: No\n        Advertised auto-negotiation: Yes\n        Speed: Unknown!\n        Duplex: Unknown! (255)\n        Port: Twisted Pair\n        PHYAD: 0\n        Transceiver: internal\n        Auto-negotiation: on\n        MDI-X: Unknown\n        Supports Wake-on: umbg\n        Wake-on: d\n        Current message level: 0x00000007 (7)\n                               drv probe link\n        Link detected: yes\n\n (qemu) set_link e1000.0 on\n\nLinux guest after:\n\n (qemu) set_link e1000.0 off\n [   63.384221] e1000: eth0 NIC Link is Down\n\n kvm-sid:~# ethtool eth0\n Settings for eth0:\n        Supported ports: [ TP ]\n        Supported link modes:   10baseT/Half 10baseT/Full\n                                100baseT/Half 100baseT/Full\n                                1000baseT/Full\n        Supports auto-negotiation: Yes\n        Advertised link modes:  10baseT/Half 10baseT/Full\n                                100baseT/Half 100baseT/Full\n                                1000baseT/Full\n        Advertised pause frame use: No\n        Advertised auto-negotiation: Yes\n        Speed: Unknown!\n        Duplex: Unknown! (255)\n        Port: Twisted Pair\n        PHYAD: 0\n        Transceiver: internal\n        Auto-negotiation: on\n        MDI-X: Unknown\n        Supports Wake-on: umbg\n        Wake-on: d\n        Current message level: 0x00000007 (7)\n                               drv probe link\n        Link detected: no\n\n (qemu) set_link e1000.0 on\n [   84.304582] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX\n\nSigned-off-by: Bjørn Mork \u003cbjorn@mork.no\u003e\nSigned-off-by: Anthony Liguori \u003caliguori@us.ibm.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "29b453f7b122422def5099fd2611f72d7bb9511a",
      "old_mode": 33188,
      "old_path": "hw/e1000.c",
      "new_id": "a6d12c55fbbcb221d33367a25b60db452f7b3d17",
      "new_mode": 33188,
      "new_path": "hw/e1000.c"
    },
    {
      "type": "modify",
      "old_id": "9bd8a4bdfde7fe412d8ede9aac89057cf4021ec1",
      "old_mode": 33188,
      "old_path": "hw/e1000_hw.h",
      "new_id": "2e341ac27e09cc7ed1175712eb744ec005727e02",
      "new_mode": 33188,
      "new_path": "hw/e1000_hw.h"
    }
  ]
}
