diff options
author | Jacob Keller <jacob.e.keller@intel.com> | 2016-04-01 16:17:33 -0700 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2016-04-20 23:06:22 -0700 |
commit | a7a7783adabc3cc7599f7dbf97fcc3b0d44087b7 (patch) | |
tree | 49eb6a052470059213ab44d000a1f8aca4490772 /drivers/net/ethernet/intel/fm10k/fm10k_pf.c | |
parent | 8998763a7b57583ef2e07f68ea6a7d05bcfc1cfa (diff) | |
download | linux-a7a7783adabc3cc7599f7dbf97fcc3b0d44087b7.tar.gz linux-a7a7783adabc3cc7599f7dbf97fcc3b0d44087b7.tar.bz2 linux-a7a7783adabc3cc7599f7dbf97fcc3b0d44087b7.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k/fm10k_pf.c')
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c index c8e8ce5a8327..865f5c2da9d0 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c @@ -1620,6 +1620,8 @@ out: /* This structure defines the attibutes to be parsed below */ const struct fm10k_tlv_attr fm10k_lport_map_msg_attr[] = { + FM10K_TLV_ATTR_LE_STRUCT(FM10K_PF_ATTR_ID_ERR, + sizeof(struct fm10k_swapi_error)), FM10K_TLV_ATTR_U32(FM10K_PF_ATTR_ID_LPORT_MAP), FM10K_TLV_ATTR_LAST }; |