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.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 2dde821025f3..c983f0f07584 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -3573,6 +3573,12 @@ static int ipr_sata_reset(struct ata_port *ap, unsigned int *classes)
3573 3573
3574 ENTER; 3574 ENTER;
3575 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); 3575 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
3576 while(ioa_cfg->in_reset_reload) {
3577 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
3578 wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload);
3579 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
3580 }
3581
3576 res = sata_port->res; 3582 res = sata_port->res;
3577 if (res) { 3583 if (res) {
3578 rc = ipr_device_reset(ioa_cfg, res); 3584 rc = ipr_device_reset(ioa_cfg, res);
@@ -4776,6 +4782,12 @@ static void ipr_ata_post_internal(struct ata_queued_cmd *qc)
4776 unsigned long flags; 4782 unsigned long flags;
4777 4783
4778 spin_lock_irqsave(ioa_cfg->host->host_lock, flags); 4784 spin_lock_irqsave(ioa_cfg->host->host_lock, flags);
4785 while(ioa_cfg->in_reset_reload) {
4786 spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags);
4787 wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload);
4788 spin_lock_irqsave(ioa_cfg->host->host_lock, flags);
4789 }
4790
4779 list_for_each_entry(ipr_cmd, &ioa_cfg->pending_q, queue) { 4791 list_for_each_entry(ipr_cmd, &ioa_cfg->pending_q, queue) {
4780 if (ipr_cmd->qc == qc) { 4792 if (ipr_cmd->qc == qc) {
4781 ipr_device_reset(ioa_cfg, sata_port->res); 4793 ipr_device_reset(ioa_cfg, sata_port->res);