summaryrefslogtreecommitdiffstats
path: root/sys/dev/ciss/ciss.c
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2013-04-23 18:29:51 +0000
committersbruno <sbruno@FreeBSD.org>2013-04-23 18:29:51 +0000
commitf92131578aafcc20e3a7a43c4df9670966a715ee (patch)
tree4151e288298dd5c024744aceeb25a59547776d0c /sys/dev/ciss/ciss.c
parent826be154b0ff13ecb83709bab53418a7ca0f408b (diff)
downloadFreeBSD-src-f92131578aafcc20e3a7a43c4df9670966a715ee.zip
FreeBSD-src-f92131578aafcc20e3a7a43c4df9670966a715ee.tar.gz
Return a lun count of 1 and a lun id of 0 when CAM attempts a REPORT_LUNS
command on a disk device. This quieseces some noise on the console that recently appeared. Obtained from: Yahoo! Inc. MFC after: 2 weeks
Diffstat (limited to 'sys/dev/ciss/ciss.c')
-rw-r--r--sys/dev/ciss/ciss.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 1444982..10ab10a 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -3202,6 +3202,19 @@ ciss_cam_emulate(struct ciss_softc *sc, struct ccb_scsiio *csio)
}
}
+ /*
+ * A CISS target can only ever have one lun per target. REPORT_LUNS requires
+ * at least one LUN field to be pre created for us, so snag it and fill in
+ * the least significant byte indicating 1 LUN here. Emulate the command
+ * return to shut up warning on console of a CDB error. swb
+ */
+ if (opcode == REPORT_LUNS && csio->dxfer_len > 0) {
+ csio->data_ptr[3] = 8;
+ csio->ccb_h.status |= CAM_REQ_CMP;
+ xpt_done((union ccb *)csio);
+ return(1);
+ }
+
return(0);
}
OpenPOWER on IntegriCloud