#20 Update MII status when link goes down

open
Tushar Dave
kernel (1)
e1000
5
2013-12-03
2009-12-14
Jean Delvare
No

Version 7.6.15.5 of the e1000 driver does not read the MII registers during the MII ioctl call. Instead, a copy of the registers (stored in adapter->phy_regs) is used.

However, this copy is only updated when the periodically called e1000_watchdog_task() function notices the link going up. When the link goes down, old values of the registers remain in adapter->phy_regs and still indicate the link is up.

This patch makes e1000_watchdog_task() also update the registers when the link goes down. Perhaps the registers should be read regularly to ensure all of them represent the true state of the hardware, but at least for the link status in BMSR, this patch works.

As far as I can see, this problem is still present in the latest version of the e1000 driver (8.0.16).

Discussion

  • Tushar is the current owner of this driver and should submit this patch or one like it upstream.

     
    • labels: --> kernel
    • assigned_to: Tushar Dave