From 6da551eeaca3b2205d0f83853c3e3b2ba52321fa Mon Sep 17 00:00:00 2001 From: Rasesh Mody Date: Wed, 29 Mar 2017 13:36:47 -0700 Subject: [PATCH] net/qede/base: add macro for unsupported command Add a macro for unsupported management FW command Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_mcp.c | 6 ++---- drivers/net/qede/base/mcp_public.h | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/qede/base/ecore_mcp.c b/drivers/net/qede/base/ecore_mcp.c index 6c5b5db5c8..15f3ea010c 100644 --- a/drivers/net/qede/base/ecore_mcp.c +++ b/drivers/net/qede/base/ecore_mcp.c @@ -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) { diff --git a/drivers/net/qede/base/mcp_public.h b/drivers/net/qede/base/mcp_public.h index 17971a4a63..8d65390c71 100644 --- a/drivers/net/qede/base/mcp_public.h +++ b/drivers/net/qede/base/mcp_public.h @@ -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 -- 2.20.1