[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1405678393-11497-15-git-send-email-hch@lst.de>
Date: Fri, 18 Jul 2014 12:13:13 +0200
From: Christoph Hellwig <hch@....de>
To: James Bottomley <James.Bottomley@...senPartnership.com>,
linux-scsi@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>,
Bart Van Assche <bvanassche@...ionio.com>,
Mike Christie <michaelc@...wisc.edu>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Robert Elliott <Elliott@...com>, Webb Scales <webbnh@...com>,
linux-kernel@...r.kernel.org, Hiral Patel <hiralpat@...co.com>,
Suma Ramars <sramars@...co.com>,
Brian Uchino <buchino@...co.com>
Subject: [PATCH 14/14] 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@....de>
Reviewed-by: Hannes Reinecke <hare@...e.de>
Reviewed-by: Webb Scales <webbnh@...com>
Acked-by: Jens Axboe <axboe@...nel.dk>
Tested-by: Bart Van Assche <bvanassche@....org>
Tested-by: Robert Elliott <elliott@...com>
Cc: Hiral Patel <hiralpat@...co.com>
Cc: Suma Ramars <sramars@...co.com>
Cc: Brian Uchino <buchino@...co.com>
---
drivers/scsi/fnic/fnic_scsi.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 3f88f56..961bdf5 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;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists