]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: Correct X540 semaphore error
authorMark Rustad <mark.d.rustad@intel.com>
Tue, 22 Jul 2014 06:50:47 +0000 (06:50 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 26 Jul 2014 02:01:28 +0000 (19:01 -0700)
commitd5ab38b5346ab5f27a5f859fe821fe45d44bd373
tree3a26f8196b445237f484262d446f36e39a11cba4
parent9c38d802e9ec453ffff65b50338f02bbcdf9d827
ixgbe: Correct X540 semaphore error

In the function ixgbe_get_swfw_sync_semaphore, an incorrect
check was treating success as failure and vice-versa. This led
to manipulating the IXGBE_SWFW_SYNC register without holding
the software semaphore first, which is an error. In addition,
if getting the REGSMP bit in the IXGBE_SW_FW_SYNC register
timed out, no error code would be returned, making the caller
think that it had successfully acquired the lock. Fix both of
those issues and clean up the function a bit, such as make the
name in the comment match the function.

Signed-off-by: Mark Rustad <mark.d.rustad@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_x540.c