Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jan 2013 07:00:42 +0000 (UTC)
From:      Xin LI <delphij@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: r244920 - stable/9/sys/dev/arcmsr
Message-ID:  <201301010700.r0170gO2005357@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Tue Jan  1 07:00:42 2013
New Revision: 244920
URL: http://svnweb.freebsd.org/changeset/base/244920

Log:
  MFC r244369 (jimharris):
  
  Use CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT to report nonexistent
  LUNs for the virtual processor device.  This removes lots of CAM warnings,
  and follows similar recent changes to tws(4) and twa(4) drivers.
  
  Also fix case where CAM_REQ_CMP was getting OR'd with CAM_DEV_NOT_THERE
  in the nonexistent LUN case, resulting in different CAM status (CAM_UA_TERMIO)
  getting reported to CAM.  This issue existing previously, but was more subtle
  because it changed CAM_SEL_TIMEOUT to CAM_CMD_TIMEOUT.
  
  Sponsored by:		Intel
  Reported and tested by:	Willem Jan Withagen <wjw@digiware.nl>

Modified:
  stable/9/sys/dev/arcmsr/arcmsr.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/arcmsr/arcmsr.c
==============================================================================
--- stable/9/sys/dev/arcmsr/arcmsr.c	Tue Jan  1 03:48:39 2013	(r244919)
+++ stable/9/sys/dev/arcmsr/arcmsr.c	Tue Jan  1 07:00:42 2013	(r244920)
@@ -2432,14 +2432,13 @@ static void arcmsr_bus_reset(struct Adap
 static void arcmsr_handle_virtual_command(struct AdapterControlBlock *acb,
 		union ccb * pccb)
 {
-	pccb->ccb_h.status |= CAM_REQ_CMP;
 	switch (pccb->csio.cdb_io.cdb_bytes[0]) {
 	case INQUIRY: {
 		unsigned char inqdata[36];
 		char *buffer=pccb->csio.data_ptr;
 	
 		if (pccb->ccb_h.target_lun) {
-			pccb->ccb_h.status |= CAM_SEL_TIMEOUT;
+			pccb->ccb_h.status |= CAM_DEV_NOT_THERE;
 			xpt_done(pccb);
 			return;
 		}
@@ -2455,6 +2454,7 @@ static void arcmsr_handle_virtual_comman
 		strncpy(&inqdata[16], "RAID controller ", 16);	/* Product Identification */
 		strncpy(&inqdata[32], "R001", 4); /* Product Revision */
 		memcpy(buffer, inqdata, sizeof(inqdata));
+		pccb->ccb_h.status |= CAM_REQ_CMP;
 		xpt_done(pccb);
 	}
 	break;
@@ -2464,10 +2464,12 @@ static void arcmsr_handle_virtual_comman
 			pccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR;
 			pccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
 		}
+		pccb->ccb_h.status |= CAM_REQ_CMP;
 		xpt_done(pccb);
 	}
 	break;
 	default:
+		pccb->ccb_h.status |= CAM_REQ_CMP;
 		xpt_done(pccb);
 	}
 }



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