]> git.baikalelectronics.ru Git - kernel.git/commit
igb: add delay to allow igb loopback test to succeed on 8086:10c9
authorStefan Assmann <sassmann@kpanic.de>
Tue, 7 Aug 2012 07:45:57 +0000 (00:45 -0700)
committerPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Tue, 7 Aug 2012 07:47:51 +0000 (00:47 -0700)
commitd7a9e39c1b01cc38abbbb0169414bc08d71a774c
treefec590cde6e8e5e5dafa0c6998262d3bbb8a98bb
parent4330de27b2e7247d84d5331c7801d29cf1c494e9
igb: add delay to allow igb loopback test to succeed on 8086:10c9

Some 8086:10c9 NICs have a problem completing the ethtool loopback test.
The result looks like this:

ethtool -t eth1
The test result is FAIL
The test extra info:
Register test  (offline)         0
Eeprom test    (offline)         0
Interrupt test (offline)         0
Loopback test  (offline)         13
Link test   (on/offline)         0

A bisect clearly points to commit fc2cc7dea04efa54e46c1bd9eafae296a44b02f0.
However that seems to only trigger the bug. While adding some printk the
problem disappeared, so this might be a timing issue. After some trial and
error I discovered that adding a small delay just before igb_write_phy_reg()
in igb_integrated_phy_loopback() allows the loopback test to succeed.
I was unable to figure out the root cause so far but I expect it to be
somewhere in the following executing path
igb_integrated_phy_loopback
->igb_write_phy_reg_igp
  ->igb_write_phy_reg_mdic
    ->igb_acquire_phy_82575
      ->igb_acquire_swfw_sync_82575

The problem could only be observed on 8086:10c9 NICs so far and not all
of them show the behaviour. I did not restrict the workaround to this
type of NIC as it should do no harm to other igb NICs.

With the patch below the loopback test succeeded 500 times in a row
using a NIC that would otherwise fail.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
drivers/net/ethernet/intel/igb/igb_ethtool.c