Skip to content

Commit

Permalink
hinic: bump up the timeout of UPDATE_FW cmd
Browse files Browse the repository at this point in the history
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 <luobin9@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Luo bin authored and kuba-moo committed Sep 5, 2020
1 parent 4e4269e commit 0c97ee5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@

#define SET_FUNC_PORT_MGMT_TIMEOUT 25000

#define UPDATE_FW_MGMT_TIMEOUT 20000

#define mgmt_to_pfhwdev(pf_mgmt) \
container_of(pf_mgmt, struct hinic_pfhwdev, pf_to_mgmt)

Expand Down Expand Up @@ -372,6 +374,8 @@ int hinic_msg_to_mgmt(struct hinic_pf_to_mgmt *pf_to_mgmt,
} else {
if (cmd == HINIC_PORT_CMD_SET_FUNC_STATE)
timeout = SET_FUNC_PORT_MGMT_TIMEOUT;
else if (cmd == HINIC_PORT_CMD_UPDATE_FW)
timeout = UPDATE_FW_MGMT_TIMEOUT;

return msg_to_mgmt_sync(pf_to_mgmt, mod, cmd, buf_in, in_size,
buf_out, out_size, MGMT_DIRECT_SEND,
Expand Down

0 comments on commit 0c97ee5

Please sign in to comment.