Commit a3440d0d authored by Manish Rangankar's avatar Manish Rangankar Committed by Martin K. Petersen

scsi: qedi: Send driver state to MFW

In case of iSCSI offload BFS environment, MFW requires to mark virtual
link based upon qedi load status.
Signed-off-by: default avatarManish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 6ac17475
...@@ -2273,6 +2273,7 @@ static int qedi_setup_boot_info(struct qedi_ctx *qedi) ...@@ -2273,6 +2273,7 @@ static int qedi_setup_boot_info(struct qedi_ctx *qedi)
static void __qedi_remove(struct pci_dev *pdev, int mode) static void __qedi_remove(struct pci_dev *pdev, int mode)
{ {
struct qedi_ctx *qedi = pci_get_drvdata(pdev); struct qedi_ctx *qedi = pci_get_drvdata(pdev);
int rval;
if (qedi->tmf_thread) { if (qedi->tmf_thread) {
flush_workqueue(qedi->tmf_thread); flush_workqueue(qedi->tmf_thread);
...@@ -2302,6 +2303,10 @@ static void __qedi_remove(struct pci_dev *pdev, int mode) ...@@ -2302,6 +2303,10 @@ static void __qedi_remove(struct pci_dev *pdev, int mode)
if (mode == QEDI_MODE_NORMAL) if (mode == QEDI_MODE_NORMAL)
qedi_free_iscsi_pf_param(qedi); qedi_free_iscsi_pf_param(qedi);
rval = qedi_ops->common->update_drv_state(qedi->cdev, false);
if (rval)
QEDI_ERR(&qedi->dbg_ctx, "Failed to send drv state to MFW\n");
if (!test_bit(QEDI_IN_OFFLINE, &qedi->flags)) { if (!test_bit(QEDI_IN_OFFLINE, &qedi->flags)) {
qedi_ops->common->slowpath_stop(qedi->cdev); qedi_ops->common->slowpath_stop(qedi->cdev);
qedi_ops->common->remove(qedi->cdev); qedi_ops->common->remove(qedi->cdev);
...@@ -2576,6 +2581,12 @@ static int __qedi_probe(struct pci_dev *pdev, int mode) ...@@ -2576,6 +2581,12 @@ static int __qedi_probe(struct pci_dev *pdev, int mode)
if (qedi_setup_boot_info(qedi)) if (qedi_setup_boot_info(qedi))
QEDI_ERR(&qedi->dbg_ctx, QEDI_ERR(&qedi->dbg_ctx,
"No iSCSI boot target configured\n"); "No iSCSI boot target configured\n");
rc = qedi_ops->common->update_drv_state(qedi->cdev, true);
if (rc)
QEDI_ERR(&qedi->dbg_ctx,
"Failed to send drv state to MFW\n");
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment