diff options
author | Christoph Hellwig <hch@lst.de> | 2014-06-12 14:53:23 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-25 17:16:34 -0400 |
commit | 4d63716898b5390900a802d889b279ade85f3dac (patch) | |
tree | 40a7056c45c3db4f50c8f61825c16f12ebc4bcfe /drivers/scsi | |
parent | d285203cf647d7c97db3a1c33794315c9008593f (diff) | |
download | linux-4d63716898b5390900a802d889b279ade85f3dac.tar.gz linux-4d63716898b5390900a802d889b279ade85f3dac.tar.bz2 linux-4d63716898b5390900a802d889b279ade85f3dac.zip |
fnic: reject device resets without assigned tags for the blk-mq case
Current the midlayer fakes up a struct request for the explicit reset
ioctls, and those don't have a tag allocated to them. The fnic driver pokes
into midlayer structures to paper over this design issue, but that won't
work for the blk-mq case.
Either someone who can actually test the hardware will have to come up with
a similar hack for the blk-mq case, or we'll have to bite the bullet and fix
the way the EH ioctls work for real, but until that happens we fail these
explicit requests here.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Webb Scales <webbnh@hp.com>
Acked-by: Jens Axboe <axboe@kernel.dk>
Tested-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Robert Elliott <elliott@hp.com>
Cc: Hiral Patel <hiralpat@cisco.com>
Cc: Suma Ramars <sramars@cisco.com>
Cc: Brian Uchino <buchino@cisco.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/fnic/fnic_scsi.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c index 3f88f56582a2..961bdf5d31cd 100644 --- a/drivers/scsi/fnic/fnic_scsi.c +++ b/drivers/scsi/fnic/fnic_scsi.c @@ -2224,6 +2224,22 @@ int fnic_device_reset(struct scsi_cmnd *sc) tag = sc->request->tag; if (unlikely(tag < 0)) { + /* + * XXX(hch): current the midlayer fakes up a struct + * request for the explicit reset ioctls, and those + * don't have a tag allocated to them. The below + * code pokes into midlayer structures to paper over + * this design issue, but that won't work for blk-mq. + * + * Either someone who can actually test the hardware + * will have to come up with a similar hack for the + * blk-mq case, or we'll have to bite the bullet and + * fix the way the EH ioctls work for real, but until + * that happens we fail these explicit requests here. + */ + if (shost_use_blk_mq(sc->device->host)) + goto fnic_device_reset_end; + tag = fnic_scsi_host_start_tag(fnic, sc); if (unlikely(tag == SCSI_NO_TAG)) goto fnic_device_reset_end; |