summaryrefslogtreecommitdiffstats
path: root/sys/dev/arcmsr
diff options
context:
space:
mode:
authorjimharris <jimharris@FreeBSD.org>2012-12-18 00:00:07 +0000
committerjimharris <jimharris@FreeBSD.org>2012-12-18 00:00:07 +0000
commit17649eee7d94c9b2e7885ee9119c83cef611a8e4 (patch)
treec8f336c65e91ccf6436830e9795418c2a53f7815 /sys/dev/arcmsr
parent33637e40405789448947f95a2c69892674ca6c1e (diff)
downloadFreeBSD-src-17649eee7d94c9b2e7885ee9119c83cef611a8e4.zip
FreeBSD-src-17649eee7d94c9b2e7885ee9119c83cef611a8e4.tar.gz
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> MFC after: 1 week
Diffstat (limited to 'sys/dev/arcmsr')
-rw-r--r--sys/dev/arcmsr/arcmsr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/arcmsr/arcmsr.c b/sys/dev/arcmsr/arcmsr.c
index af359be..609ff87 100644
--- a/sys/dev/arcmsr/arcmsr.c
+++ b/sys/dev/arcmsr/arcmsr.c
@@ -2432,14 +2432,13 @@ static void arcmsr_bus_reset(struct AdapterControlBlock *acb)
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_command(struct AdapterControlBlock *acb,
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_command(struct AdapterControlBlock *acb,
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);
}
}
OpenPOWER on IntegriCloud