From: Chinh Cao <[email protected]>

The shadow RAM size is defined as 16-bit unsigned, which may result in
overflows under certain scenarios. Fix the value to be 32-bit.

Fixes: a240ff50505b ("net/ice/base: add basic structures")
Cc: [email protected]

Signed-off-by: Chinh Cao <[email protected]>
Signed-off-by: Anatoly Burakov <[email protected]>
---
 drivers/net/intel/ice/base/ice_type.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/intel/ice/base/ice_type.h 
b/drivers/net/intel/ice/base/ice_type.h
index ae3b944d6e..5f1f1a2f13 100644
--- a/drivers/net/intel/ice/base/ice_type.h
+++ b/drivers/net/intel/ice/base/ice_type.h
@@ -982,7 +982,7 @@ struct ice_flash_info {
        struct ice_orom_info orom;      /* Option ROM version info */
        struct ice_nvm_info nvm;        /* NVM version information */
        struct ice_bank_info banks;     /* Flash Bank information */
-       u16 sr_words;                   /* Shadow RAM size in words */
+       u32 sr_words;                   /* Shadow RAM size in words */
        u32 flash_size;                 /* Size of available flash in bytes */
        u8 blank_nvm_mode;              /* is NVM empty (no FW present) */
 };
-- 
2.47.3

Reply via email to