diff options
Diffstat (limited to 'drivers/scsi/fnic/fnic_scsi.c')
-rw-r--r-- | drivers/scsi/fnic/fnic_scsi.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c index ea28b5ca4c73..961bdf5d31cd 100644 --- a/drivers/scsi/fnic/fnic_scsi.c +++ b/drivers/scsi/fnic/fnic_scsi.c | |||
@@ -1753,7 +1753,7 @@ int fnic_abort_cmd(struct scsi_cmnd *sc) | |||
1753 | tag = sc->request->tag; | 1753 | tag = sc->request->tag; |
1754 | FNIC_SCSI_DBG(KERN_DEBUG, | 1754 | FNIC_SCSI_DBG(KERN_DEBUG, |
1755 | fnic->lport->host, | 1755 | fnic->lport->host, |
1756 | "Abort Cmd called FCID 0x%x, LUN 0x%x TAG %x flags %x\n", | 1756 | "Abort Cmd called FCID 0x%x, LUN 0x%llx TAG %x flags %x\n", |
1757 | rport->port_id, sc->device->lun, tag, CMD_FLAGS(sc)); | 1757 | rport->port_id, sc->device->lun, tag, CMD_FLAGS(sc)); |
1758 | 1758 | ||
1759 | CMD_FLAGS(sc) = FNIC_NO_FLAGS; | 1759 | CMD_FLAGS(sc) = FNIC_NO_FLAGS; |
@@ -2207,7 +2207,7 @@ int fnic_device_reset(struct scsi_cmnd *sc) | |||
2207 | 2207 | ||
2208 | rport = starget_to_rport(scsi_target(sc->device)); | 2208 | rport = starget_to_rport(scsi_target(sc->device)); |
2209 | FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, | 2209 | FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, |
2210 | "Device reset called FCID 0x%x, LUN 0x%x sc 0x%p\n", | 2210 | "Device reset called FCID 0x%x, LUN 0x%llx sc 0x%p\n", |
2211 | rport->port_id, sc->device->lun, sc); | 2211 | rport->port_id, sc->device->lun, sc); |
2212 | 2212 | ||
2213 | if (lp->state != LPORT_ST_READY || !(lp->link_up)) | 2213 | if (lp->state != LPORT_ST_READY || !(lp->link_up)) |
@@ -2224,6 +2224,22 @@ int fnic_device_reset(struct scsi_cmnd *sc) | |||
2224 | 2224 | ||
2225 | tag = sc->request->tag; | 2225 | tag = sc->request->tag; |
2226 | if (unlikely(tag < 0)) { | 2226 | 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 | |||
2227 | tag = fnic_scsi_host_start_tag(fnic, sc); | 2243 | tag = fnic_scsi_host_start_tag(fnic, sc); |
2228 | if (unlikely(tag == SCSI_NO_TAG)) | 2244 | if (unlikely(tag == SCSI_NO_TAG)) |
2229 | goto fnic_device_reset_end; | 2245 | goto fnic_device_reset_end; |