Attach pass driver to LUNs is OFFLINE state.
Previously such LUNs were silently ignored. But while they indeed unable to process most of SCSI commands, some, like RTPG, they still can. MFC after: 1 month
This commit is contained in:
parent
0835304fea
commit
9202485814
@ -1090,7 +1090,8 @@ notsata:
|
|||||||
|
|
||||||
periph_qual = SID_QUAL(inq_buf);
|
periph_qual = SID_QUAL(inq_buf);
|
||||||
|
|
||||||
if (periph_qual != SID_QUAL_LU_CONNECTED)
|
if (periph_qual != SID_QUAL_LU_CONNECTED &&
|
||||||
|
periph_qual != SID_QUAL_LU_OFFLINE)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -389,7 +389,8 @@ cdasync(void *callback_arg, u_int32_t code,
|
|||||||
|
|
||||||
if (cgd->protocol != PROTO_SCSI)
|
if (cgd->protocol != PROTO_SCSI)
|
||||||
break;
|
break;
|
||||||
|
if (SID_QUAL(&cgd->inq_data) != SID_QUAL_LU_CONNECTED)
|
||||||
|
break;
|
||||||
if (SID_TYPE(&cgd->inq_data) != T_CDROM
|
if (SID_TYPE(&cgd->inq_data) != T_CDROM
|
||||||
&& SID_TYPE(&cgd->inq_data) != T_WORM)
|
&& SID_TYPE(&cgd->inq_data) != T_WORM)
|
||||||
break;
|
break;
|
||||||
|
@ -337,7 +337,8 @@ chasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
|||||||
|
|
||||||
if (cgd->protocol != PROTO_SCSI)
|
if (cgd->protocol != PROTO_SCSI)
|
||||||
break;
|
break;
|
||||||
|
if (SID_QUAL(&cgd->inq_data) != SID_QUAL_LU_CONNECTED)
|
||||||
|
break;
|
||||||
if (SID_TYPE(&cgd->inq_data)!= T_CHANGER)
|
if (SID_TYPE(&cgd->inq_data)!= T_CHANGER)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1663,7 +1663,8 @@ daasync(void *callback_arg, u_int32_t code,
|
|||||||
|
|
||||||
if (cgd->protocol != PROTO_SCSI)
|
if (cgd->protocol != PROTO_SCSI)
|
||||||
break;
|
break;
|
||||||
|
if (SID_QUAL(&cgd->inq_data) != SID_QUAL_LU_CONNECTED)
|
||||||
|
break;
|
||||||
if (SID_TYPE(&cgd->inq_data) != T_DIRECT
|
if (SID_TYPE(&cgd->inq_data) != T_DIRECT
|
||||||
&& SID_TYPE(&cgd->inq_data) != T_RBC
|
&& SID_TYPE(&cgd->inq_data) != T_RBC
|
||||||
&& SID_TYPE(&cgd->inq_data) != T_OPTICAL)
|
&& SID_TYPE(&cgd->inq_data) != T_OPTICAL)
|
||||||
|
@ -366,7 +366,8 @@ ptasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
|
|||||||
|
|
||||||
if (cgd->protocol != PROTO_SCSI)
|
if (cgd->protocol != PROTO_SCSI)
|
||||||
break;
|
break;
|
||||||
|
if (SID_QUAL(&cgd->inq_data) != SID_QUAL_LU_CONNECTED)
|
||||||
|
break;
|
||||||
if (SID_TYPE(&cgd->inq_data) != T_PROCESSOR)
|
if (SID_TYPE(&cgd->inq_data) != T_PROCESSOR)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -2255,7 +2255,8 @@ saasync(void *callback_arg, u_int32_t code,
|
|||||||
|
|
||||||
if (cgd->protocol != PROTO_SCSI)
|
if (cgd->protocol != PROTO_SCSI)
|
||||||
break;
|
break;
|
||||||
|
if (SID_QUAL(&cgd->inq_data) != SID_QUAL_LU_CONNECTED)
|
||||||
|
break;
|
||||||
if (SID_TYPE(&cgd->inq_data) != T_SEQUENTIAL)
|
if (SID_TYPE(&cgd->inq_data) != T_SEQUENTIAL)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1123,6 +1123,7 @@ probedone(struct cam_periph *periph, union ccb *done_ccb)
|
|||||||
{
|
{
|
||||||
probe_softc *softc;
|
probe_softc *softc;
|
||||||
struct cam_path *path;
|
struct cam_path *path;
|
||||||
|
struct scsi_inquiry_data *inq_buf;
|
||||||
u_int32_t priority;
|
u_int32_t priority;
|
||||||
|
|
||||||
CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("probedone\n"));
|
CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("probedone\n"));
|
||||||
@ -1162,7 +1163,6 @@ out:
|
|||||||
case PROBE_FULL_INQUIRY:
|
case PROBE_FULL_INQUIRY:
|
||||||
{
|
{
|
||||||
if (cam_ccb_status(done_ccb) == CAM_REQ_CMP) {
|
if (cam_ccb_status(done_ccb) == CAM_REQ_CMP) {
|
||||||
struct scsi_inquiry_data *inq_buf;
|
|
||||||
u_int8_t periph_qual;
|
u_int8_t periph_qual;
|
||||||
|
|
||||||
path->device->flags |= CAM_DEV_INQUIRY_DATA_VALID;
|
path->device->flags |= CAM_DEV_INQUIRY_DATA_VALID;
|
||||||
@ -1171,7 +1171,8 @@ out:
|
|||||||
|
|
||||||
periph_qual = SID_QUAL(inq_buf);
|
periph_qual = SID_QUAL(inq_buf);
|
||||||
|
|
||||||
if (periph_qual == SID_QUAL_LU_CONNECTED) {
|
if (periph_qual == SID_QUAL_LU_CONNECTED ||
|
||||||
|
periph_qual == SID_QUAL_LU_OFFLINE) {
|
||||||
u_int8_t len;
|
u_int8_t len;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1347,10 +1348,10 @@ out:
|
|||||||
probe_purge_old(path, lp, softc->flags);
|
probe_purge_old(path, lp, softc->flags);
|
||||||
lp = NULL;
|
lp = NULL;
|
||||||
}
|
}
|
||||||
|
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(&path->device->inq_data) == SID_QUAL_LU_CONNECTED) {
|
(SID_QUAL(inq_buf) == SID_QUAL_LU_CONNECTED ||
|
||||||
struct scsi_inquiry_data *inq_buf;
|
SID_QUAL(inq_buf) == SID_QUAL_LU_OFFLINE)) {
|
||||||
inq_buf = &path->device->inq_data;
|
|
||||||
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user