Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 2010 12:04:25 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r203864 - stable/8/sys/dev/ciss
Message-ID:  <201002141204.o1EC4PDR064592@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sun Feb 14 12:04:25 2010
New Revision: 203864
URL: http://svn.freebsd.org/changeset/base/203864

Log:
  MFC r203524:
  When hacking INQUIRY result, make sure that it is right INQUIRY and there
  is enough of result to hack.

Modified:
  stable/8/sys/dev/ciss/ciss.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet/   (props changed)

Modified: stable/8/sys/dev/ciss/ciss.c
==============================================================================
--- stable/8/sys/dev/ciss/ciss.c	Sun Feb 14 12:03:04 2010	(r203863)
+++ stable/8/sys/dev/ciss/ciss.c	Sun Feb 14 12:04:25 2010	(r203864)
@@ -3322,10 +3322,15 @@ ciss_cam_complete_fixup(struct ciss_soft
 {
     struct scsi_inquiry_data	*inq;
     struct ciss_ldrive		*cl;
+    uint8_t			*cdb;
     int				bus, target;
 
-    if (((csio->ccb_h.flags & CAM_CDB_POINTER) ?
-	 *(u_int8_t *)csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes[0]) == INQUIRY) {
+    cdb = (csio->ccb_h.flags & CAM_CDB_POINTER) ?
+	 (uint8_t *)csio->cdb_io.cdb_ptr : csio->cdb_io.cdb_bytes;
+    if (cdb[0] == INQUIRY && 
+	(cdb[1] & SI_EVPD) == 0 &&
+	(csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN &&
+	csio->dxfer_len >= SHORT_INQUIRY_LENGTH) {
 
 	inq = (struct scsi_inquiry_data *)csio->data_ptr;
 	target = csio->ccb_h.target_id;



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