提交 42479343 编写于 作者: A Armen Baloyan 提交者: James Bottomley

[SCSI] qla2xxx: Notify ISPFX00 firmware when driver is unloaded or system is shut down.

Signed-off-by: NArmen Baloyan <armen.baloyan@qlogic.com>
Acked-by: NSrinivasa Rao <srinivasa.rao@qlogic.com>
Signed-off-by: NSaurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 1ae47cf3
......@@ -594,6 +594,7 @@ extern int qlafx00_start_scsi(srb_t *);
extern int qlafx00_abort_isp(scsi_qla_host_t *);
extern int qlafx00_iospace_config(struct qla_hw_data *);
extern int qlafx00_init_firmware(scsi_qla_host_t *, uint16_t);
extern int qlafx00_driver_shutdown(scsi_qla_host_t *, int);
extern int qlafx00_fw_ready(scsi_qla_host_t *);
extern int qlafx00_configure_devices(scsi_qla_host_t *);
extern int qlafx00_reset_initialize(scsi_qla_host_t *);
......
......@@ -294,7 +294,7 @@ qlafx00_mailbox_command(scsi_qla_host_t *vha, struct mbx_cmd_32 *mcp)
* Context:
* Kernel context.
*/
static int
int
qlafx00_driver_shutdown(scsi_qla_host_t *vha, int tmo)
{
int rval;
......
......@@ -3006,6 +3006,10 @@ qla2x00_shutdown(struct pci_dev *pdev)
vha = pci_get_drvdata(pdev);
ha = vha->hw;
/* Notify ISPFX00 firmware */
if (IS_QLAFX00(ha))
qlafx00_driver_shutdown(vha, 20);
/* Turn-off FCE trace */
if (ha->flags.fce_enabled) {
qla2x00_disable_fce_trace(vha, NULL, NULL);
......@@ -3053,6 +3057,9 @@ qla2x00_remove_one(struct pci_dev *pdev)
ha->flags.host_shutting_down = 1;
set_bit(UNLOADING, &base_vha->dpc_flags);
if (IS_QLAFX00(ha))
qlafx00_driver_shutdown(base_vha, 20);
mutex_lock(&ha->vport_lock);
while (ha->cur_vport_count) {
spin_lock_irqsave(&ha->vport_slock, flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册