]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
e1000e: fix test for PHY being accessible on 82577/8/9 and I217
authorBruce Allan <bruce.w.allan@intel.com>
Sat, 14 Jul 2012 04:23:58 +0000 (04:23 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 14 Jul 2012 07:45:45 +0000 (00:45 -0700)
commita52359b56c29f55aaadf1dab80a0e1043b982676
tree2bdd0e87270710fb8e200495fef8f04324620848
parentd0efa8f23a644f7cb7d1f8e78dd9a223efa412a3
e1000e: fix test for PHY being accessible on 82577/8/9 and I217

Occasionally, the PHY can be initially inaccessible when the first read of
a PHY register, e.g. PHY_ID1, happens (signified by the returned value
0xFFFF) but subsequent accesses of the PHY work as expected.  Add a retry
counter similar to how it is done in the generic e1000_get_phy_id().

Also, when the PHY is completely inaccessible (i.e. when subsequent reads
of the PHY_IDx registers returns all F's) and the MDIO access mode must be
set to slow before attempting to read the PHY ID again, the functions that
do these latter two actions expect the SW/FW/HW semaphore is not already
set so the semaphore must be released before and re-acquired after calling
them otherwise there is an unnecessarily inordinate amount of delay during
device initialization.

Reported-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000e/ich8lan.c