mirror of https://gitee.com/openkylin/linux.git
Merge branch 'hinic-BugFixes'
Luo bin says: ==================== hinic: BugFixes The bugs fixed in this patchset have been present since the following commits: patch #1: Fixes:00e57a6d4a
("net-next/hinic: Add Tx operation") patch #2: Fixes:5e126e7c4e
("hinic: add firmware update support") ==================== Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
02146a93ba
|
@ -47,8 +47,12 @@
|
||||||
|
|
||||||
#define MGMT_MSG_TIMEOUT 5000
|
#define MGMT_MSG_TIMEOUT 5000
|
||||||
|
|
||||||
|
#define SET_FUNC_PORT_MBOX_TIMEOUT 30000
|
||||||
|
|
||||||
#define SET_FUNC_PORT_MGMT_TIMEOUT 25000
|
#define SET_FUNC_PORT_MGMT_TIMEOUT 25000
|
||||||
|
|
||||||
|
#define UPDATE_FW_MGMT_TIMEOUT 20000
|
||||||
|
|
||||||
#define mgmt_to_pfhwdev(pf_mgmt) \
|
#define mgmt_to_pfhwdev(pf_mgmt) \
|
||||||
container_of(pf_mgmt, struct hinic_pfhwdev, pf_to_mgmt)
|
container_of(pf_mgmt, struct hinic_pfhwdev, pf_to_mgmt)
|
||||||
|
|
||||||
|
@ -361,17 +365,23 @@ int hinic_msg_to_mgmt(struct hinic_pf_to_mgmt *pf_to_mgmt,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (HINIC_IS_VF(hwif)) {
|
||||||
|
if (cmd == HINIC_PORT_CMD_SET_FUNC_STATE)
|
||||||
|
timeout = SET_FUNC_PORT_MBOX_TIMEOUT;
|
||||||
|
|
||||||
|
return hinic_mbox_to_pf(pf_to_mgmt->hwdev, mod, cmd, buf_in,
|
||||||
|
in_size, buf_out, out_size, timeout);
|
||||||
|
} else {
|
||||||
if (cmd == HINIC_PORT_CMD_SET_FUNC_STATE)
|
if (cmd == HINIC_PORT_CMD_SET_FUNC_STATE)
|
||||||
timeout = SET_FUNC_PORT_MGMT_TIMEOUT;
|
timeout = SET_FUNC_PORT_MGMT_TIMEOUT;
|
||||||
|
else if (cmd == HINIC_PORT_CMD_UPDATE_FW)
|
||||||
|
timeout = UPDATE_FW_MGMT_TIMEOUT;
|
||||||
|
|
||||||
if (HINIC_IS_VF(hwif))
|
|
||||||
return hinic_mbox_to_pf(pf_to_mgmt->hwdev, mod, cmd, buf_in,
|
|
||||||
in_size, buf_out, out_size, 0);
|
|
||||||
else
|
|
||||||
return msg_to_mgmt_sync(pf_to_mgmt, mod, cmd, buf_in, in_size,
|
return msg_to_mgmt_sync(pf_to_mgmt, mod, cmd, buf_in, in_size,
|
||||||
buf_out, out_size, MGMT_DIRECT_SEND,
|
buf_out, out_size, MGMT_DIRECT_SEND,
|
||||||
MSG_NOT_RESP, timeout);
|
MSG_NOT_RESP, timeout);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void recv_mgmt_msg_work_handler(struct work_struct *work)
|
static void recv_mgmt_msg_work_handler(struct work_struct *work)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue