be2net: check for INSUFFICIENT_VLANS error
authorKalesh AP <kalesh.purayil@emulex.com>
Wed, 6 May 2015 09:30:35 +0000 (05:30 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 9 May 2015 20:27:03 +0000 (16:27 -0400)
When the FW runs out of vlan filters it can either return an
INSUFFICIENT_RESOURCES error or an INSUFFICIENT_VLANS error.
The driver currently checks only for the former error value.
This patch adds a check for the latter value too.

Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_cmds.c
drivers/net/ethernet/emulex/benet/be_cmds.h
drivers/net/ethernet/emulex/benet/be_main.c

index e630fe0c1e449750efa6e3f499ff7a1bf25b17bc..095b1dcd55ea607ba86729db8b93b19e25145168 100644 (file)
@@ -140,6 +140,7 @@ static bool be_skip_err_log(u8 opcode, u16 base_status, u16 addl_status)
        if (base_status == MCC_STATUS_NOT_SUPPORTED ||
            base_status == MCC_STATUS_ILLEGAL_REQUEST ||
            addl_status == MCC_ADDL_STATUS_TOO_MANY_INTERFACES ||
+           addl_status == MCC_ADDL_STATUS_INSUFFICIENT_VLANS ||
            (opcode == OPCODE_COMMON_WRITE_FLASHROM &&
            (base_status == MCC_STATUS_ILLEGAL_FIELD ||
             addl_status == MCC_ADDL_STATUS_FLASH_IMAGE_CRC_MISMATCH)))
index cf5f8554487452cc4adceaadea22ee8bb81ef2c1..5eccf877cf6b68492efa5eeee5bc76f0216fe3ca 100644 (file)
@@ -65,7 +65,8 @@ enum mcc_base_status {
 enum mcc_addl_status {
        MCC_ADDL_STATUS_INSUFFICIENT_RESOURCES = 0x16,
        MCC_ADDL_STATUS_FLASH_IMAGE_CRC_MISMATCH = 0x4d,
-       MCC_ADDL_STATUS_TOO_MANY_INTERFACES = 0x4a
+       MCC_ADDL_STATUS_TOO_MANY_INTERFACES = 0x4a,
+       MCC_ADDL_STATUS_INSUFFICIENT_VLANS = 0xab
 };
 
 #define CQE_BASE_STATUS_MASK           0xFFFF
index b0db565c6248304f8c5a83c169dd30743fbf47b2..770779ec4714900545ff003fd2444e21ee61eb67 100644 (file)
@@ -1269,7 +1269,8 @@ static int be_vid_config(struct be_adapter *adapter)
        if (status) {
                dev_err(dev, "Setting HW VLAN filtering failed\n");
                /* Set to VLAN promisc mode as setting VLAN filter failed */
-               if (addl_status(status) ==
+               if (addl_status(status) == MCC_ADDL_STATUS_INSUFFICIENT_VLANS ||
+                   addl_status(status) ==
                                MCC_ADDL_STATUS_INSUFFICIENT_RESOURCES)
                        return be_set_vlan_promisc(adapter);
        } else if (adapter->if_flags & BE_IF_FLAGS_VLAN_PROMISCUOUS) {