aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r--drivers/scsi/ipr.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index c09d77591f92..dd689ded8609 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -3654,6 +3654,7 @@ static int ipr_slave_configure(struct scsi_device *sdev)
3654{ 3654{
3655 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; 3655 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata;
3656 struct ipr_resource_entry *res; 3656 struct ipr_resource_entry *res;
3657 struct ata_port *ap = NULL;
3657 unsigned long lock_flags = 0; 3658 unsigned long lock_flags = 0;
3658 3659
3659 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); 3660 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
@@ -3672,12 +3673,16 @@ static int ipr_slave_configure(struct scsi_device *sdev)
3672 } 3673 }
3673 if (ipr_is_vset_device(res) || ipr_is_scsi_disk(res)) 3674 if (ipr_is_vset_device(res) || ipr_is_scsi_disk(res))
3674 sdev->allow_restart = 1; 3675 sdev->allow_restart = 1;
3675 if (ipr_is_gata(res) && res->sata_port) { 3676 if (ipr_is_gata(res) && res->sata_port)
3677 ap = res->sata_port->ap;
3678 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
3679
3680 if (ap) {
3676 scsi_adjust_queue_depth(sdev, 0, IPR_MAX_CMD_PER_ATA_LUN); 3681 scsi_adjust_queue_depth(sdev, 0, IPR_MAX_CMD_PER_ATA_LUN);
3677 ata_sas_slave_configure(sdev, res->sata_port->ap); 3682 ata_sas_slave_configure(sdev, ap);
3678 } else { 3683 } else
3679 scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun); 3684 scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun);
3680 } 3685 return 0;
3681 } 3686 }
3682 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); 3687 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
3683 return 0; 3688 return 0;