net/qede/base: add macro for unsupported command
authorRasesh Mody <rasesh.mody@cavium.com>
Wed, 29 Mar 2017 20:36:47 +0000 (13:36 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 4 Apr 2017 17:02:53 +0000 (19:02 +0200)
Add a macro for unsupported management FW command

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
drivers/net/qede/base/ecore_mcp.c
drivers/net/qede/base/mcp_public.h

index 6c5b5db..15f3ea0 100644 (file)
@@ -1424,8 +1424,7 @@ ecore_mcp_mdump_get_config(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
        if (rc != ECORE_SUCCESS)
                return rc;
 
-       /* A zero response implies that the mdump command is not supported */
-       if (!mcp_resp)
+       if (mcp_resp == FW_MSG_CODE_UNSUPPORTED)
                return ECORE_NOTIMPL;
 
        if (mcp_resp != FW_MSG_CODE_OK) {
@@ -2832,8 +2831,7 @@ static enum _ecore_status_t ecore_mcp_resource_cmd(struct ecore_hwfn *p_hwfn,
        if (rc != ECORE_SUCCESS)
                return rc;
 
-       /* A zero response implies that the resource command is not supported */
-       if (!*p_mcp_resp)
+       if (*p_mcp_resp == FW_MSG_CODE_UNSUPPORTED)
                return ECORE_NOTIMPL;
 
        if (*p_mcp_param == RESOURCE_OPCODE_UNKNOWN_CMD) {
index 17971a4..8d65390 100644 (file)
@@ -1489,6 +1489,7 @@ struct public_drv_mb {
 
        u32 fw_mb_header;
 #define FW_MSG_CODE_MASK                        0xffff0000
+#define FW_MSG_CODE_UNSUPPORTED                        0x00000000
 #define FW_MSG_CODE_DRV_LOAD_ENGINE            0x10100000
 #define FW_MSG_CODE_DRV_LOAD_PORT               0x10110000
 #define FW_MSG_CODE_DRV_LOAD_FUNCTION           0x10120000