diff options
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index a3d9cf675681..f9c01a13abef 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -3068,6 +3068,12 @@ static int ipr_cancel_op(struct scsi_cmnd * scsi_cmd) | |||
3068 | ioa_cfg = (struct ipr_ioa_cfg *)scsi_cmd->device->host->hostdata; | 3068 | ioa_cfg = (struct ipr_ioa_cfg *)scsi_cmd->device->host->hostdata; |
3069 | res = scsi_cmd->device->hostdata; | 3069 | res = scsi_cmd->device->hostdata; |
3070 | 3070 | ||
3071 | /* If we are currently going through reset/reload, return failed. | ||
3072 | * This will force the mid-layer to call ipr_eh_host_reset, | ||
3073 | * which will then go to sleep and wait for the reset to complete | ||
3074 | */ | ||
3075 | if (ioa_cfg->in_reset_reload || ioa_cfg->ioa_is_dead) | ||
3076 | return FAILED; | ||
3071 | if (!res || (!ipr_is_gscsi(res) && !ipr_is_vset_device(res))) | 3077 | if (!res || (!ipr_is_gscsi(res) && !ipr_is_vset_device(res))) |
3072 | return FAILED; | 3078 | return FAILED; |
3073 | 3079 | ||
@@ -3118,23 +3124,17 @@ static int ipr_cancel_op(struct scsi_cmnd * scsi_cmd) | |||
3118 | **/ | 3124 | **/ |
3119 | static int ipr_eh_abort(struct scsi_cmnd * scsi_cmd) | 3125 | static int ipr_eh_abort(struct scsi_cmnd * scsi_cmd) |
3120 | { | 3126 | { |
3121 | struct ipr_ioa_cfg *ioa_cfg; | 3127 | unsigned long flags; |
3128 | int rc; | ||
3122 | 3129 | ||
3123 | ENTER; | 3130 | ENTER; |
3124 | ioa_cfg = (struct ipr_ioa_cfg *) scsi_cmd->device->host->hostdata; | ||
3125 | 3131 | ||
3126 | /* If we are currently going through reset/reload, return failed. This will force the | 3132 | spin_lock_irqsave(scsi_cmd->device->host->host_lock, flags); |
3127 | mid-layer to call ipr_eh_host_reset, which will then go to sleep and wait for the | 3133 | rc = ipr_cancel_op(scsi_cmd); |
3128 | reset to complete */ | 3134 | spin_unlock_irqrestore(scsi_cmd->device->host->host_lock, flags); |
3129 | if (ioa_cfg->in_reset_reload) | ||
3130 | return FAILED; | ||
3131 | if (ioa_cfg->ioa_is_dead) | ||
3132 | return FAILED; | ||
3133 | if (!scsi_cmd->device->hostdata) | ||
3134 | return FAILED; | ||
3135 | 3135 | ||
3136 | LEAVE; | 3136 | LEAVE; |
3137 | return ipr_cancel_op(scsi_cmd); | 3137 | return rc; |
3138 | } | 3138 | } |
3139 | 3139 | ||
3140 | /** | 3140 | /** |