提交 a7fc948f 编写于 作者: A Amit Kumar Salecha 提交者: David S. Miller

qlcnic: mark device state fail

Device state need to be mark as FAILED, if fail to start firmware.
Signed-off-by: NAmit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 20c67bd4
...@@ -635,9 +635,12 @@ qlcnic_start_firmware(struct qlcnic_adapter *adapter) ...@@ -635,9 +635,12 @@ qlcnic_start_firmware(struct qlcnic_adapter *adapter)
adapter->need_fw_reset = 0; adapter->need_fw_reset = 0;
/* fall through and release firmware */ qlcnic_release_firmware(adapter);
return 0;
err_out: err_out:
QLCWR32(adapter, QLCNIC_CRB_DEV_STATE, QLCNIC_DEV_FAILED);
dev_err(&adapter->pdev->dev, "Device state set to failed\n");
qlcnic_release_firmware(adapter); qlcnic_release_firmware(adapter);
return err; return err;
} }
...@@ -1100,8 +1103,10 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1100,8 +1103,10 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto err_out_iounmap; goto err_out_iounmap;
err = qlcnic_start_firmware(adapter); err = qlcnic_start_firmware(adapter);
if (err) if (err) {
dev_err(&pdev->dev, "Loading fw failed.Please Reboot\n");
goto err_out_decr_ref; goto err_out_decr_ref;
}
qlcnic_clear_stats(adapter); qlcnic_clear_stats(adapter);
...@@ -2061,6 +2066,7 @@ qlcnic_can_start_firmware(struct qlcnic_adapter *adapter) ...@@ -2061,6 +2066,7 @@ qlcnic_can_start_firmware(struct qlcnic_adapter *adapter)
break; break;
case QLCNIC_DEV_FAILED: case QLCNIC_DEV_FAILED:
dev_err(&adapter->pdev->dev, "Device in failed state.\n");
qlcnic_api_unlock(adapter); qlcnic_api_unlock(adapter);
return -1; return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册