Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 May 2013 15:47:51 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r250367 - stable/9/sys/dev/ciss
Message-ID:  <201305081547.r48Flpf4070387@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Wed May  8 15:47:51 2013
New Revision: 250367
URL: http://svnweb.freebsd.org/changeset/base/250367

Log:
  MFC r249815
  
  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:
  stable/9/sys/dev/ciss/ciss.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/ciss/ciss.c
==============================================================================
--- stable/9/sys/dev/ciss/ciss.c	Wed May  8 15:45:52 2013	(r250366)
+++ stable/9/sys/dev/ciss/ciss.c	Wed May  8 15:47:51 2013	(r250367)
@@ -3208,6 +3208,19 @@ ciss_cam_emulate(struct ciss_softc *sc, 
 	}
     }
 
+    /* 
+     * 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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305081547.r48Flpf4070387>