svn commit: r223448 - head/sys/cam/scsi
Will Andrews
will at FreeBSD.org
Wed Jun 22 22:55:52 UTC 2011
Author: will
Date: Wed Jun 22 22:55:51 2011
New Revision: 223448
URL: http://svn.freebsd.org/changeset/base/223448
Log:
Return CAM_REQ_INVALID if the SCSI XPT receives an unsupported operation
via the XPT_DEV_ADVINFO CCB.
Reviewed by: ken
Modified:
head/sys/cam/scsi/scsi_xpt.c
Modified: head/sys/cam/scsi/scsi_xpt.c
==============================================================================
--- head/sys/cam/scsi/scsi_xpt.c Wed Jun 22 22:55:51 2011 (r223447)
+++ head/sys/cam/scsi/scsi_xpt.c Wed Jun 22 22:55:51 2011 (r223448)
@@ -2440,12 +2440,13 @@ scsi_dev_advinfo(union ccb *start_ccb)
struct ccb_dev_advinfo *cdai;
off_t amt;
+ start_ccb->ccb_h.status = CAM_REQ_INVALID;
device = start_ccb->ccb_h.path->device;
cdai = &start_ccb->cdai;
switch(cdai->buftype) {
case CDAI_TYPE_SCSI_DEVID:
if (cdai->flags & CDAI_FLAG_STORE)
- break;
+ return;
cdai->provsiz = device->device_id_len;
if (device->device_id_len == 0)
break;
@@ -2456,7 +2457,7 @@ scsi_dev_advinfo(union ccb *start_ccb)
break;
case CDAI_TYPE_SERIAL_NUM:
if (cdai->flags & CDAI_FLAG_STORE)
- break;
+ return;
cdai->provsiz = device->serial_num_len;
if (device->serial_num_len == 0)
break;
@@ -2490,7 +2491,7 @@ scsi_dev_advinfo(union ccb *start_ccb)
}
break;
default:
- break;
+ return;
}
start_ccb->ccb_h.status = CAM_REQ_CMP;
More information about the svn-src-all
mailing list