diff options
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index b0c68d24db01..da5bdbdcce52 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -3351,6 +3351,16 @@ static void ipr_worker_thread(struct work_struct *work) | |||
3351 | return; | 3351 | return; |
3352 | } | 3352 | } |
3353 | 3353 | ||
3354 | if (ioa_cfg->scsi_unblock) { | ||
3355 | ioa_cfg->scsi_unblock = 0; | ||
3356 | ioa_cfg->scsi_blocked = 0; | ||
3357 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); | ||
3358 | scsi_unblock_requests(ioa_cfg->host); | ||
3359 | spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); | ||
3360 | if (ioa_cfg->scsi_blocked) | ||
3361 | scsi_block_requests(ioa_cfg->host); | ||
3362 | } | ||
3363 | |||
3354 | if (!ioa_cfg->scan_enabled) { | 3364 | if (!ioa_cfg->scan_enabled) { |
3355 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); | 3365 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); |
3356 | return; | 3366 | return; |
@@ -7211,9 +7221,8 @@ static int ipr_ioa_bringdown_done(struct ipr_cmnd *ipr_cmd) | |||
7211 | ENTER; | 7221 | ENTER; |
7212 | if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) { | 7222 | if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) { |
7213 | ipr_trace; | 7223 | ipr_trace; |
7214 | spin_unlock_irq(ioa_cfg->host->host_lock); | 7224 | ioa_cfg->scsi_unblock = 1; |
7215 | scsi_unblock_requests(ioa_cfg->host); | 7225 | schedule_work(&ioa_cfg->work_q); |
7216 | spin_lock_irq(ioa_cfg->host->host_lock); | ||
7217 | } | 7226 | } |
7218 | 7227 | ||
7219 | ioa_cfg->in_reset_reload = 0; | 7228 | ioa_cfg->in_reset_reload = 0; |
@@ -7287,13 +7296,7 @@ static int ipr_ioa_reset_done(struct ipr_cmnd *ipr_cmd) | |||
7287 | list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q); | 7296 | list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q); |
7288 | wake_up_all(&ioa_cfg->reset_wait_q); | 7297 | wake_up_all(&ioa_cfg->reset_wait_q); |
7289 | 7298 | ||
7290 | spin_unlock(ioa_cfg->host->host_lock); | 7299 | ioa_cfg->scsi_unblock = 1; |
7291 | scsi_unblock_requests(ioa_cfg->host); | ||
7292 | spin_lock(ioa_cfg->host->host_lock); | ||
7293 | |||
7294 | if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].allow_cmds) | ||
7295 | scsi_block_requests(ioa_cfg->host); | ||
7296 | |||
7297 | schedule_work(&ioa_cfg->work_q); | 7300 | schedule_work(&ioa_cfg->work_q); |
7298 | LEAVE; | 7301 | LEAVE; |
7299 | return IPR_RC_JOB_RETURN; | 7302 | return IPR_RC_JOB_RETURN; |
@@ -9249,8 +9252,11 @@ static void _ipr_initiate_ioa_reset(struct ipr_ioa_cfg *ioa_cfg, | |||
9249 | spin_unlock(&ioa_cfg->hrrq[i]._lock); | 9252 | spin_unlock(&ioa_cfg->hrrq[i]._lock); |
9250 | } | 9253 | } |
9251 | wmb(); | 9254 | wmb(); |
9252 | if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) | 9255 | if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) { |
9256 | ioa_cfg->scsi_unblock = 0; | ||
9257 | ioa_cfg->scsi_blocked = 1; | ||
9253 | scsi_block_requests(ioa_cfg->host); | 9258 | scsi_block_requests(ioa_cfg->host); |
9259 | } | ||
9254 | 9260 | ||
9255 | ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg); | 9261 | ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg); |
9256 | ioa_cfg->reset_cmd = ipr_cmd; | 9262 | ioa_cfg->reset_cmd = ipr_cmd; |
@@ -9306,9 +9312,8 @@ static void ipr_initiate_ioa_reset(struct ipr_ioa_cfg *ioa_cfg, | |||
9306 | wake_up_all(&ioa_cfg->reset_wait_q); | 9312 | wake_up_all(&ioa_cfg->reset_wait_q); |
9307 | 9313 | ||
9308 | if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) { | 9314 | if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) { |
9309 | spin_unlock_irq(ioa_cfg->host->host_lock); | 9315 | ioa_cfg->scsi_unblock = 1; |
9310 | scsi_unblock_requests(ioa_cfg->host); | 9316 | schedule_work(&ioa_cfg->work_q); |
9311 | spin_lock_irq(ioa_cfg->host->host_lock); | ||
9312 | } | 9317 | } |
9313 | return; | 9318 | return; |
9314 | } else { | 9319 | } else { |