From c6646787ab13983f630c230e2ae3f96510fedb90 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Sun, 22 Jan 2017 15:32:17 +0000 Subject: [PATCH] Add SCSI descriptors for USB Mass Storage. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- sys/cam/ctl/ctl.c | 3 +++ sys/cam/ctl/ctl.h | 1 + 2 files changed, 4 insertions(+) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index b80a7d878746..74a780eb5572 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -10103,6 +10103,9 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio) } else if (port_type == CTL_PORT_SAS) { /* SAS (no version claimed) */ scsi_ulto2b(0x0BE0, inq_ptr->version3); + } else if (port_type == CTL_PORT_UMASS) { + /* USB Mass Storage Class Bulk-Only Transport, Revision 1.0 */ + scsi_ulto2b(0x1730, inq_ptr->version3); } if (lun == NULL) { diff --git a/sys/cam/ctl/ctl.h b/sys/cam/ctl/ctl.h index d9a4f5a6c18d..3370d15ee6a9 100644 --- a/sys/cam/ctl/ctl.h +++ b/sys/cam/ctl/ctl.h @@ -53,6 +53,7 @@ typedef enum { CTL_PORT_INTERNAL = 0x08, CTL_PORT_ISCSI = 0x10, CTL_PORT_SAS = 0x20, + CTL_PORT_UMASS = 0x40, CTL_PORT_ALL = 0xff, CTL_PORT_ISC = 0x100 // FC port for inter-shelf communication } ctl_port_type;