Changeset View
Changeset View
Standalone View
Standalone View
head/sys/cam/scsi/scsi_xpt.c
Show First 20 Lines • Show All 1,379 Lines • ▼ Show 20 Lines | if (cam_ccb_status(done_ccb) != CAM_REQ_CMP) { | ||||
* retest luns that appear to have been dropped, | * retest luns that appear to have been dropped, | ||||
* or just nuke them. We'll opt for the latter. | * or just nuke them. We'll opt for the latter. | ||||
* This function will also install the new list | * This function will also install the new list | ||||
* in the target structure. | * in the target structure. | ||||
*/ | */ | ||||
probe_purge_old(path, lp, softc->flags); | probe_purge_old(path, lp, softc->flags); | ||||
lp = NULL; | lp = NULL; | ||||
} | } | ||||
/* The processing above should either exit via a `goto | |||||
* out` or leave the `lp` variable `NULL` and (if | |||||
* applicable) `free()` the storage to which it had | |||||
* pointed. Assert here that is the case. | |||||
*/ | |||||
KASSERT(lp == NULL, ("%s: lp is not NULL", __func__)); | |||||
inq_buf = &path->device->inq_data; | inq_buf = &path->device->inq_data; | ||||
if (path->device->flags & CAM_DEV_INQUIRY_DATA_VALID && | if (path->device->flags & CAM_DEV_INQUIRY_DATA_VALID && | ||||
(SID_QUAL(inq_buf) == SID_QUAL_LU_CONNECTED || | (SID_QUAL(inq_buf) == SID_QUAL_LU_CONNECTED || | ||||
SID_QUAL(inq_buf) == SID_QUAL_LU_OFFLINE)) { | SID_QUAL(inq_buf) == SID_QUAL_LU_OFFLINE)) { | ||||
if (INQ_DATA_TQ_ENABLED(inq_buf)) | if (INQ_DATA_TQ_ENABLED(inq_buf)) | ||||
PROBE_SET_ACTION(softc, PROBE_MODE_SENSE); | PROBE_SET_ACTION(softc, PROBE_MODE_SENSE); | ||||
else | else | ||||
PROBE_SET_ACTION(softc, | PROBE_SET_ACTION(softc, | ||||
PROBE_SUPPORTED_VPD_LIST); | PROBE_SUPPORTED_VPD_LIST); | ||||
xpt_release_ccb(done_ccb); | xpt_release_ccb(done_ccb); | ||||
xpt_schedule(periph, priority); | xpt_schedule(periph, priority); | ||||
goto out; | goto out; | ||||
} | |||||
if (lp) { | |||||
free(lp, M_CAMXPT); | |||||
} | } | ||||
PROBE_SET_ACTION(softc, PROBE_INVALID); | PROBE_SET_ACTION(softc, PROBE_INVALID); | ||||
xpt_release_ccb(done_ccb); | xpt_release_ccb(done_ccb); | ||||
break; | break; | ||||
} | } | ||||
case PROBE_MODE_SENSE: | case PROBE_MODE_SENSE: | ||||
{ | { | ||||
struct ccb_scsiio *csio; | struct ccb_scsiio *csio; | ||||
▲ Show 20 Lines • Show All 1,823 Lines • Show Last 20 Lines |