Skip to content

Commit 0c97ee5

Browse files
Luo binkuba-moo
Luo bin
authored andcommitted
hinic: bump up the timeout of UPDATE_FW cmd
Firmware erases the entire flash region which may take several seconds before flashing, so we bump up the timeout to ensure this cmd won't return failure. Fixes: 5e126e7 ("hinic: add firmware update support") Signed-off-by: Luo bin <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 4e4269e commit 0c97ee5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151

5252
#define SET_FUNC_PORT_MGMT_TIMEOUT 25000
5353

54+
#define UPDATE_FW_MGMT_TIMEOUT 20000
55+
5456
#define mgmt_to_pfhwdev(pf_mgmt) \
5557
container_of(pf_mgmt, struct hinic_pfhwdev, pf_to_mgmt)
5658

@@ -372,6 +374,8 @@ int hinic_msg_to_mgmt(struct hinic_pf_to_mgmt *pf_to_mgmt,
372374
} else {
373375
if (cmd == HINIC_PORT_CMD_SET_FUNC_STATE)
374376
timeout = SET_FUNC_PORT_MGMT_TIMEOUT;
377+
else if (cmd == HINIC_PORT_CMD_UPDATE_FW)
378+
timeout = UPDATE_FW_MGMT_TIMEOUT;
375379

376380
return msg_to_mgmt_sync(pf_to_mgmt, mod, cmd, buf_in, in_size,
377381
buf_out, out_size, MGMT_DIRECT_SEND,

0 commit comments

Comments
 (0)