]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: fix race when setting advertised speed
authorEmil Tantilov <emil.s.tantilov@intel.com>
Tue, 28 Oct 2014 05:50:03 +0000 (05:50 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 30 Oct 2014 12:12:07 +0000 (05:12 -0700)
commit7885fc41966027fa6c83832d0c84c064cf5ef7d9
treee18762fba9a392f3127eaadc7a8200b2e5fdbeec
parent0ffc4ac2b6745b10953c77949de0018fe2c4370e
ixgbe: fix race when setting advertised speed

Following commands:

modprobe ixgbe
ifconfig ethX up
ethtool -s ethX advertise 0x020

can lead to "setup link failed with code -14" error due to the setup_link
call racing with the SFP detection routine in the watchdog.

This patch resolves this issue by protecting the setup_link call with check
for __IXGBE_IN_SFP_INIT.

Reported-by: Scott Harrison <scoharr2@cisco.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c