]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: fix bug in return from get_link_status and avoid spurious link messages
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Wed, 26 Aug 2015 19:14:19 +0000 (15:14 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 7 Oct 2015 21:23:09 +0000 (14:23 -0700)
commitf947dd0ee7f08621c0e6bbb9d385bff2530134c6
tree7922bf1bc1bcffb8ffc96353f684f295eb2d1b65
parent31f3f9f1c9cc8633e423cd1b96d0c0b6c61890af
i40e: fix bug in return from get_link_status and avoid spurious link messages

Previously, the driver could call this function and have only true/false
returned, but false could mean multiple things like failure to read
or link was down. This change allows the caller to get all return values
in the call chain bubbled back to the source, which keeps information about
failures from being lost.

Also, in some unlikely scenarios, the firmware can become slow to respond
to admin queue (AQ) queries for link state.  Should the AQ time out,
the driver can detect the state and avoid a link change when there
may have been none.

Change-ID: Ib2ac38407b7880750fb891b392fa77457fe6c21c
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_common.c
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_prototype.h