diff options
author | Armen Baloyan <armen.baloyan@qlogic.com> | 2013-08-27 01:37:37 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-09-03 10:28:03 -0400 |
commit | 4247934397d7bf4105a9fd5abcf990954cf39d5f (patch) | |
tree | 8ea5dd3a3fc5307fe051b8128e710487c3df9287 /drivers/scsi/qla2xxx | |
parent | 1ae47cf3007f8f8b7c71efad7ed484d9e1f2831d (diff) |
[SCSI] qla2xxx: Notify ISPFX00 firmware when driver is unloaded or system is shut down.
Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Acked-by: Srinivasa Rao <srinivasa.rao@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gbl.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mr.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 7 |
3 files changed, 9 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index d55fefd34afe..4446bf5fe292 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
@@ -594,6 +594,7 @@ extern int qlafx00_start_scsi(srb_t *); | |||
594 | extern int qlafx00_abort_isp(scsi_qla_host_t *); | 594 | extern int qlafx00_abort_isp(scsi_qla_host_t *); |
595 | extern int qlafx00_iospace_config(struct qla_hw_data *); | 595 | extern int qlafx00_iospace_config(struct qla_hw_data *); |
596 | extern int qlafx00_init_firmware(scsi_qla_host_t *, uint16_t); | 596 | extern int qlafx00_init_firmware(scsi_qla_host_t *, uint16_t); |
597 | extern int qlafx00_driver_shutdown(scsi_qla_host_t *, int); | ||
597 | extern int qlafx00_fw_ready(scsi_qla_host_t *); | 598 | extern int qlafx00_fw_ready(scsi_qla_host_t *); |
598 | extern int qlafx00_configure_devices(scsi_qla_host_t *); | 599 | extern int qlafx00_configure_devices(scsi_qla_host_t *); |
599 | extern int qlafx00_reset_initialize(scsi_qla_host_t *); | 600 | extern int qlafx00_reset_initialize(scsi_qla_host_t *); |
diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c index e087a4999965..ab2ae8e26fea 100644 --- a/drivers/scsi/qla2xxx/qla_mr.c +++ b/drivers/scsi/qla2xxx/qla_mr.c | |||
@@ -294,7 +294,7 @@ premature_exit: | |||
294 | * Context: | 294 | * Context: |
295 | * Kernel context. | 295 | * Kernel context. |
296 | */ | 296 | */ |
297 | static int | 297 | int |
298 | qlafx00_driver_shutdown(scsi_qla_host_t *vha, int tmo) | 298 | qlafx00_driver_shutdown(scsi_qla_host_t *vha, int tmo) |
299 | { | 299 | { |
300 | int rval; | 300 | int rval; |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 3f53151734d3..17a86b69cb08 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -3006,6 +3006,10 @@ qla2x00_shutdown(struct pci_dev *pdev) | |||
3006 | vha = pci_get_drvdata(pdev); | 3006 | vha = pci_get_drvdata(pdev); |
3007 | ha = vha->hw; | 3007 | ha = vha->hw; |
3008 | 3008 | ||
3009 | /* Notify ISPFX00 firmware */ | ||
3010 | if (IS_QLAFX00(ha)) | ||
3011 | qlafx00_driver_shutdown(vha, 20); | ||
3012 | |||
3009 | /* Turn-off FCE trace */ | 3013 | /* Turn-off FCE trace */ |
3010 | if (ha->flags.fce_enabled) { | 3014 | if (ha->flags.fce_enabled) { |
3011 | qla2x00_disable_fce_trace(vha, NULL, NULL); | 3015 | qla2x00_disable_fce_trace(vha, NULL, NULL); |
@@ -3053,6 +3057,9 @@ qla2x00_remove_one(struct pci_dev *pdev) | |||
3053 | ha->flags.host_shutting_down = 1; | 3057 | ha->flags.host_shutting_down = 1; |
3054 | 3058 | ||
3055 | set_bit(UNLOADING, &base_vha->dpc_flags); | 3059 | set_bit(UNLOADING, &base_vha->dpc_flags); |
3060 | if (IS_QLAFX00(ha)) | ||
3061 | qlafx00_driver_shutdown(base_vha, 20); | ||
3062 | |||
3056 | mutex_lock(&ha->vport_lock); | 3063 | mutex_lock(&ha->vport_lock); |
3057 | while (ha->cur_vport_count) { | 3064 | while (ha->cur_vport_count) { |
3058 | spin_lock_irqsave(&ha->vport_slock, flags); | 3065 | spin_lock_irqsave(&ha->vport_slock, flags); |