Merge branch 'qlcnic-net'
Shahed Shaikh says: ==================== qlcnic: Bug fixes This patch series contains following fixes - * Fix memory leak caused because of issuing mailbox command which can not wait for its completion. * Reset firmware API lock which might be in inconsistent state. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
00d0cd38fd
|
@ -2374,6 +2374,14 @@ void qlcnic_set_drv_version(struct qlcnic_adapter *adapter)
|
|||
qlcnic_fw_cmd_set_drv_version(adapter, fw_cmd);
|
||||
}
|
||||
|
||||
/* Reset firmware API lock */
|
||||
static void qlcnic_reset_api_lock(struct qlcnic_adapter *adapter)
|
||||
{
|
||||
qlcnic_api_lock(adapter);
|
||||
qlcnic_api_unlock(adapter);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
{
|
||||
|
@ -2476,6 +2484,7 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
if (qlcnic_82xx_check(adapter)) {
|
||||
qlcnic_check_vf(adapter, ent);
|
||||
adapter->portnum = adapter->ahw->pci_func;
|
||||
qlcnic_reset_api_lock(adapter);
|
||||
err = qlcnic_start_firmware(adapter);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "Loading fw failed.Please Reboot\n"
|
||||
|
|
|
@ -1370,7 +1370,7 @@ static int qlcnic_sriov_issue_cmd(struct qlcnic_adapter *adapter,
|
|||
|
||||
rsp = qlcnic_sriov_alloc_bc_trans(&trans);
|
||||
if (rsp)
|
||||
return rsp;
|
||||
goto free_cmd;
|
||||
|
||||
rsp = qlcnic_sriov_prepare_bc_hdr(trans, cmd, seq, QLC_BC_COMMAND);
|
||||
if (rsp)
|
||||
|
@ -1425,6 +1425,13 @@ err_out:
|
|||
|
||||
cleanup_transaction:
|
||||
qlcnic_sriov_cleanup_transaction(trans);
|
||||
|
||||
free_cmd:
|
||||
if (cmd->type == QLC_83XX_MBX_CMD_NO_WAIT) {
|
||||
qlcnic_free_mbx_args(cmd);
|
||||
kfree(cmd);
|
||||
}
|
||||
|
||||
return rsp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue