]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fm10k: correctly handle LPORT_MAP error
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 1 Apr 2016 23:17:33 +0000 (16:17 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 26 Feb 2017 06:04:05 +0000 (22:04 -0800)
commit6754800d66f325482cdf7e5f32db9e020eabcad5
treebadc038ded7dd8cce0ec304daf650917a2b28b2d
parent02143dc835c5ceaa345822de01885fc8842ef9d5
fm10k: correctly handle LPORT_MAP error

Currently, any error responses from the switch manager after an
LPORT_MAP request are silently ignored. At most the mailbox message will
be reported as an error. This can result in unexpected behavior when the
switch manager has configured a port with zero bandwidth. Add support
for reading the fm10k_swapi_error structure from LPORT_MAP responses.

If the message contains the necessary TLV and has a non-zero error code,
report link down, clear the dglort_map, and delay the next
get_host_state call by a reasonable delay. Also log an error message
indicating that the LPORT_MAP request failed.

The delay ensures preventing an interrupt storm on the switch manager,
and reduces the number of mailbox messages we send in this scenario
drastically.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 25394529
(cherry picked from commit a7a7783adabc3cc7599f7dbf97fcc3b0d44087b7)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/intel/fm10k/fm10k.h
drivers/net/ethernet/intel/fm10k/fm10k_pci.c
drivers/net/ethernet/intel/fm10k/fm10k_pf.c
drivers/net/ethernet/intel/fm10k/fm10k_pf.h