diff options
author | Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> | 2011-01-29 00:17:56 +0100 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-02-12 17:52:40 +0100 |
commit | 044d78e1acb6614f5d79040e490f1fd9bfa45487 (patch) | |
tree | a2d07033aa5731fd850b6c416ebb4fceeb35f010 /drivers/scsi/qla2xxx/qla_attr.c | |
parent | [SCSI] qla2xxx: Fix race that could hang kthread_stop() (diff) | |
download | linux-044d78e1acb6614f5d79040e490f1fd9bfa45487.tar.xz linux-044d78e1acb6614f5d79040e490f1fd9bfa45487.zip |
[SCSI] qla2xxx: Change from irq to irqsave with host_lock
Make the driver safer by using irqsave/irqrestore with host_lock.
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 44578b56ad0a..d3e58d763b43 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -1561,6 +1561,7 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport) { struct Scsi_Host *host = rport_to_shost(rport); fc_port_t *fcport = *(fc_port_t **)rport->dd_data; + unsigned long flags; if (!fcport) return; @@ -1573,10 +1574,10 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport) * Transport has effectively 'deleted' the rport, clear * all local references. */ - spin_lock_irq(host->host_lock); + spin_lock_irqsave(host->host_lock, flags); fcport->rport = fcport->drport = NULL; *((fc_port_t **)rport->dd_data) = NULL; - spin_unlock_irq(host->host_lock); + spin_unlock_irqrestore(host->host_lock, flags); if (test_bit(ABORT_ISP_ACTIVE, &fcport->vha->dpc_flags)) return; |