|
31 | 31 | #include "bnxt_nvm_defs.h" /* NVRAM content constant and structure defs */ |
32 | 32 | #include "bnxt_fw_hdr.h" /* Firmware hdr constant and structure defs */ |
33 | 33 | #include "bnxt_coredump.h" |
34 | | -#define FLASH_NVRAM_TIMEOUT ((HWRM_CMD_TIMEOUT) * 100) |
35 | | -#define FLASH_PACKAGE_TIMEOUT ((HWRM_CMD_TIMEOUT) * 200) |
36 | | -#define INSTALL_PACKAGE_TIMEOUT ((HWRM_CMD_TIMEOUT) * 200) |
37 | 34 |
|
38 | 35 | static u32 bnxt_get_msglevel(struct net_device *dev) |
39 | 36 | { |
@@ -2194,7 +2191,7 @@ static int bnxt_flash_nvram(struct net_device *dev, u16 dir_type, |
2194 | 2191 | req->host_src_addr = cpu_to_le64(dma_handle); |
2195 | 2192 | } |
2196 | 2193 |
|
2197 | | - hwrm_req_timeout(bp, req, FLASH_NVRAM_TIMEOUT); |
| 2194 | + hwrm_req_timeout(bp, req, bp->hwrm_cmd_max_timeout); |
2198 | 2195 | req->dir_type = cpu_to_le16(dir_type); |
2199 | 2196 | req->dir_ordinal = cpu_to_le16(dir_ordinal); |
2200 | 2197 | req->dir_ext = cpu_to_le16(dir_ext); |
@@ -2540,8 +2537,8 @@ int bnxt_flash_package_from_fw_obj(struct net_device *dev, const struct firmware |
2540 | 2537 | return rc; |
2541 | 2538 | } |
2542 | 2539 |
|
2543 | | - hwrm_req_timeout(bp, modify, FLASH_PACKAGE_TIMEOUT); |
2544 | | - hwrm_req_timeout(bp, install, INSTALL_PACKAGE_TIMEOUT); |
| 2540 | + hwrm_req_timeout(bp, modify, bp->hwrm_cmd_max_timeout); |
| 2541 | + hwrm_req_timeout(bp, install, bp->hwrm_cmd_max_timeout); |
2545 | 2542 |
|
2546 | 2543 | hwrm_req_hold(bp, modify); |
2547 | 2544 | modify->host_src_addr = cpu_to_le64(dma_handle); |
|
0 commit comments