diff options
author | Bart Van Assche <bvanassche@acm.org> | 2012-04-19 10:42:54 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-11-30 20:40:30 -0500 |
commit | f3718231203a165dbfd5c5bd0d9a6db522bb73e3 (patch) | |
tree | c735b0a665da9a523a0e3de577440b758efbce8c /drivers/infiniband | |
parent | 09be70a238005cc33f2a52b0aeae52f117e81582 (diff) |
IB/srp: Keep processing commands during host removal
Some SCSI upper layer drivers, e.g. sd, issue SCSI commands from
inside scsi_remove_host() (see the sd_shutdown() call in sd_remove()).
Make sure that these commands have a chance to reach the SCSI device.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: David Dillow <dillowda@ornl.gov>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index a2261995c550..9371d582d0dc 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c | |||
@@ -1318,13 +1318,6 @@ static int srp_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scmnd) | |||
1318 | unsigned long flags; | 1318 | unsigned long flags; |
1319 | int len; | 1319 | int len; |
1320 | 1320 | ||
1321 | if (target->state == SRP_TARGET_DEAD || | ||
1322 | target->state == SRP_TARGET_REMOVED) { | ||
1323 | scmnd->result = DID_BAD_TARGET << 16; | ||
1324 | scmnd->scsi_done(scmnd); | ||
1325 | return 0; | ||
1326 | } | ||
1327 | |||
1328 | spin_lock_irqsave(&target->lock, flags); | 1321 | spin_lock_irqsave(&target->lock, flags); |
1329 | iu = __srp_get_tx_iu(target, SRP_IU_CMD); | 1322 | iu = __srp_get_tx_iu(target, SRP_IU_CMD); |
1330 | if (!iu) | 1323 | if (!iu) |