diff options
Diffstat (limited to 'drivers/scsi/libsas/sas_scsi_host.c')
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 5 |
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 | } |