aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_scsi_host.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2007-01-11 17:15:40 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-13 17:20:46 -0500
commit980fa2f9d64b9be96107c89e165953ace311af54 (patch)
tree595956edd5b62cfa618e51bee5deeefd1710310a /drivers/scsi/libsas/sas_scsi_host.c
parente7571c152dea576f8c80ca240befc93d4f16551d (diff)
[SCSI] libsas: phy port lock needs irq spinlocks
Convert the phy port locks to use irq spinlocks. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_scsi_host.c')
-rw-r--r--drivers/scsi/libsas/sas_scsi_host.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index f867455dd339..8a1b98e3943c 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -589,8 +589,9 @@ struct domain_device *sas_find_dev_by_rphy(struct sas_rphy *rphy)
589 struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost); 589 struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost);
590 struct domain_device *found_dev = NULL; 590 struct domain_device *found_dev = NULL;
591 int i; 591 int i;
592 unsigned long flags;
592 593
593 spin_lock(&ha->phy_port_lock); 594 spin_lock_irqsave(&ha->phy_port_lock, flags);
594 for (i = 0; i < ha->num_phys; i++) { 595 for (i = 0; i < ha->num_phys; i++) {
595 struct asd_sas_port *port = ha->sas_port[i]; 596 struct asd_sas_port *port = ha->sas_port[i];
596 struct domain_device *dev; 597 struct domain_device *dev;
@@ -606,7 +607,7 @@ struct domain_device *sas_find_dev_by_rphy(struct sas_rphy *rphy)
606 spin_unlock(&port->dev_list_lock); 607 spin_unlock(&port->dev_list_lock);
607 } 608 }
608 found: 609 found:
609 spin_unlock(&ha->phy_port_lock); 610 spin_unlock_irqrestore(&ha->phy_port_lock, flags);
610 611
611 return found_dev; 612 return found_dev;
612} 613}