qed: Log incorrectly installed board
authorTomer Tayar <Tomer.Tayar@cavium.com>
Tue, 23 May 2017 06:41:21 +0000 (09:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 May 2017 19:17:19 +0000 (15:17 -0400)
In case nvram layout of board is incorrect, board may exhibit peculiar
oddities. Log such a rare event.

Signed-off-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_dev.c
drivers/net/ethernet/qlogic/qed/qed_hsi.h

index 9dd28baba5a138047230f948225eed5b6bbbee68..b01df24000754d6337e9fb7939ce91e73762b084 100644 (file)
@@ -1698,6 +1698,11 @@ int qed_hw_init(struct qed_dev *cdev, struct qed_hw_init_params *p_params)
                        return mfw_rc;
                }
 
+               /* Check if there is a DID mismatch between nvm-cfg/efuse */
+               if (param & FW_MB_PARAM_LOAD_DONE_DID_EFUSE_ERROR)
+                       DP_NOTICE(p_hwfn,
+                                 "warning: device configuration is not supported on this board type. The device may not function as expected.\n");
+
                /* send DCBX attention request command */
                DP_VERBOSE(p_hwfn,
                           QED_MSG_DCB,
index eedf79a026a2ffe38c33db3963ea2c94d4cac7ad..4755d0b33b9085e78a6aa2c46d9b74570801c1b0 100644 (file)
@@ -11655,6 +11655,8 @@ struct public_drv_mb {
 #define FW_MB_PARAM_GET_PF_RDMA_IWARP          0x2
 #define FW_MB_PARAM_GET_PF_RDMA_BOTH           0x3
 
+#define FW_MB_PARAM_LOAD_DONE_DID_EFUSE_ERROR  (1 << 0)
+
        u32 drv_pulse_mb;
 #define DRV_PULSE_SEQ_MASK                     0x00007fff
 #define DRV_PULSE_SYSTEM_TIME_MASK             0xffff0000