svn commit: r288338 - in stable/10/sys/cam: ata scsi
Alexander Motin
mav at FreeBSD.org
Mon Sep 28 12:30:25 UTC 2015
Author: mav
Date: Mon Sep 28 12:30:22 2015
New Revision: 288338
URL: https://svnweb.freebsd.org/changeset/base/288338
Log:
MFC r287289: 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.
Modified:
stable/10/sys/cam/ata/ata_xpt.c
stable/10/sys/cam/scsi/scsi_cd.c
stable/10/sys/cam/scsi/scsi_ch.c
stable/10/sys/cam/scsi/scsi_da.c
stable/10/sys/cam/scsi/scsi_pt.c
stable/10/sys/cam/scsi/scsi_sa.c
stable/10/sys/cam/scsi/scsi_xpt.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/10/sys/cam/ata/ata_xpt.c Mon Sep 28 12:23:10 2015 (r288337)
+++ stable/10/sys/cam/ata/ata_xpt.c Mon Sep 28 12:30:22 2015 (r288338)
@@ -1090,7 +1090,8 @@ notsata:
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;
/*
Modified: stable/10/sys/cam/scsi/scsi_cd.c
==============================================================================
--- stable/10/sys/cam/scsi/scsi_cd.c Mon Sep 28 12:23:10 2015 (r288337)
+++ stable/10/sys/cam/scsi/scsi_cd.c Mon Sep 28 12:30:22 2015 (r288338)
@@ -392,7 +392,8 @@ cdasync(void *callback_arg, u_int32_t co
if (cgd->protocol != PROTO_SCSI)
break;
-
+ if (SID_QUAL(&cgd->inq_data) != SID_QUAL_LU_CONNECTED)
+ break;
if (SID_TYPE(&cgd->inq_data) != T_CDROM
&& SID_TYPE(&cgd->inq_data) != T_WORM)
break;
Modified: stable/10/sys/cam/scsi/scsi_ch.c
==============================================================================
--- stable/10/sys/cam/scsi/scsi_ch.c Mon Sep 28 12:23:10 2015 (r288337)
+++ stable/10/sys/cam/scsi/scsi_ch.c Mon Sep 28 12:30:22 2015 (r288338)
@@ -337,7 +337,8 @@ chasync(void *callback_arg, u_int32_t co
if (cgd->protocol != PROTO_SCSI)
break;
-
+ if (SID_QUAL(&cgd->inq_data) != SID_QUAL_LU_CONNECTED)
+ break;
if (SID_TYPE(&cgd->inq_data)!= T_CHANGER)
break;
Modified: stable/10/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/10/sys/cam/scsi/scsi_da.c Mon Sep 28 12:23:10 2015 (r288337)
+++ stable/10/sys/cam/scsi/scsi_da.c Mon Sep 28 12:30:22 2015 (r288338)
@@ -1667,7 +1667,8 @@ daasync(void *callback_arg, u_int32_t co
if (cgd->protocol != PROTO_SCSI)
break;
-
+ if (SID_QUAL(&cgd->inq_data) != SID_QUAL_LU_CONNECTED)
+ break;
if (SID_TYPE(&cgd->inq_data) != T_DIRECT
&& SID_TYPE(&cgd->inq_data) != T_RBC
&& SID_TYPE(&cgd->inq_data) != T_OPTICAL)
Modified: stable/10/sys/cam/scsi/scsi_pt.c
==============================================================================
--- stable/10/sys/cam/scsi/scsi_pt.c Mon Sep 28 12:23:10 2015 (r288337)
+++ stable/10/sys/cam/scsi/scsi_pt.c Mon Sep 28 12:30:22 2015 (r288338)
@@ -366,7 +366,8 @@ ptasync(void *callback_arg, u_int32_t co
if (cgd->protocol != PROTO_SCSI)
break;
-
+ if (SID_QUAL(&cgd->inq_data) != SID_QUAL_LU_CONNECTED)
+ break;
if (SID_TYPE(&cgd->inq_data) != T_PROCESSOR)
break;
Modified: stable/10/sys/cam/scsi/scsi_sa.c
==============================================================================
--- stable/10/sys/cam/scsi/scsi_sa.c Mon Sep 28 12:23:10 2015 (r288337)
+++ stable/10/sys/cam/scsi/scsi_sa.c Mon Sep 28 12:30:22 2015 (r288338)
@@ -2254,7 +2254,8 @@ saasync(void *callback_arg, u_int32_t co
if (cgd->protocol != PROTO_SCSI)
break;
-
+ if (SID_QUAL(&cgd->inq_data) != SID_QUAL_LU_CONNECTED)
+ break;
if (SID_TYPE(&cgd->inq_data) != T_SEQUENTIAL)
break;
Modified: stable/10/sys/cam/scsi/scsi_xpt.c
==============================================================================
--- stable/10/sys/cam/scsi/scsi_xpt.c Mon Sep 28 12:23:10 2015 (r288337)
+++ stable/10/sys/cam/scsi/scsi_xpt.c Mon Sep 28 12:30:22 2015 (r288338)
@@ -1126,6 +1126,7 @@ probedone(struct cam_periph *periph, uni
{
probe_softc *softc;
struct cam_path *path;
+ struct scsi_inquiry_data *inq_buf;
u_int32_t priority;
CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("probedone\n"));
@@ -1165,7 +1166,6 @@ out:
case PROBE_FULL_INQUIRY:
{
if (cam_ccb_status(done_ccb) == CAM_REQ_CMP) {
- struct scsi_inquiry_data *inq_buf;
u_int8_t periph_qual;
path->device->flags |= CAM_DEV_INQUIRY_DATA_VALID;
@@ -1174,7 +1174,8 @@ out:
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;
/*
@@ -1350,10 +1351,10 @@ out:
probe_purge_old(path, lp, softc->flags);
lp = NULL;
}
+ inq_buf = &path->device->inq_data;
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;
+ (SID_QUAL(inq_buf) == SID_QUAL_LU_CONNECTED ||
+ SID_QUAL(inq_buf) == SID_QUAL_LU_OFFLINE)) {
if (INQ_DATA_TQ_ENABLED(inq_buf))
PROBE_SET_ACTION(softc, PROBE_MODE_SENSE);
else
More information about the svn-src-stable
mailing list