[Midnightbsd-cvs] src [9342] trunk/sys/dev/ciss/ciss.c: Return a lun count of 1 and a lun id of 0 when CAM attempts a REPORT_LUNS

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Mar 4 11:12:20 EST 2017


Revision: 9342
          http://svnweb.midnightbsd.org/src/?rev=9342
Author:   laffer1
Date:     2017-03-04 11:12:20 -0500 (Sat, 04 Mar 2017)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/sys/dev/ciss/ciss.c

Modified: trunk/sys/dev/ciss/ciss.c
===================================================================
--- trunk/sys/dev/ciss/ciss.c	2017-03-04 16:11:48 UTC (rev 9341)
+++ trunk/sys/dev/ciss/ciss.c	2017-03-04 16:12:20 UTC (rev 9342)
@@ -3209,6 +3209,19 @@
 	}
     }
 
+    /* 
+     * 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);
 }
 



More information about the Midnightbsd-cvs mailing list