From: Rasesh Mody Date: Tue, 25 Apr 2017 07:28:44 +0000 (-0700) Subject: net/qede/base: fix macro ecore MFW set field X-Git-Tag: spdx-start~3347 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f6c63e390d612b0697e0fe444bf480fce040989b;p=dpdk.git net/qede/base: fix macro ecore MFW set field Fix ECORE_MFW_SET_FIELD macro Coverity issue: 1423907 Coverity issue: 1423908 Fixes: 0b6bf70d7ee3 ("net/qede/base: support previous driver unload") Signed-off-by: Rasesh Mody --- diff --git a/drivers/net/qede/base/ecore.h b/drivers/net/qede/base/ecore.h index 31470b6007..63cbc3841b 100644 --- a/drivers/net/qede/base/ecore.h +++ b/drivers/net/qede/base/ecore.h @@ -104,7 +104,7 @@ do { \ #define ECORE_MFW_SET_FIELD(name, field, value) \ do { \ - (name) &= ~((field ## _MASK) << (field ## _SHIFT)); \ + (name) &= ~(field ## _MASK); \ (name) |= (((value) << (field ## _SHIFT)) & (field ## _MASK)); \ } while (0) diff --git a/drivers/net/qede/base/mcp_public.h b/drivers/net/qede/base/mcp_public.h index 8d65390c71..fcf98477fa 100644 --- a/drivers/net/qede/base/mcp_public.h +++ b/drivers/net/qede/base/mcp_public.h @@ -1056,16 +1056,16 @@ struct load_req_stc { #define LOAD_REQ_ROLE_MASK 0x000000FF #define LOAD_REQ_ROLE_SHIFT 0 #define LOAD_REQ_LOCK_TO_MASK 0x0000FF00 -#define LOAD_REQ_LOCK_TO_SHIFT 0 /* @DPDK */ +#define LOAD_REQ_LOCK_TO_SHIFT 8 #define LOAD_REQ_LOCK_TO_DEFAULT 0 #define LOAD_REQ_LOCK_TO_NONE 255 #define LOAD_REQ_FORCE_MASK 0x000F0000 -#define LOAD_REQ_FORCE_SHIFT 0 /* @DPDK */ +#define LOAD_REQ_FORCE_SHIFT 16 #define LOAD_REQ_FORCE_NONE 0 #define LOAD_REQ_FORCE_PF 1 #define LOAD_REQ_FORCE_ALL 2 #define LOAD_REQ_FLAGS0_MASK 0x00F00000 -#define LOAD_REQ_FLAGS0_SHIFT 0 /* @DPDK */ +#define LOAD_REQ_FLAGS0_SHIFT 20 #define LOAD_REQ_FLAGS0_AVOID_RESET (0x1 << 0) };