diff options
author | Brian King <brking@linux.vnet.ibm.com> | 2009-04-22 09:58:02 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-27 11:32:13 -0400 |
commit | dd406ef8950e76b17d74c5764a1e3d3a87d4a855 (patch) | |
tree | a6e408fba66d0e1832fa1d135da5809fba1b386c /drivers/scsi/ipr.c | |
parent | 6401bdcad536cc00589c38e7e1c140d3acc00087 (diff) |
[SCSI] ipr: Fix sleeping function called with interrupts disabled
The ata_sas_slave_configure was changed such that it now allocates
some memory for a drain buffer for ATAPI devices. Fixup the ipr
driver such that we no longer make this call with interrupts disabled.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 13 |
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; |