diff options
| -rw-r--r-- | drivers/scsi/ipr.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 882744852aac..486ffaf5109a 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
| @@ -6263,21 +6263,23 @@ static void ipr_scsi_done(struct ipr_cmnd *ipr_cmd) | |||
| 6263 | struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; | 6263 | struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; |
| 6264 | struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd; | 6264 | struct scsi_cmnd *scsi_cmd = ipr_cmd->scsi_cmd; |
| 6265 | u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc); | 6265 | u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc); |
| 6266 | unsigned long hrrq_flags; | 6266 | unsigned long lock_flags; |
| 6267 | 6267 | ||
| 6268 | scsi_set_resid(scsi_cmd, be32_to_cpu(ipr_cmd->s.ioasa.hdr.residual_data_len)); | 6268 | scsi_set_resid(scsi_cmd, be32_to_cpu(ipr_cmd->s.ioasa.hdr.residual_data_len)); |
| 6269 | 6269 | ||
| 6270 | if (likely(IPR_IOASC_SENSE_KEY(ioasc) == 0)) { | 6270 | if (likely(IPR_IOASC_SENSE_KEY(ioasc) == 0)) { |
| 6271 | scsi_dma_unmap(scsi_cmd); | 6271 | scsi_dma_unmap(scsi_cmd); |
| 6272 | 6272 | ||
| 6273 | spin_lock_irqsave(ipr_cmd->hrrq->lock, hrrq_flags); | 6273 | spin_lock_irqsave(ipr_cmd->hrrq->lock, lock_flags); |
| 6274 | list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q); | 6274 | list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q); |
| 6275 | scsi_cmd->scsi_done(scsi_cmd); | 6275 | scsi_cmd->scsi_done(scsi_cmd); |
| 6276 | spin_unlock_irqrestore(ipr_cmd->hrrq->lock, hrrq_flags); | 6276 | spin_unlock_irqrestore(ipr_cmd->hrrq->lock, lock_flags); |
| 6277 | } else { | 6277 | } else { |
| 6278 | spin_lock_irqsave(ipr_cmd->hrrq->lock, hrrq_flags); | 6278 | spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); |
| 6279 | spin_lock(&ipr_cmd->hrrq->_lock); | ||
| 6279 | ipr_erp_start(ioa_cfg, ipr_cmd); | 6280 | ipr_erp_start(ioa_cfg, ipr_cmd); |
| 6280 | spin_unlock_irqrestore(ipr_cmd->hrrq->lock, hrrq_flags); | 6281 | spin_unlock(&ipr_cmd->hrrq->_lock); |
| 6282 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); | ||
| 6281 | } | 6283 | } |
| 6282 | } | 6284 | } |
| 6283 | 6285 | ||
