diff options
author | mav <mav@FreeBSD.org> | 2014-11-02 17:25:03 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-11-02 17:25:03 +0000 |
commit | 5c2f41bdb07fd1fccc292183d24d9a7cd1c22347 (patch) | |
tree | a088fc313e2f959d373dcf0a5dd433b089a5ad53 /sys/cam | |
parent | 3f2b3e757a205c086811984d821be472cc16ba57 (diff) | |
download | FreeBSD-src-5c2f41bdb07fd1fccc292183d24d9a7cd1c22347.zip FreeBSD-src-5c2f41bdb07fd1fccc292183d24d9a7cd1c22347.tar.gz |
MFC r272406:
Make disconnected LUN 0 don't remain in half-configured state if there are
no LUNs on SPC-3 target after we tried REPORT LUNS.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_xpt.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index fb3109b..63f396f 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -1197,12 +1197,6 @@ out: SID_ANSI_REV(inq_buf) > SCSI_REV_SPC2 && (SCSI_QUIRK(path->device)->quirks & CAM_QUIRK_NORPTLUNS) == 0) { - if (path->device->flags & - CAM_DEV_UNCONFIGURED) { - path->device->flags &= - ~CAM_DEV_UNCONFIGURED; - xpt_acquire_device(path->device); - } PROBE_SET_ACTION(softc, PROBE_REPORT_LUNS); periph->path->target->rpl_size = 16; xpt_release_ccb(done_ccb); @@ -1313,14 +1307,6 @@ out: tlun, 8); CAM_DEBUG(path, CAM_DEBUG_PROBE, ("lun 0 in position %u\n", idx)); - } else { - /* - * There is no lun 0 in our list. Destroy - * the validity of the inquiry data so we - * bail here and now. - */ - path->device->flags &= - ~CAM_DEV_INQUIRY_DATA_VALID; } } /* @@ -1333,7 +1319,8 @@ out: probe_purge_old(path, lp, softc->flags); lp = NULL; } - if (path->device->flags & CAM_DEV_INQUIRY_DATA_VALID) { + if (path->device->flags & CAM_DEV_INQUIRY_DATA_VALID && + SID_QUAL(&path->device->inq_data) == SID_QUAL_LU_CONNECTED) { struct scsi_inquiry_data *inq_buf; inq_buf = &path->device->inq_data; if (INQ_DATA_TQ_ENABLED(inq_buf)) @@ -1348,6 +1335,8 @@ out: if (lp) { free(lp, M_CAMXPT); } + PROBE_SET_ACTION(softc, PROBE_INVALID); + xpt_release_ccb(done_ccb); break; } case PROBE_MODE_SENSE: |