diff options
-rw-r--r-- | drivers/scsi/qedi/qedi_main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index cf274a79e77a..091ec1207bea 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c | |||
@@ -2273,6 +2273,7 @@ kset_free: | |||
2273 | static void __qedi_remove(struct pci_dev *pdev, int mode) | 2273 | static void __qedi_remove(struct pci_dev *pdev, int mode) |
2274 | { | 2274 | { |
2275 | struct qedi_ctx *qedi = pci_get_drvdata(pdev); | 2275 | struct qedi_ctx *qedi = pci_get_drvdata(pdev); |
2276 | int rval; | ||
2276 | 2277 | ||
2277 | if (qedi->tmf_thread) { | 2278 | if (qedi->tmf_thread) { |
2278 | flush_workqueue(qedi->tmf_thread); | 2279 | flush_workqueue(qedi->tmf_thread); |
@@ -2302,6 +2303,10 @@ static void __qedi_remove(struct pci_dev *pdev, int mode) | |||
2302 | if (mode == QEDI_MODE_NORMAL) | 2303 | if (mode == QEDI_MODE_NORMAL) |
2303 | qedi_free_iscsi_pf_param(qedi); | 2304 | qedi_free_iscsi_pf_param(qedi); |
2304 | 2305 | ||
2306 | rval = qedi_ops->common->update_drv_state(qedi->cdev, false); | ||
2307 | if (rval) | ||
2308 | QEDI_ERR(&qedi->dbg_ctx, "Failed to send drv state to MFW\n"); | ||
2309 | |||
2305 | if (!test_bit(QEDI_IN_OFFLINE, &qedi->flags)) { | 2310 | if (!test_bit(QEDI_IN_OFFLINE, &qedi->flags)) { |
2306 | qedi_ops->common->slowpath_stop(qedi->cdev); | 2311 | qedi_ops->common->slowpath_stop(qedi->cdev); |
2307 | qedi_ops->common->remove(qedi->cdev); | 2312 | qedi_ops->common->remove(qedi->cdev); |
@@ -2576,6 +2581,12 @@ static int __qedi_probe(struct pci_dev *pdev, int mode) | |||
2576 | if (qedi_setup_boot_info(qedi)) | 2581 | if (qedi_setup_boot_info(qedi)) |
2577 | QEDI_ERR(&qedi->dbg_ctx, | 2582 | QEDI_ERR(&qedi->dbg_ctx, |
2578 | "No iSCSI boot target configured\n"); | 2583 | "No iSCSI boot target configured\n"); |
2584 | |||
2585 | rc = qedi_ops->common->update_drv_state(qedi->cdev, true); | ||
2586 | if (rc) | ||
2587 | QEDI_ERR(&qedi->dbg_ctx, | ||
2588 | "Failed to send drv state to MFW\n"); | ||
2589 | |||
2579 | } | 2590 | } |
2580 | 2591 | ||
2581 | return 0; | 2592 | return 0; |