@@ -3351,6 +3351,16 @@ static void ipr_worker_thread(struct work_struct *work)
3351
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
3364
if (!ioa_cfg -> scan_enabled ) {
3355
3365
spin_unlock_irqrestore (ioa_cfg -> host -> host_lock , lock_flags );
3356
3366
return ;
@@ -7211,9 +7221,8 @@ static int ipr_ioa_bringdown_done(struct ipr_cmnd *ipr_cmd)
7211
7221
ENTER ;
7212
7222
if (!ioa_cfg -> hrrq [IPR_INIT_HRRQ ].removing_ioa ) {
7213
7223
ipr_trace ;
7214
- spin_unlock_irq (ioa_cfg -> host -> host_lock );
7215
- scsi_unblock_requests (ioa_cfg -> host );
7216
- spin_lock_irq (ioa_cfg -> host -> host_lock );
7224
+ ioa_cfg -> scsi_unblock = 1 ;
7225
+ schedule_work (& ioa_cfg -> work_q );
7217
7226
}
7218
7227
7219
7228
ioa_cfg -> in_reset_reload = 0 ;
@@ -7287,13 +7296,7 @@ static int ipr_ioa_reset_done(struct ipr_cmnd *ipr_cmd)
7287
7296
list_add_tail (& ipr_cmd -> queue , & ipr_cmd -> hrrq -> hrrq_free_q );
7288
7297
wake_up_all (& ioa_cfg -> reset_wait_q );
7289
7298
7290
- spin_unlock (ioa_cfg -> host -> host_lock );
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
-
7299
+ ioa_cfg -> scsi_unblock = 1 ;
7297
7300
schedule_work (& ioa_cfg -> work_q );
7298
7301
LEAVE ;
7299
7302
return IPR_RC_JOB_RETURN ;
@@ -9249,8 +9252,11 @@ static void _ipr_initiate_ioa_reset(struct ipr_ioa_cfg *ioa_cfg,
9249
9252
spin_unlock (& ioa_cfg -> hrrq [i ]._lock );
9250
9253
}
9251
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
9258
scsi_block_requests (ioa_cfg -> host );
9259
+ }
9254
9260
9255
9261
ipr_cmd = ipr_get_free_ipr_cmnd (ioa_cfg );
9256
9262
ioa_cfg -> reset_cmd = ipr_cmd ;
@@ -9306,9 +9312,8 @@ static void ipr_initiate_ioa_reset(struct ipr_ioa_cfg *ioa_cfg,
9306
9312
wake_up_all (& ioa_cfg -> reset_wait_q );
9307
9313
9308
9314
if (!ioa_cfg -> hrrq [IPR_INIT_HRRQ ].removing_ioa ) {
9309
- spin_unlock_irq (ioa_cfg -> host -> host_lock );
9310
- scsi_unblock_requests (ioa_cfg -> host );
9311
- spin_lock_irq (ioa_cfg -> host -> host_lock );
9315
+ ioa_cfg -> scsi_unblock = 1 ;
9316
+ schedule_work (& ioa_cfg -> work_q );
9312
9317
}
9313
9318
return ;
9314
9319
} else {
0 commit comments