Skip to content

Commit 4d63716

Browse files
author
Christoph Hellwig
committed
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>
1 parent d285203 commit 4d63716

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎drivers/scsi/fnic/fnic_scsi.c‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2224,6 +2224,22 @@ int fnic_device_reset(struct scsi_cmnd *sc)
22242224

22252225
tag = sc->request->tag;
22262226
if (unlikely(tag < 0)) {
2227+
/*
2228+
* XXX(hch): current the midlayer fakes up a struct
2229+
* request for the explicit reset ioctls, and those
2230+
* don't have a tag allocated to them. The below
2231+
* code pokes into midlayer structures to paper over
2232+
* this design issue, but that won't work for blk-mq.
2233+
*
2234+
* Either someone who can actually test the hardware
2235+
* will have to come up with a similar hack for the
2236+
* blk-mq case, or we'll have to bite the bullet and
2237+
* fix the way the EH ioctls work for real, but until
2238+
* that happens we fail these explicit requests here.
2239+
*/
2240+
if (shost_use_blk_mq(sc->device->host))
2241+
goto fnic_device_reset_end;
2242+
22272243
tag = fnic_scsi_host_start_tag(fnic, sc);
22282244
if (unlikely(tag == SCSI_NO_TAG))
22292245
goto fnic_device_reset_end;

0 commit comments

Comments
 (0)