mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 08:02:07 +00:00
qlcnic: Set driver version before registering netdev
o Earlier, set_drv_version was getting called after register_netdev. This was resulting in a race between set_drv_version and FLR called from open(). Moving set_drv_version before register_netdev avoids the race. o Log response code in error message on CDRP failure. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a0eaf75c03
commit
bf63014f10
@ -136,7 +136,7 @@ int qlcnic_82xx_issue_cmd(struct qlcnic_adapter *adapter,
|
|||||||
rsp = qlcnic_poll_rsp(adapter);
|
rsp = qlcnic_poll_rsp(adapter);
|
||||||
|
|
||||||
if (rsp == QLCNIC_CDRP_RSP_TIMEOUT) {
|
if (rsp == QLCNIC_CDRP_RSP_TIMEOUT) {
|
||||||
dev_err(&pdev->dev, "card response timeout.\n");
|
dev_err(&pdev->dev, "command timeout, response = 0x%x\n", rsp);
|
||||||
cmd->rsp.arg[0] = QLCNIC_RCODE_TIMEOUT;
|
cmd->rsp.arg[0] = QLCNIC_RCODE_TIMEOUT;
|
||||||
} else if (rsp == QLCNIC_CDRP_RSP_FAIL) {
|
} else if (rsp == QLCNIC_CDRP_RSP_FAIL) {
|
||||||
cmd->rsp.arg[0] = QLCRD32(adapter, QLCNIC_CDRP_ARG(1), &err);
|
cmd->rsp.arg[0] = QLCRD32(adapter, QLCNIC_CDRP_ARG(1), &err);
|
||||||
|
@ -2623,13 +2623,13 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
if (err)
|
if (err)
|
||||||
goto err_out_disable_mbx_intr;
|
goto err_out_disable_mbx_intr;
|
||||||
|
|
||||||
|
if (adapter->portnum == 0)
|
||||||
|
qlcnic_set_drv_version(adapter);
|
||||||
|
|
||||||
err = qlcnic_setup_netdev(adapter, netdev, pci_using_dac);
|
err = qlcnic_setup_netdev(adapter, netdev, pci_using_dac);
|
||||||
if (err)
|
if (err)
|
||||||
goto err_out_disable_mbx_intr;
|
goto err_out_disable_mbx_intr;
|
||||||
|
|
||||||
if (adapter->portnum == 0)
|
|
||||||
qlcnic_set_drv_version(adapter);
|
|
||||||
|
|
||||||
pci_set_drvdata(pdev, adapter);
|
pci_set_drvdata(pdev, adapter);
|
||||||
|
|
||||||
if (qlcnic_82xx_check(adapter))
|
if (qlcnic_82xx_check(adapter))
|
||||||
|
Loading…
Reference in New Issue
Block a user