mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
USB: storage: Use USB_ prefix instead of US_ prefix
This commit changes prefix for some of the USB mass storage class related macros (ie. USB_SC_ for subclass and USB_PR_ for class). Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
1992de83e3
commit
8fa7fd74ef
18 changed files with 376 additions and 375 deletions
|
@ -396,7 +396,7 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum);
|
|||
#else
|
||||
|
||||
static const struct usb_device_id ub_usb_ids[] = {
|
||||
{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, US_SC_SCSI, US_PR_BULK) },
|
||||
{ USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, USB_SC_SCSI, USB_PR_BULK) },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ static int slave_alloc (struct scsi_device *sdev)
|
|||
* Let the scanning code know if this target merely sets
|
||||
* Peripheral Device Type to 0x1f to indicate no LUN.
|
||||
*/
|
||||
if (us->subclass == US_SC_UFI)
|
||||
if (us->subclass == USB_SC_UFI)
|
||||
sdev->sdev_target->pdt_1f_for_no_lun = 1;
|
||||
|
||||
return 0;
|
||||
|
@ -176,7 +176,7 @@ static int slave_configure(struct scsi_device *sdev)
|
|||
/* Disk-type devices use MODE SENSE(6) if the protocol
|
||||
* (SubClass) is Transparent SCSI, otherwise they use
|
||||
* MODE SENSE(10). */
|
||||
if (us->subclass != US_SC_SCSI && us->subclass != US_SC_CYP_ATACB)
|
||||
if (us->subclass != USB_SC_SCSI && us->subclass != USB_SC_CYP_ATACB)
|
||||
sdev->use_10_for_ms = 1;
|
||||
|
||||
/* Many disks only accept MODE SENSE transfer lengths of
|
||||
|
@ -245,7 +245,7 @@ static int slave_configure(struct scsi_device *sdev)
|
|||
* capacity will be decremented or is correct. */
|
||||
if (!(us->fflags & (US_FL_FIX_CAPACITY | US_FL_CAPACITY_OK |
|
||||
US_FL_SCM_MULT_TARG)) &&
|
||||
us->protocol == US_PR_BULK)
|
||||
us->protocol == USB_PR_BULK)
|
||||
us->use_last_sector_hacks = 1;
|
||||
} else {
|
||||
|
||||
|
@ -261,7 +261,7 @@ static int slave_configure(struct scsi_device *sdev)
|
|||
* scsi_level == 0 (UNKNOWN). Hence such devices must necessarily
|
||||
* be single-LUN.
|
||||
*/
|
||||
if ((us->protocol == US_PR_CB || us->protocol == US_PR_CBI) &&
|
||||
if ((us->protocol == USB_PR_CB || us->protocol == USB_PR_CBI) &&
|
||||
sdev->scsi_level == SCSI_UNKNOWN)
|
||||
us->max_lun = 0;
|
||||
|
||||
|
|
|
@ -1760,7 +1760,7 @@ static int sddr09_probe(struct usb_interface *intf,
|
|||
if (result)
|
||||
return result;
|
||||
|
||||
if (us->protocol == US_PR_DPCM_USB) {
|
||||
if (us->protocol == USB_PR_DPCM_USB) {
|
||||
us->transport_name = "Control/Bulk-EUSB/SDDR09";
|
||||
us->transport = dpcm_transport;
|
||||
us->transport_reset = usb_stor_CB_reset;
|
||||
|
|
|
@ -642,7 +642,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
|
|||
* unless the operation involved a data-in transfer. Devices
|
||||
* can signal most data-in errors by stalling the bulk-in pipe.
|
||||
*/
|
||||
if ((us->protocol == US_PR_CB || us->protocol == US_PR_DPCM_USB) &&
|
||||
if ((us->protocol == USB_PR_CB || us->protocol == USB_PR_DPCM_USB) &&
|
||||
srb->sc_data_direction != DMA_FROM_DEVICE) {
|
||||
US_DEBUGP("-- CB transport device requiring auto-sense\n");
|
||||
need_auto_sense = 1;
|
||||
|
@ -701,8 +701,8 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
|
|||
scsi_eh_prep_cmnd(srb, &ses, NULL, 0, sense_size);
|
||||
|
||||
/* FIXME: we must do the protocol translation here */
|
||||
if (us->subclass == US_SC_RBC || us->subclass == US_SC_SCSI ||
|
||||
us->subclass == US_SC_CYP_ATACB)
|
||||
if (us->subclass == USB_SC_RBC || us->subclass == USB_SC_SCSI ||
|
||||
us->subclass == USB_SC_CYP_ATACB)
|
||||
srb->cmd_len = 6;
|
||||
else
|
||||
srb->cmd_len = 12;
|
||||
|
@ -926,7 +926,7 @@ int usb_stor_CB_transport(struct scsi_cmnd *srb, struct us_data *us)
|
|||
/* NOTE: CB does not have a status stage. Silly, I know. So
|
||||
* we have to catch this at a higher level.
|
||||
*/
|
||||
if (us->protocol != US_PR_CBI)
|
||||
if (us->protocol != USB_PR_CBI)
|
||||
return USB_STOR_TRANSPORT_GOOD;
|
||||
|
||||
result = usb_stor_intr_transfer(us, us->iobuf, 2);
|
||||
|
@ -942,7 +942,7 @@ int usb_stor_CB_transport(struct scsi_cmnd *srb, struct us_data *us)
|
|||
* that this means we could be ignoring a real error on these
|
||||
* commands, but that can't be helped.
|
||||
*/
|
||||
if (us->subclass == US_SC_UFI) {
|
||||
if (us->subclass == USB_SC_UFI) {
|
||||
if (srb->cmnd[0] == REQUEST_SENSE ||
|
||||
srb->cmnd[0] == INQUIRY)
|
||||
return USB_STOR_TRANSPORT_GOOD;
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
UNUSUAL_DEV( 0x0584, 0x0008, 0x0102, 0x0102,
|
||||
"Fujifilm",
|
||||
"DPC-R1 (Alauda)",
|
||||
US_SC_SCSI, US_PR_ALAUDA, init_alauda, 0),
|
||||
USB_SC_SCSI, USB_PR_ALAUDA, init_alauda, 0),
|
||||
|
||||
UNUSUAL_DEV( 0x07b4, 0x010a, 0x0102, 0x0102,
|
||||
"Olympus",
|
||||
"MAUSB-10 (Alauda)",
|
||||
US_SC_SCSI, US_PR_ALAUDA, init_alauda, 0),
|
||||
USB_SC_SCSI, USB_PR_ALAUDA, init_alauda, 0),
|
||||
|
||||
#endif /* defined(CONFIG_USB_STORAGE_ALAUDA) || ... */
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
UNUSUAL_DEV( 0x04b4, 0x6830, 0x0000, 0x9999,
|
||||
"Cypress",
|
||||
"Cypress AT2LP",
|
||||
US_SC_CYP_ATACB, US_PR_DEVICE, NULL, 0),
|
||||
USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),
|
||||
|
||||
/* CY7C68310 : support atacb and atacb2 */
|
||||
UNUSUAL_DEV( 0x04b4, 0x6831, 0x0000, 0x9999,
|
||||
"Cypress",
|
||||
"Cypress ISD-300LP",
|
||||
US_SC_CYP_ATACB, US_PR_DEVICE, NULL, 0),
|
||||
USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),
|
||||
|
||||
#endif /* defined(CONFIG_USB_STORAGE_CYPRESS_ATACB) || ... */
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
UNUSUAL_DEV( 0x07c4, 0xa000, 0x0000, 0x0015,
|
||||
"Datafab",
|
||||
"MDCFE-B USB CF Reader",
|
||||
US_SC_SCSI, US_PR_DATAFAB, NULL,
|
||||
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
|
||||
0),
|
||||
|
||||
/*
|
||||
|
@ -38,45 +38,45 @@ UNUSUAL_DEV( 0x07c4, 0xa000, 0x0000, 0x0015,
|
|||
UNUSUAL_DEV( 0x07c4, 0xa001, 0x0000, 0xffff,
|
||||
"SIIG/Datafab",
|
||||
"SIIG/Datafab Memory Stick+CF Reader/Writer",
|
||||
US_SC_SCSI, US_PR_DATAFAB, NULL,
|
||||
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
|
||||
0),
|
||||
|
||||
/* Reported by Josef Reisinger <josef.reisinger@netcologne.de> */
|
||||
UNUSUAL_DEV( 0x07c4, 0xa002, 0x0000, 0xffff,
|
||||
"Datafab/Unknown",
|
||||
"MD2/MD3 Disk enclosure",
|
||||
US_SC_SCSI, US_PR_DATAFAB, NULL,
|
||||
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
|
||||
US_FL_SINGLE_LUN),
|
||||
|
||||
UNUSUAL_DEV( 0x07c4, 0xa003, 0x0000, 0xffff,
|
||||
"Datafab/Unknown",
|
||||
"Datafab-based Reader",
|
||||
US_SC_SCSI, US_PR_DATAFAB, NULL,
|
||||
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
|
||||
0),
|
||||
|
||||
UNUSUAL_DEV( 0x07c4, 0xa004, 0x0000, 0xffff,
|
||||
"Datafab/Unknown",
|
||||
"Datafab-based Reader",
|
||||
US_SC_SCSI, US_PR_DATAFAB, NULL,
|
||||
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
|
||||
0),
|
||||
|
||||
UNUSUAL_DEV( 0x07c4, 0xa005, 0x0000, 0xffff,
|
||||
"PNY/Datafab",
|
||||
"PNY/Datafab CF+SM Reader",
|
||||
US_SC_SCSI, US_PR_DATAFAB, NULL,
|
||||
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
|
||||
0),
|
||||
|
||||
UNUSUAL_DEV( 0x07c4, 0xa006, 0x0000, 0xffff,
|
||||
"Simple Tech/Datafab",
|
||||
"Simple Tech/Datafab CF+SM Reader",
|
||||
US_SC_SCSI, US_PR_DATAFAB, NULL,
|
||||
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
|
||||
0),
|
||||
|
||||
/* Submitted by Olaf Hering <olh@suse.de> */
|
||||
UNUSUAL_DEV( 0x07c4, 0xa109, 0x0000, 0xffff,
|
||||
"Datafab Systems, Inc.",
|
||||
"USB to CF + SM Combo (LC1)",
|
||||
US_SC_SCSI, US_PR_DATAFAB, NULL,
|
||||
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
|
||||
0),
|
||||
|
||||
/* Reported by Felix Moeller <felix@derklecks.de>
|
||||
|
@ -86,13 +86,13 @@ UNUSUAL_DEV( 0x07c4, 0xa109, 0x0000, 0xffff,
|
|||
UNUSUAL_DEV( 0x07c4, 0xa10b, 0x0000, 0xffff,
|
||||
"DataFab Systems Inc.",
|
||||
"USB CF+MS",
|
||||
US_SC_SCSI, US_PR_DATAFAB, NULL,
|
||||
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
|
||||
0),
|
||||
|
||||
UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xffff,
|
||||
"Acomdata",
|
||||
"CF",
|
||||
US_SC_SCSI, US_PR_DATAFAB, NULL,
|
||||
USB_SC_SCSI, USB_PR_DATAFAB, NULL,
|
||||
US_FL_SINGLE_LUN),
|
||||
|
||||
#endif /* defined(CONFIG_USB_STORAGE_DATAFAB) || ... */
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -21,6 +21,6 @@
|
|||
UNUSUAL_DEV( 0x07ab, 0xfc01, 0x0000, 0x9999,
|
||||
"Freecom",
|
||||
"USB-IDE",
|
||||
US_SC_QIC, US_PR_FREECOM, init_freecom, 0),
|
||||
USB_SC_QIC, USB_PR_FREECOM, init_freecom, 0),
|
||||
|
||||
#endif /* defined(CONFIG_USB_STORAGE_FREECOM) || ... */
|
||||
|
|
|
@ -21,37 +21,37 @@
|
|||
UNUSUAL_DEV( 0x054c, 0x002b, 0x0100, 0x0110,
|
||||
"Sony",
|
||||
"Portable USB Harddrive V2",
|
||||
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
|
||||
USB_SC_ISD200, USB_PR_BULK, isd200_Initialization,
|
||||
0),
|
||||
|
||||
UNUSUAL_DEV( 0x05ab, 0x0031, 0x0100, 0x0110,
|
||||
"In-System",
|
||||
"USB/IDE Bridge (ATA/ATAPI)",
|
||||
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
|
||||
USB_SC_ISD200, USB_PR_BULK, isd200_Initialization,
|
||||
0),
|
||||
|
||||
UNUSUAL_DEV( 0x05ab, 0x0301, 0x0100, 0x0110,
|
||||
"In-System",
|
||||
"Portable USB Harddrive V2",
|
||||
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
|
||||
USB_SC_ISD200, USB_PR_BULK, isd200_Initialization,
|
||||
0),
|
||||
|
||||
UNUSUAL_DEV( 0x05ab, 0x0351, 0x0100, 0x0110,
|
||||
"In-System",
|
||||
"Portable USB Harddrive V2",
|
||||
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
|
||||
USB_SC_ISD200, USB_PR_BULK, isd200_Initialization,
|
||||
0),
|
||||
|
||||
UNUSUAL_DEV( 0x05ab, 0x5701, 0x0100, 0x0110,
|
||||
"In-System",
|
||||
"USB Storage Adapter V2",
|
||||
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
|
||||
USB_SC_ISD200, USB_PR_BULK, isd200_Initialization,
|
||||
0),
|
||||
|
||||
UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110,
|
||||
"ATI",
|
||||
"USB Cable 205",
|
||||
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
|
||||
USB_SC_ISD200, USB_PR_BULK, isd200_Initialization,
|
||||
0),
|
||||
|
||||
#endif /* defined(CONFIG_USB_STORAGE_ISD200) || ... */
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
UNUSUAL_DEV( 0x05dc, 0x0001, 0x0000, 0x0001,
|
||||
"Lexar",
|
||||
"Jumpshot USB CF Reader",
|
||||
US_SC_SCSI, US_PR_JUMPSHOT, NULL,
|
||||
USB_SC_SCSI, USB_PR_JUMPSHOT, NULL,
|
||||
US_FL_NEED_OVERRIDE),
|
||||
|
||||
#endif /* defined(CONFIG_USB_STORAGE_JUMPSHOT) || ... */
|
||||
|
|
|
@ -21,6 +21,6 @@
|
|||
UNUSUAL_DEV( 0x045a, 0x5210, 0x0101, 0x0101,
|
||||
"Rio",
|
||||
"Rio Karma",
|
||||
US_SC_SCSI, US_PR_KARMA, rio_karma_init, 0),
|
||||
USB_SC_SCSI, USB_PR_KARMA, rio_karma_init, 0),
|
||||
|
||||
#endif /* defined(CONFIG_USB_STORAGE_KARMA) || ... */
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
UNUSUAL_DEV( 0x0d49, 0x7000, 0x0000, 0x9999,
|
||||
"Maxtor",
|
||||
"OneTouch External Harddrive",
|
||||
US_SC_DEVICE, US_PR_DEVICE, onetouch_connect_input,
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, onetouch_connect_input,
|
||||
0),
|
||||
|
||||
UNUSUAL_DEV( 0x0d49, 0x7010, 0x0000, 0x9999,
|
||||
"Maxtor",
|
||||
"OneTouch External Harddrive",
|
||||
US_SC_DEVICE, US_PR_DEVICE, onetouch_connect_input,
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, onetouch_connect_input,
|
||||
0),
|
||||
|
||||
#endif /* defined(CONFIG_USB_STORAGE_ONETOUCH) || ... */
|
||||
|
|
|
@ -21,36 +21,36 @@
|
|||
UNUSUAL_DEV( 0x0436, 0x0005, 0x0100, 0x0100,
|
||||
"Microtech",
|
||||
"CameraMate (DPCM_USB)",
|
||||
US_SC_SCSI, US_PR_DPCM_USB, NULL, 0),
|
||||
USB_SC_SCSI, USB_PR_DPCM_USB, NULL, 0),
|
||||
|
||||
UNUSUAL_DEV( 0x04e6, 0x0003, 0x0000, 0x9999,
|
||||
"Sandisk",
|
||||
"ImageMate SDDR09",
|
||||
US_SC_SCSI, US_PR_EUSB_SDDR09, usb_stor_sddr09_init,
|
||||
USB_SC_SCSI, USB_PR_EUSB_SDDR09, usb_stor_sddr09_init,
|
||||
0),
|
||||
|
||||
/* This entry is from Andries.Brouwer@cwi.nl */
|
||||
UNUSUAL_DEV( 0x04e6, 0x0005, 0x0100, 0x0208,
|
||||
"SCM Microsystems",
|
||||
"eUSB SmartMedia / CompactFlash Adapter",
|
||||
US_SC_SCSI, US_PR_DPCM_USB, usb_stor_sddr09_dpcm_init,
|
||||
USB_SC_SCSI, USB_PR_DPCM_USB, usb_stor_sddr09_dpcm_init,
|
||||
0),
|
||||
|
||||
UNUSUAL_DEV( 0x066b, 0x0105, 0x0100, 0x0100,
|
||||
"Olympus",
|
||||
"Camedia MAUSB-2",
|
||||
US_SC_SCSI, US_PR_EUSB_SDDR09, usb_stor_sddr09_init,
|
||||
USB_SC_SCSI, USB_PR_EUSB_SDDR09, usb_stor_sddr09_init,
|
||||
0),
|
||||
|
||||
UNUSUAL_DEV( 0x0781, 0x0200, 0x0000, 0x9999,
|
||||
"Sandisk",
|
||||
"ImageMate SDDR-09",
|
||||
US_SC_SCSI, US_PR_EUSB_SDDR09, usb_stor_sddr09_init,
|
||||
USB_SC_SCSI, USB_PR_EUSB_SDDR09, usb_stor_sddr09_init,
|
||||
0),
|
||||
|
||||
UNUSUAL_DEV( 0x07af, 0x0006, 0x0100, 0x0100,
|
||||
"Microtech",
|
||||
"CameraMate (DPCM_USB)",
|
||||
US_SC_SCSI, US_PR_DPCM_USB, NULL, 0),
|
||||
USB_SC_SCSI, USB_PR_DPCM_USB, NULL, 0),
|
||||
|
||||
#endif /* defined(CONFIG_USB_STORAGE_SDDR09) || ... */
|
||||
|
|
|
@ -22,23 +22,23 @@
|
|||
UNUSUAL_DEV( 0x07c4, 0xa103, 0x0000, 0x9999,
|
||||
"Datafab",
|
||||
"MDSM-B reader",
|
||||
US_SC_SCSI, US_PR_SDDR55, NULL,
|
||||
USB_SC_SCSI, USB_PR_SDDR55, NULL,
|
||||
US_FL_FIX_INQUIRY),
|
||||
|
||||
/* SM part - aeb <Andries.Brouwer@cwi.nl> */
|
||||
UNUSUAL_DEV( 0x07c4, 0xa109, 0x0000, 0xffff,
|
||||
"Datafab Systems, Inc.",
|
||||
"USB to CF + SM Combo (LC1)",
|
||||
US_SC_SCSI, US_PR_SDDR55, NULL, 0),
|
||||
USB_SC_SCSI, USB_PR_SDDR55, NULL, 0),
|
||||
|
||||
UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xffff,
|
||||
"Acomdata",
|
||||
"SM",
|
||||
US_SC_SCSI, US_PR_SDDR55, NULL, 0),
|
||||
USB_SC_SCSI, USB_PR_SDDR55, NULL, 0),
|
||||
|
||||
UNUSUAL_DEV( 0x55aa, 0xa103, 0x0000, 0x9999,
|
||||
"Sandisk",
|
||||
"ImageMate SDDR55",
|
||||
US_SC_SCSI, US_PR_SDDR55, NULL, 0),
|
||||
USB_SC_SCSI, USB_PR_SDDR55, NULL, 0),
|
||||
|
||||
#endif /* defined(CONFIG_USB_STORAGE_SDDR55) || ... */
|
||||
|
|
|
@ -21,23 +21,23 @@
|
|||
UNUSUAL_DEV( 0x03f0, 0x0207, 0x0001, 0x0001,
|
||||
"HP",
|
||||
"CD-Writer+ 8200e",
|
||||
US_SC_8070, US_PR_USBAT, init_usbat_cd, 0),
|
||||
USB_SC_8070, USB_PR_USBAT, init_usbat_cd, 0),
|
||||
|
||||
UNUSUAL_DEV( 0x03f0, 0x0307, 0x0001, 0x0001,
|
||||
"HP",
|
||||
"CD-Writer+ CD-4e",
|
||||
US_SC_8070, US_PR_USBAT, init_usbat_cd, 0),
|
||||
USB_SC_8070, USB_PR_USBAT, init_usbat_cd, 0),
|
||||
|
||||
UNUSUAL_DEV( 0x04e6, 0x1010, 0x0000, 0x9999,
|
||||
"Shuttle/SCM",
|
||||
"USBAT-02",
|
||||
US_SC_SCSI, US_PR_USBAT, init_usbat_flash,
|
||||
USB_SC_SCSI, USB_PR_USBAT, init_usbat_flash,
|
||||
US_FL_SINGLE_LUN),
|
||||
|
||||
UNUSUAL_DEV( 0x0781, 0x0005, 0x0005, 0x0005,
|
||||
"Sandisk",
|
||||
"ImageMate SDDR-05b",
|
||||
US_SC_SCSI, US_PR_USBAT, init_usbat_flash,
|
||||
USB_SC_SCSI, USB_PR_USBAT, init_usbat_flash,
|
||||
US_FL_SINGLE_LUN),
|
||||
|
||||
#endif /* defined(CONFIG_USB_STORAGE_USBAT) || ... */
|
||||
|
|
|
@ -512,10 +512,10 @@ static int get_device_info(struct us_data *us, const struct usb_device_id *id,
|
|||
|
||||
/* Store the entries */
|
||||
us->unusual_dev = unusual_dev;
|
||||
us->subclass = (unusual_dev->useProtocol == US_SC_DEVICE) ?
|
||||
us->subclass = (unusual_dev->useProtocol == USB_SC_DEVICE) ?
|
||||
idesc->bInterfaceSubClass :
|
||||
unusual_dev->useProtocol;
|
||||
us->protocol = (unusual_dev->useTransport == US_PR_DEVICE) ?
|
||||
us->protocol = (unusual_dev->useTransport == USB_PR_DEVICE) ?
|
||||
idesc->bInterfaceProtocol :
|
||||
unusual_dev->useTransport;
|
||||
us->fflags = USB_US_ORIG_FLAGS(id->driver_info);
|
||||
|
@ -552,10 +552,10 @@ static int get_device_info(struct us_data *us, const struct usb_device_id *id,
|
|||
struct usb_device_descriptor *ddesc = &dev->descriptor;
|
||||
int msg = -1;
|
||||
|
||||
if (unusual_dev->useProtocol != US_SC_DEVICE &&
|
||||
if (unusual_dev->useProtocol != USB_SC_DEVICE &&
|
||||
us->subclass == idesc->bInterfaceSubClass)
|
||||
msg += 1;
|
||||
if (unusual_dev->useTransport != US_PR_DEVICE &&
|
||||
if (unusual_dev->useTransport != USB_PR_DEVICE &&
|
||||
us->protocol == idesc->bInterfaceProtocol)
|
||||
msg += 2;
|
||||
if (msg >= 0 && !(us->fflags & US_FL_NEED_OVERRIDE))
|
||||
|
@ -582,21 +582,21 @@ static int get_device_info(struct us_data *us, const struct usb_device_id *id,
|
|||
static void get_transport(struct us_data *us)
|
||||
{
|
||||
switch (us->protocol) {
|
||||
case US_PR_CB:
|
||||
case USB_PR_CB:
|
||||
us->transport_name = "Control/Bulk";
|
||||
us->transport = usb_stor_CB_transport;
|
||||
us->transport_reset = usb_stor_CB_reset;
|
||||
us->max_lun = 7;
|
||||
break;
|
||||
|
||||
case US_PR_CBI:
|
||||
case USB_PR_CBI:
|
||||
us->transport_name = "Control/Bulk/Interrupt";
|
||||
us->transport = usb_stor_CB_transport;
|
||||
us->transport_reset = usb_stor_CB_reset;
|
||||
us->max_lun = 7;
|
||||
break;
|
||||
|
||||
case US_PR_BULK:
|
||||
case USB_PR_BULK:
|
||||
us->transport_name = "Bulk";
|
||||
us->transport = usb_stor_Bulk_transport;
|
||||
us->transport_reset = usb_stor_Bulk_reset;
|
||||
|
@ -608,35 +608,35 @@ static void get_transport(struct us_data *us)
|
|||
static void get_protocol(struct us_data *us)
|
||||
{
|
||||
switch (us->subclass) {
|
||||
case US_SC_RBC:
|
||||
case USB_SC_RBC:
|
||||
us->protocol_name = "Reduced Block Commands (RBC)";
|
||||
us->proto_handler = usb_stor_transparent_scsi_command;
|
||||
break;
|
||||
|
||||
case US_SC_8020:
|
||||
case USB_SC_8020:
|
||||
us->protocol_name = "8020i";
|
||||
us->proto_handler = usb_stor_pad12_command;
|
||||
us->max_lun = 0;
|
||||
break;
|
||||
|
||||
case US_SC_QIC:
|
||||
case USB_SC_QIC:
|
||||
us->protocol_name = "QIC-157";
|
||||
us->proto_handler = usb_stor_pad12_command;
|
||||
us->max_lun = 0;
|
||||
break;
|
||||
|
||||
case US_SC_8070:
|
||||
case USB_SC_8070:
|
||||
us->protocol_name = "8070i";
|
||||
us->proto_handler = usb_stor_pad12_command;
|
||||
us->max_lun = 0;
|
||||
break;
|
||||
|
||||
case US_SC_SCSI:
|
||||
case USB_SC_SCSI:
|
||||
us->protocol_name = "Transparent SCSI";
|
||||
us->proto_handler = usb_stor_transparent_scsi_command;
|
||||
break;
|
||||
|
||||
case US_SC_UFI:
|
||||
case USB_SC_UFI:
|
||||
us->protocol_name = "Uniform Floppy Interface (UFI)";
|
||||
us->proto_handler = usb_stor_ufi_command;
|
||||
break;
|
||||
|
@ -679,7 +679,7 @@ static int get_pipes(struct us_data *us)
|
|||
}
|
||||
}
|
||||
|
||||
if (!ep_in || !ep_out || (us->protocol == US_PR_CBI && !ep_int)) {
|
||||
if (!ep_in || !ep_out || (us->protocol == USB_PR_CBI && !ep_int)) {
|
||||
US_DEBUGP("Endpoint sanity check failed! Rejecting dev.\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -834,7 +834,7 @@ static int usb_stor_scan_thread(void * __us)
|
|||
if (!test_bit(US_FLIDX_DONT_SCAN, &us->dflags)) {
|
||||
|
||||
/* For bulk-only devices, determine the max LUN value */
|
||||
if (us->protocol == US_PR_BULK &&
|
||||
if (us->protocol == USB_PR_BULK &&
|
||||
!(us->fflags & US_FL_SINGLE_LUN)) {
|
||||
mutex_lock(&us->dev_mutex);
|
||||
us->max_lun = usb_stor_Bulk_max_lun(us);
|
||||
|
|
|
@ -81,35 +81,36 @@ enum { US_DO_ALL_FLAGS };
|
|||
|
||||
/* Sub Classes */
|
||||
|
||||
#define US_SC_RBC 0x01 /* Typically, flash devices */
|
||||
#define US_SC_8020 0x02 /* CD-ROM */
|
||||
#define US_SC_QIC 0x03 /* QIC-157 Tapes */
|
||||
#define US_SC_UFI 0x04 /* Floppy */
|
||||
#define US_SC_8070 0x05 /* Removable media */
|
||||
#define US_SC_SCSI 0x06 /* Transparent */
|
||||
#define US_SC_LOCKABLE 0x07 /* Password-protected */
|
||||
#define USB_SC_RBC 0x01 /* Typically, flash devices */
|
||||
#define USB_SC_8020 0x02 /* CD-ROM */
|
||||
#define USB_SC_QIC 0x03 /* QIC-157 Tapes */
|
||||
#define USB_SC_UFI 0x04 /* Floppy */
|
||||
#define USB_SC_8070 0x05 /* Removable media */
|
||||
#define USB_SC_SCSI 0x06 /* Transparent */
|
||||
#define USB_SC_LOCKABLE 0x07 /* Password-protected */
|
||||
|
||||
#define US_SC_ISD200 0xf0 /* ISD200 ATA */
|
||||
#define US_SC_CYP_ATACB 0xf1 /* Cypress ATACB */
|
||||
#define US_SC_DEVICE 0xff /* Use device's value */
|
||||
#define USB_SC_ISD200 0xf0 /* ISD200 ATA */
|
||||
#define USB_SC_CYP_ATACB 0xf1 /* Cypress ATACB */
|
||||
#define USB_SC_DEVICE 0xff /* Use device's value */
|
||||
|
||||
/* Protocols */
|
||||
/* Storage protocol codes */
|
||||
|
||||
#define US_PR_CBI 0x00 /* Control/Bulk/Interrupt */
|
||||
#define US_PR_CB 0x01 /* Control/Bulk w/o interrupt */
|
||||
#define US_PR_BULK 0x50 /* bulk only */
|
||||
#define USB_PR_CBI 0x00 /* Control/Bulk/Interrupt */
|
||||
#define USB_PR_CB 0x01 /* Control/Bulk w/o interrupt */
|
||||
#define USB_PR_BULK 0x50 /* bulk only */
|
||||
#define USB_PR_UAS 0x62 /* USB Attached SCSI */
|
||||
|
||||
#define US_PR_USBAT 0x80 /* SCM-ATAPI bridge */
|
||||
#define US_PR_EUSB_SDDR09 0x81 /* SCM-SCSI bridge for SDDR-09 */
|
||||
#define US_PR_SDDR55 0x82 /* SDDR-55 (made up) */
|
||||
#define US_PR_DPCM_USB 0xf0 /* Combination CB/SDDR09 */
|
||||
#define US_PR_FREECOM 0xf1 /* Freecom */
|
||||
#define US_PR_DATAFAB 0xf2 /* Datafab chipsets */
|
||||
#define US_PR_JUMPSHOT 0xf3 /* Lexar Jumpshot */
|
||||
#define US_PR_ALAUDA 0xf4 /* Alauda chipsets */
|
||||
#define US_PR_KARMA 0xf5 /* Rio Karma */
|
||||
#define USB_PR_USBAT 0x80 /* SCM-ATAPI bridge */
|
||||
#define USB_PR_EUSB_SDDR09 0x81 /* SCM-SCSI bridge for SDDR-09 */
|
||||
#define USB_PR_SDDR55 0x82 /* SDDR-55 (made up) */
|
||||
#define USB_PR_DPCM_USB 0xf0 /* Combination CB/SDDR09 */
|
||||
#define USB_PR_FREECOM 0xf1 /* Freecom */
|
||||
#define USB_PR_DATAFAB 0xf2 /* Datafab chipsets */
|
||||
#define USB_PR_JUMPSHOT 0xf3 /* Lexar Jumpshot */
|
||||
#define USB_PR_ALAUDA 0xf4 /* Alauda chipsets */
|
||||
#define USB_PR_KARMA 0xf5 /* Rio Karma */
|
||||
|
||||
#define US_PR_DEVICE 0xff /* Use device's value */
|
||||
#define USB_PR_DEVICE 0xff /* Use device's value */
|
||||
|
||||
/*
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue