diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-10-30 08:43:08 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-10-30 08:43:08 (GMT) |
commit | 169ed55bd30305b933f52bfab32a58671d44ab68 (patch) | |
tree | 32e280957474f458901abfce16fa2a1687ef7497 /drivers/usb/storage | |
parent | 3d7851b3cdd43a734e5cc4c643fd886ab28ad4d5 (diff) | |
parent | 45f81b1c96d9793e47ce925d257ea693ce0b193e (diff) | |
download | linux-fsl-qoriq-169ed55bd30305b933f52bfab32a58671d44ab68.tar.xz |
Merge branch 'tip/perf/jump-label-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/urgent
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r-- | drivers/usb/storage/Kconfig | 15 | ||||
-rw-r--r-- | drivers/usb/storage/Makefile | 35 | ||||
-rw-r--r-- | drivers/usb/storage/scsiglue.c | 16 | ||||
-rw-r--r-- | drivers/usb/storage/sddr09.c | 2 | ||||
-rw-r--r-- | drivers/usb/storage/transport.c | 10 | ||||
-rw-r--r-- | drivers/usb/storage/uas.c | 751 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_alauda.h | 4 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_cypress.h | 4 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_datafab.h | 20 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_devs.h | 580 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_freecom.h | 2 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_isd200.h | 12 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_jumpshot.h | 2 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_karma.h | 2 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_onetouch.h | 4 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_sddr09.h | 12 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_sddr55.h | 8 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_usbat.h | 8 | ||||
-rw-r--r-- | drivers/usb/storage/usb.c | 30 |
19 files changed, 1148 insertions, 369 deletions
diff --git a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig index 8a372ba..49a489e 100644 --- a/drivers/usb/storage/Kconfig +++ b/drivers/usb/storage/Kconfig @@ -36,7 +36,7 @@ config USB_STORAGE_DATAFAB depends on USB_STORAGE help Support for certain Datafab CompactFlash readers. - Datafab has a web page at <http://www.datafabusa.com/>. + Datafab has a web page at <http://www.datafab.com/>. If this driver is compiled as a module, it will be named ums-datafab. @@ -172,6 +172,19 @@ config USB_STORAGE_CYPRESS_ATACB If this driver is compiled as a module, it will be named ums-cypress. +config USB_UAS + tristate "USB Attached SCSI" + depends on USB && SCSI + help + The USB Attached SCSI protocol is supported by some USB + storage devices. It permits higher performance by supporting + multiple outstanding commands. + + If you don't know whether you have a UAS device, it is safe to + say 'Y' or 'M' here and the kernel will use the right driver. + + If you compile this driver as a module, it will be named uas. + config USB_LIBUSUAL bool "The shared table of common (or usual) storage devices" depends on USB diff --git a/drivers/usb/storage/Makefile b/drivers/usb/storage/Makefile index ef7e5a8..fcf14cd 100644 --- a/drivers/usb/storage/Makefile +++ b/drivers/usb/storage/Makefile @@ -5,20 +5,21 @@ # Rewritten to use lists instead of if-statements. # -EXTRA_CFLAGS := -Idrivers/scsi +ccflags-y := -Idrivers/scsi +obj-$(CONFIG_USB_UAS) += uas.o obj-$(CONFIG_USB_STORAGE) += usb-storage.o -usb-storage-obj-$(CONFIG_USB_STORAGE_DEBUG) += debug.o +usb-storage-y := scsiglue.o protocol.o transport.o usb.o +usb-storage-y += initializers.o sierra_ms.o option_ms.o -usb-storage-objs := scsiglue.o protocol.o transport.o usb.o \ - initializers.o sierra_ms.o option_ms.o $(usb-storage-obj-y) +usb-storage-$(CONFIG_USB_STORAGE_DEBUG) += debug.o ifeq ($(CONFIG_USB_LIBUSUAL),) - usb-storage-objs += usual-tables.o + usb-storage-y += usual-tables.o else obj-$(CONFIG_USB) += usb-libusual.o - usb-libusual-objs := libusual.o usual-tables.o + usb-libusual-y := libusual.o usual-tables.o endif obj-$(CONFIG_USB_STORAGE_ALAUDA) += ums-alauda.o @@ -33,14 +34,14 @@ obj-$(CONFIG_USB_STORAGE_SDDR09) += ums-sddr09.o obj-$(CONFIG_USB_STORAGE_SDDR55) += ums-sddr55.o obj-$(CONFIG_USB_STORAGE_USBAT) += ums-usbat.o -ums-alauda-objs := alauda.o -ums-cypress-objs := cypress_atacb.o -ums-datafab-objs := datafab.o -ums-freecom-objs := freecom.o -ums-isd200-objs := isd200.o -ums-jumpshot-objs := jumpshot.o -ums-karma-objs := karma.o -ums-onetouch-objs := onetouch.o -ums-sddr09-objs := sddr09.o -ums-sddr55-objs := sddr55.o -ums-usbat-objs := shuttle_usbat.o +ums-alauda-y := alauda.o +ums-cypress-y := cypress_atacb.o +ums-datafab-y := datafab.o +ums-freecom-y := freecom.o +ums-isd200-y := isd200.o +ums-jumpshot-y := jumpshot.o +ums-karma-y := karma.o +ums-onetouch-y := onetouch.o +ums-sddr09-y := sddr09.o +ums-sddr55-y := sddr55.o +ums-usbat-y := shuttle_usbat.o diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index d8d98cf..a688b1e 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -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 @@ -209,6 +209,10 @@ static int slave_configure(struct scsi_device *sdev) if (us->fflags & US_FL_CAPACITY_HEURISTICS) sdev->guess_capacity = 1; + /* Some devices cannot handle READ_CAPACITY_16 */ + if (us->fflags & US_FL_NO_READ_CAPACITY_16) + sdev->no_read_capacity_16 = 1; + /* assume SPC3 or latter devices support sense size > 18 */ if (sdev->scsi_level > SCSI_SPC_2) us->fflags |= US_FL_SANE_SENSE; @@ -245,7 +249,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 { @@ -253,6 +257,10 @@ static int slave_configure(struct scsi_device *sdev) * or to force 192-byte transfer lengths for MODE SENSE. * But they do need to use MODE SENSE(10). */ sdev->use_10_for_ms = 1; + + /* Some (fake) usb cdrom devices don't like READ_DISC_INFO */ + if (us->fflags & US_FL_NO_READ_DISC_INFO) + sdev->no_read_disc_info = 1; } /* The CB and CBI transports have no way to pass LUN values @@ -261,7 +269,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; diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c index ab5f9f3..bcb9a70 100644 --- a/drivers/usb/storage/sddr09.c +++ b/drivers/usb/storage/sddr09.c @@ -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; diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index 64ec073..0041899 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c @@ -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 @@ Retry_Sense: 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; diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c new file mode 100644 index 0000000..2054b1e --- /dev/null +++ b/drivers/usb/storage/uas.c @@ -0,0 +1,751 @@ +/* + * USB Attached SCSI + * Note that this is not the same as the USB Mass Storage driver + * + * Copyright Matthew Wilcox for Intel Corp, 2010 + * Copyright Sarah Sharp for Intel Corp, 2010 + * + * Distributed under the terms of the GNU GPL, version two. + */ + +#include <linux/blkdev.h> +#include <linux/slab.h> +#include <linux/types.h> +#include <linux/usb.h> +#include <linux/usb/storage.h> + +#include <scsi/scsi.h> +#include <scsi/scsi_dbg.h> +#include <scsi/scsi_cmnd.h> +#include <scsi/scsi_device.h> +#include <scsi/scsi_host.h> +#include <scsi/scsi_tcq.h> + +/* Common header for all IUs */ +struct iu { + __u8 iu_id; + __u8 rsvd1; + __be16 tag; +}; + +enum { + IU_ID_COMMAND = 0x01, + IU_ID_STATUS = 0x03, + IU_ID_RESPONSE = 0x04, + IU_ID_TASK_MGMT = 0x05, + IU_ID_READ_READY = 0x06, + IU_ID_WRITE_READY = 0x07, +}; + +struct command_iu { + __u8 iu_id; + __u8 rsvd1; + __be16 tag; + __u8 prio_attr; + __u8 rsvd5; + __u8 len; + __u8 rsvd7; + struct scsi_lun lun; + __u8 cdb[16]; /* XXX: Overflow-checking tools may misunderstand */ +}; + +struct sense_iu { + __u8 iu_id; + __u8 rsvd1; + __be16 tag; + __be16 status_qual; + __u8 status; + __u8 service_response; + __u8 rsvd8[6]; + __be16 len; + __u8 sense[SCSI_SENSE_BUFFERSIZE]; +}; + +/* + * The r00-r01c specs define this version of the SENSE IU data structure. + * It's still in use by several different firmware releases. + */ +struct sense_iu_old { + __u8 iu_id; + __u8 rsvd1; + __be16 tag; + __be16 len; + __u8 status; + __u8 service_response; + __u8 sense[SCSI_SENSE_BUFFERSIZE]; +}; + +enum { + CMD_PIPE_ID = 1, + STATUS_PIPE_ID = 2, + DATA_IN_PIPE_ID = 3, + DATA_OUT_PIPE_ID = 4, + + UAS_SIMPLE_TAG = 0, + UAS_HEAD_TAG = 1, + UAS_ORDERED_TAG = 2, + UAS_ACA = 4, +}; + +struct uas_dev_info { + struct usb_interface *intf; + struct usb_device *udev; + int qdepth; + unsigned cmd_pipe, status_pipe, data_in_pipe, data_out_pipe; + unsigned use_streams:1; + unsigned uas_sense_old:1; +}; + +enum { + ALLOC_SENSE_URB = (1 << 0), + SUBMIT_SENSE_URB = (1 << 1), + ALLOC_DATA_IN_URB = (1 << 2), + SUBMIT_DATA_IN_URB = (1 << 3), + ALLOC_DATA_OUT_URB = (1 << 4), + SUBMIT_DATA_OUT_URB = (1 << 5), + ALLOC_CMD_URB = (1 << 6), + SUBMIT_CMD_URB = (1 << 7), +}; + +/* Overrides scsi_pointer */ +struct uas_cmd_info { + unsigned int state; + unsigned int stream; + struct urb *cmd_urb; + struct urb *sense_urb; + struct urb *data_in_urb; + struct urb *data_out_urb; + struct list_head list; +}; + +/* I hate forward declarations, but I actually have a loop */ +static int uas_submit_urbs(struct scsi_cmnd *cmnd, + struct uas_dev_info *devinfo, gfp_t gfp); + +static DEFINE_SPINLOCK(uas_work_lock); +static LIST_HEAD(uas_work_list); + +static void uas_do_work(struct work_struct *work) +{ + struct uas_cmd_info *cmdinfo; + struct list_head list; + + spin_lock_irq(&uas_work_lock); + list_replace_init(&uas_work_list, &list); + spin_unlock_irq(&uas_work_lock); + + list_for_each_entry(cmdinfo, &list, list) { + struct scsi_pointer *scp = (void *)cmdinfo; + struct scsi_cmnd *cmnd = container_of(scp, + struct scsi_cmnd, SCp); + uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_KERNEL); + } +} + +static DECLARE_WORK(uas_work, uas_do_work); + +static void uas_sense(struct urb *urb, struct scsi_cmnd *cmnd) +{ + struct sense_iu *sense_iu = urb->transfer_buffer; + struct scsi_device *sdev = cmnd->device; + + if (urb->actual_length > 16) { + unsigned len = be16_to_cpup(&sense_iu->len); + if (len + 16 != urb->actual_length) { + int newlen = min(len + 16, urb->actual_length) - 16; + if (newlen < 0) + newlen = 0; + sdev_printk(KERN_INFO, sdev, "%s: urb length %d " + "disagrees with IU sense data length %d, " + "using %d bytes of sense data\n", __func__, + urb->actual_length, len, newlen); + len = newlen; + } + memcpy(cmnd->sense_buffer, sense_iu->sense, len); + } + + cmnd->result = sense_iu->status; + if (sdev->current_cmnd) + sdev->current_cmnd = NULL; + cmnd->scsi_done(cmnd); + usb_free_urb(urb); +} + +static void uas_sense_old(struct urb *urb, struct scsi_cmnd *cmnd) +{ + struct sense_iu_old *sense_iu = urb->transfer_buffer; + struct scsi_device *sdev = cmnd->device; + + if (urb->actual_length > 8) { + unsigned len = be16_to_cpup(&sense_iu->len) - 2; + if (len + 8 != urb->actual_length) { + int newlen = min(len + 8, urb->actual_length) - 8; + if (newlen < 0) + newlen = 0; + sdev_printk(KERN_INFO, sdev, "%s: urb length %d " + "disagrees with IU sense data length %d, " + "using %d bytes of sense data\n", __func__, + urb->actual_length, len, newlen); + len = newlen; + } + memcpy(cmnd->sense_buffer, sense_iu->sense, len); + } + + cmnd->result = sense_iu->status; + if (sdev->current_cmnd) + sdev->current_cmnd = NULL; + cmnd->scsi_done(cmnd); + usb_free_urb(urb); +} + +static void uas_xfer_data(struct urb *urb, struct scsi_cmnd *cmnd, + unsigned direction) +{ + struct uas_cmd_info *cmdinfo = (void *)&cmnd->SCp; + int err; + + cmdinfo->state = direction | SUBMIT_SENSE_URB; + err = uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_ATOMIC); + if (err) { + spin_lock(&uas_work_lock); + list_add_tail(&cmdinfo->list, &uas_work_list); + spin_unlock(&uas_work_lock); + schedule_work(&uas_work); + } +} + +static void uas_stat_cmplt(struct urb *urb) +{ + struct iu *iu = urb->transfer_buffer; + struct scsi_device *sdev = urb->context; + struct uas_dev_info *devinfo = sdev->hostdata; + struct scsi_cmnd *cmnd; + u16 tag; + + if (urb->status) { + dev_err(&urb->dev->dev, "URB BAD STATUS %d\n", urb->status); + usb_free_urb(urb); + return; + } + + tag = be16_to_cpup(&iu->tag) - 1; + if (sdev->current_cmnd) + cmnd = sdev->current_cmnd; + else + cmnd = scsi_find_tag(sdev, tag); + if (!cmnd) + return; + + switch (iu->iu_id) { + case IU_ID_STATUS: + if (urb->actual_length < 16) + devinfo->uas_sense_old = 1; + if (devinfo->uas_sense_old) + uas_sense_old(urb, cmnd); + else + uas_sense(urb, cmnd); + break; + case IU_ID_READ_READY: + uas_xfer_data(urb, cmnd, SUBMIT_DATA_IN_URB); + break; + case IU_ID_WRITE_READY: + uas_xfer_data(urb, cmnd, SUBMIT_DATA_OUT_URB); + break; + default: + scmd_printk(KERN_ERR, cmnd, + "Bogus IU (%d) received on status pipe\n", iu->iu_id); + } +} + +static void uas_data_cmplt(struct urb *urb) +{ + struct scsi_data_buffer *sdb = urb->context; + sdb->resid = sdb->length - urb->actual_length; + usb_free_urb(urb); +} + +static struct urb *uas_alloc_data_urb(struct uas_dev_info *devinfo, gfp_t gfp, + unsigned int pipe, u16 stream_id, + struct scsi_data_buffer *sdb, + enum dma_data_direction dir) +{ + struct usb_device *udev = devinfo->udev; + struct urb *urb = usb_alloc_urb(0, gfp); + + if (!urb) + goto out; + usb_fill_bulk_urb(urb, udev, pipe, NULL, sdb->length, uas_data_cmplt, + sdb); + if (devinfo->use_streams) + urb->stream_id = stream_id; + urb->num_sgs = udev->bus->sg_tablesize ? sdb->table.nents : 0; + urb->sg = sdb->table.sgl; + out: + return urb; +} + +static struct urb *uas_alloc_sense_urb(struct uas_dev_info *devinfo, gfp_t gfp, + struct scsi_cmnd *cmnd, u16 stream_id) +{ + struct usb_device *udev = devinfo->udev; + struct urb *urb = usb_alloc_urb(0, gfp); + struct sense_iu *iu; + + if (!urb) + goto out; + + iu = kmalloc(sizeof(*iu), gfp); + if (!iu) + goto free; + + usb_fill_bulk_urb(urb, udev, devinfo->status_pipe, iu, sizeof(*iu), + uas_stat_cmplt, cmnd->device); + urb->stream_id = stream_id; + urb->transfer_flags |= URB_FREE_BUFFER; + out: + return urb; + free: + usb_free_urb(urb); + return NULL; +} + +static struct urb *uas_alloc_cmd_urb(struct uas_dev_info *devinfo, gfp_t gfp, + struct scsi_cmnd *cmnd, u16 stream_id) +{ + struct usb_device *udev = devinfo->udev; + struct scsi_device *sdev = cmnd->device; + struct urb *urb = usb_alloc_urb(0, gfp); + struct command_iu *iu; + int len; + + if (!urb) + goto out; + + len = cmnd->cmd_len - 16; + if (len < 0) + len = 0; + len = ALIGN(len, 4); + iu = kmalloc(sizeof(*iu) + len, gfp); + if (!iu) + goto free; + + iu->iu_id = IU_ID_COMMAND; + iu->tag = cpu_to_be16(stream_id); + if (sdev->ordered_tags && (cmnd->request->cmd_flags & REQ_HARDBARRIER)) + iu->prio_attr = UAS_ORDERED_TAG; + else + iu->prio_attr = UAS_SIMPLE_TAG; + iu->len = len; + int_to_scsilun(sdev->lun, &iu->lun); + memcpy(iu->cdb, cmnd->cmnd, cmnd->cmd_len); + + usb_fill_bulk_urb(urb, udev, devinfo->cmd_pipe, iu, sizeof(*iu) + len, + usb_free_urb, NULL); + urb->transfer_flags |= URB_FREE_BUFFER; + out: + return urb; + free: + usb_free_urb(urb); + return NULL; +} + +/* + * Why should I request the Status IU before sending the Command IU? Spec + * says to, but also says the device may receive them in any order. Seems + * daft to me. + */ + +static int uas_submit_urbs(struct scsi_cmnd *cmnd, + struct uas_dev_info *devinfo, gfp_t gfp) +{ + struct uas_cmd_info *cmdinfo = (void *)&cmnd->SCp; + + if (cmdinfo->state & ALLOC_SENSE_URB) { + cmdinfo->sense_urb = uas_alloc_sense_urb(devinfo, gfp, cmnd, + cmdinfo->stream); + if (!cmdinfo->sense_urb) + return SCSI_MLQUEUE_DEVICE_BUSY; + cmdinfo->state &= ~ALLOC_SENSE_URB; + } + + if (cmdinfo->state & SUBMIT_SENSE_URB) { + if (usb_submit_urb(cmdinfo->sense_urb, gfp)) { + scmd_printk(KERN_INFO, cmnd, + "sense urb submission failure\n"); + return SCSI_MLQUEUE_DEVICE_BUSY; + } + cmdinfo->state &= ~SUBMIT_SENSE_URB; + } + + if (cmdinfo->state & ALLOC_DATA_IN_URB) { + cmdinfo->data_in_urb = uas_alloc_data_urb(devinfo, gfp, + devinfo->data_in_pipe, cmdinfo->stream, + scsi_in(cmnd), DMA_FROM_DEVICE); + if (!cmdinfo->data_in_urb) + return SCSI_MLQUEUE_DEVICE_BUSY; + cmdinfo->state &= ~ALLOC_DATA_IN_URB; + } + + if (cmdinfo->state & SUBMIT_DATA_IN_URB) { + if (usb_submit_urb(cmdinfo->data_in_urb, gfp)) { + scmd_printk(KERN_INFO, cmnd, + "data in urb submission failure\n"); + return SCSI_MLQUEUE_DEVICE_BUSY; + } + cmdinfo->state &= ~SUBMIT_DATA_IN_URB; + } + + if (cmdinfo->state & ALLOC_DATA_OUT_URB) { + cmdinfo->data_out_urb = uas_alloc_data_urb(devinfo, gfp, + devinfo->data_out_pipe, cmdinfo->stream, + scsi_out(cmnd), DMA_TO_DEVICE); + if (!cmdinfo->data_out_urb) + return SCSI_MLQUEUE_DEVICE_BUSY; + cmdinfo->state &= ~ALLOC_DATA_OUT_URB; + } + + if (cmdinfo->state & SUBMIT_DATA_OUT_URB) { + if (usb_submit_urb(cmdinfo->data_out_urb, gfp)) { + scmd_printk(KERN_INFO, cmnd, + "data out urb submission failure\n"); + return SCSI_MLQUEUE_DEVICE_BUSY; + } + cmdinfo->state &= ~SUBMIT_DATA_OUT_URB; + } + + if (cmdinfo->state & ALLOC_CMD_URB) { + cmdinfo->cmd_urb = uas_alloc_cmd_urb(devinfo, gfp, cmnd, + cmdinfo->stream); + if (!cmdinfo->cmd_urb) + return SCSI_MLQUEUE_DEVICE_BUSY; + cmdinfo->state &= ~ALLOC_CMD_URB; + } + + if (cmdinfo->state & SUBMIT_CMD_URB) { + if (usb_submit_urb(cmdinfo->cmd_urb, gfp)) { + scmd_printk(KERN_INFO, cmnd, + "cmd urb submission failure\n"); + return SCSI_MLQUEUE_DEVICE_BUSY; + } + cmdinfo->state &= ~SUBMIT_CMD_URB; + } + + return 0; +} + +static int uas_queuecommand(struct scsi_cmnd *cmnd, + void (*done)(struct scsi_cmnd *)) +{ + struct scsi_device *sdev = cmnd->device; + struct uas_dev_info *devinfo = sdev->hostdata; + struct uas_cmd_info *cmdinfo = (void *)&cmnd->SCp; + int err; + + BUILD_BUG_ON(sizeof(struct uas_cmd_info) > sizeof(struct scsi_pointer)); + + if (!cmdinfo->sense_urb && sdev->current_cmnd) + return SCSI_MLQUEUE_DEVICE_BUSY; + + if (blk_rq_tagged(cmnd->request)) { + cmdinfo->stream = cmnd->request->tag + 1; + } else { + sdev->current_cmnd = cmnd; + cmdinfo->stream = 1; + } + + cmnd->scsi_done = done; + + cmdinfo->state = ALLOC_SENSE_URB | SUBMIT_SENSE_URB | + ALLOC_CMD_URB | SUBMIT_CMD_URB; + + switch (cmnd->sc_data_direction) { + case DMA_FROM_DEVICE: + cmdinfo->state |= ALLOC_DATA_IN_URB | SUBMIT_DATA_IN_URB; + break; + case DMA_BIDIRECTIONAL: + cmdinfo->state |= ALLOC_DATA_IN_URB | SUBMIT_DATA_IN_URB; + case DMA_TO_DEVICE: + cmdinfo->state |= ALLOC_DATA_OUT_URB | SUBMIT_DATA_OUT_URB; + case DMA_NONE: + break; + } + + if (!devinfo->use_streams) { + cmdinfo->state &= ~(SUBMIT_DATA_IN_URB | SUBMIT_DATA_OUT_URB); + cmdinfo->stream = 0; + } + + err = uas_submit_urbs(cmnd, devinfo, GFP_ATOMIC); + if (err) { + /* If we did nothing, give up now */ + if (cmdinfo->state & SUBMIT_SENSE_URB) { + usb_free_urb(cmdinfo->sense_urb); + return SCSI_MLQUEUE_DEVICE_BUSY; + } + spin_lock(&uas_work_lock); + list_add_tail(&cmdinfo->list, &uas_work_list); + spin_unlock(&uas_work_lock); + schedule_work(&uas_work); + } + + return 0; +} + +static int uas_eh_abort_handler(struct scsi_cmnd *cmnd) +{ + struct scsi_device *sdev = cmnd->device; + sdev_printk(KERN_INFO, sdev, "%s tag %d\n", __func__, + cmnd->request->tag); + +/* XXX: Send ABORT TASK Task Management command */ + return FAILED; +} + +static int uas_eh_device_reset_handler(struct scsi_cmnd *cmnd) +{ + struct scsi_device *sdev = cmnd->device; + sdev_printk(KERN_INFO, sdev, "%s tag %d\n", __func__, + cmnd->request->tag); + +/* XXX: Send LOGICAL UNIT RESET Task Management command */ + return FAILED; +} + +static int uas_eh_target_reset_handler(struct scsi_cmnd *cmnd) +{ + struct scsi_device *sdev = cmnd->device; + sdev_printk(KERN_INFO, sdev, "%s tag %d\n", __func__, + cmnd->request->tag); + +/* XXX: Can we reset just the one USB interface? + * Would calling usb_set_interface() have the right effect? + */ + return FAILED; +} + +static int uas_eh_bus_reset_handler(struct scsi_cmnd *cmnd) +{ + struct scsi_device *sdev = cmnd->device; + struct uas_dev_info *devinfo = sdev->hostdata; + struct usb_device *udev = devinfo->udev; + + sdev_printk(KERN_INFO, sdev, "%s tag %d\n", __func__, + cmnd->request->tag); + + if (usb_reset_device(udev)) + return SUCCESS; + + return FAILED; +} + +static int uas_slave_alloc(struct scsi_device *sdev) +{ + sdev->hostdata = (void *)sdev->host->hostdata[0]; + return 0; +} + +static int uas_slave_configure(struct scsi_device *sdev) +{ + struct uas_dev_info *devinfo = sdev->hostdata; + scsi_set_tag_type(sdev, MSG_ORDERED_TAG); + scsi_activate_tcq(sdev, devinfo->qdepth - 1); + return 0; +} + +static struct scsi_host_template uas_host_template = { + .module = THIS_MODULE, + .name = "uas", + .queuecommand = uas_queuecommand, + .slave_alloc = uas_slave_alloc, + .slave_configure = uas_slave_configure, + .eh_abort_handler = uas_eh_abort_handler, + .eh_device_reset_handler = uas_eh_device_reset_handler, + .eh_target_reset_handler = uas_eh_target_reset_handler, + .eh_bus_reset_handler = uas_eh_bus_reset_handler, + .can_queue = 65536, /* Is there a limit on the _host_ ? */ + .this_id = -1, + .sg_tablesize = SG_NONE, + .cmd_per_lun = 1, /* until we override it */ + .skip_settle_delay = 1, + .ordered_tag = 1, +}; + +static struct usb_device_id uas_usb_ids[] = { + { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, USB_SC_SCSI, USB_PR_BULK) }, + { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, USB_SC_SCSI, USB_PR_UAS) }, + /* 0xaa is a prototype device I happen to have access to */ + { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, USB_SC_SCSI, 0xaa) }, + { } +}; +MODULE_DEVICE_TABLE(usb, uas_usb_ids); + +static void uas_configure_endpoints(struct uas_dev_info *devinfo) +{ + struct usb_host_endpoint *eps[4] = { }; + struct usb_interface *intf = devinfo->intf; + struct usb_device *udev = devinfo->udev; + struct usb_host_endpoint *endpoint = intf->cur_altsetting->endpoint; + unsigned i, n_endpoints = intf->cur_altsetting->desc.bNumEndpoints; + + devinfo->uas_sense_old = 0; + + for (i = 0; i < n_endpoints; i++) { + unsigned char *extra = endpoint[i].extra; + int len = endpoint[i].extralen; + while (len > 1) { + if (extra[1] == USB_DT_PIPE_USAGE) { + unsigned pipe_id = extra[2]; + if (pipe_id > 0 && pipe_id < 5) + eps[pipe_id - 1] = &endpoint[i]; + break; + } + len -= extra[0]; + extra += extra[0]; + } + } + + /* + * Assume that if we didn't find a control pipe descriptor, we're + * using a device with old firmware that happens to be set up like + * this. + */ + if (!eps[0]) { + devinfo->cmd_pipe = usb_sndbulkpipe(udev, 1); + devinfo->status_pipe = usb_rcvbulkpipe(udev, 1); + devinfo->data_in_pipe = usb_rcvbulkpipe(udev, 2); + devinfo->data_out_pipe = usb_sndbulkpipe(udev, 2); + + eps[1] = usb_pipe_endpoint(udev, devinfo->status_pipe); + eps[2] = usb_pipe_endpoint(udev, devinfo->data_in_pipe); + eps[3] = usb_pipe_endpoint(udev, devinfo->data_out_pipe); + } else { + devinfo->cmd_pipe = usb_sndbulkpipe(udev, + eps[0]->desc.bEndpointAddress); + devinfo->status_pipe = usb_rcvbulkpipe(udev, + eps[1]->desc.bEndpointAddress); + devinfo->data_in_pipe = usb_rcvbulkpipe(udev, + eps[2]->desc.bEndpointAddress); + devinfo->data_out_pipe = usb_sndbulkpipe(udev, + eps[3]->desc.bEndpointAddress); + } + + devinfo->qdepth = usb_alloc_streams(devinfo->intf, eps + 1, 3, 256, + GFP_KERNEL); + if (devinfo->qdepth < 0) { + devinfo->qdepth = 256; + devinfo->use_streams = 0; + } else { + devinfo->use_streams = 1; + } +} + +/* + * XXX: What I'd like to do here is register a SCSI host for each USB host in + * the system. Follow usb-storage's design of registering a SCSI host for + * each USB device for the moment. Can implement this by walking up the + * USB hierarchy until we find a USB host. + */ +static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id) +{ + int result; + struct Scsi_Host *shost; + struct uas_dev_info *devinfo; + struct usb_device *udev = interface_to_usbdev(intf); + + if (id->bInterfaceProtocol == 0x50) { + int ifnum = intf->cur_altsetting->desc.bInterfaceNumber; +/* XXX: Shouldn't assume that 1 is the alternative we want */ + int ret = usb_set_interface(udev, ifnum, 1); + if (ret) + return -ENODEV; + } + + devinfo = kmalloc(sizeof(struct uas_dev_info), GFP_KERNEL); + if (!devinfo) + return -ENOMEM; + + result = -ENOMEM; + shost = scsi_host_alloc(&uas_host_template, sizeof(void *)); + if (!shost) + goto free; + + shost->max_cmd_len = 16 + 252; + shost->max_id = 1; + shost->sg_tablesize = udev->bus->sg_tablesize; + + result = scsi_add_host(shost, &intf->dev); + if (result) + goto free; + shost->hostdata[0] = (unsigned long)devinfo; + + devinfo->intf = intf; + devinfo->udev = udev; + uas_configure_endpoints(devinfo); + + scsi_scan_host(shost); + usb_set_intfdata(intf, shost); + return result; + free: + kfree(devinfo); + if (shost) + scsi_host_put(shost); + return result; +} + +static int uas_pre_reset(struct usb_interface *intf) +{ +/* XXX: Need to return 1 if it's not our device in error handling */ + return 0; +} + +static int uas_post_reset(struct usb_interface *intf) +{ +/* XXX: Need to return 1 if it's not our device in error handling */ + return 0; +} + +static void uas_disconnect(struct usb_interface *intf) +{ + struct usb_device *udev = interface_to_usbdev(intf); + struct usb_host_endpoint *eps[3]; + struct Scsi_Host *shost = usb_get_intfdata(intf); + struct uas_dev_info *devinfo = (void *)shost->hostdata[0]; + + scsi_remove_host(shost); + + eps[0] = usb_pipe_endpoint(udev, devinfo->status_pipe); + eps[1] = usb_pipe_endpoint(udev, devinfo->data_in_pipe); + eps[2] = usb_pipe_endpoint(udev, devinfo->data_out_pipe); + usb_free_streams(intf, eps, 3, GFP_KERNEL); + + kfree(devinfo); +} + +/* + * XXX: Should this plug into libusual so we can auto-upgrade devices from + * Bulk-Only to UAS? + */ +static struct usb_driver uas_driver = { + .name = "uas", + .probe = uas_probe, + .disconnect = uas_disconnect, + .pre_reset = uas_pre_reset, + .post_reset = uas_post_reset, + .id_table = uas_usb_ids, +}; + +static int uas_init(void) +{ + return usb_register(&uas_driver); +} + +static void uas_exit(void) +{ + usb_deregister(&uas_driver); +} + +module_init(uas_init); +module_exit(uas_exit); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Matthew Wilcox and Sarah Sharp"); diff --git a/drivers/usb/storage/unusual_alauda.h b/drivers/usb/storage/unusual_alauda.h index 8c412f8..fa3e9ed 100644 --- a/drivers/usb/storage/unusual_alauda.h +++ b/drivers/usb/storage/unusual_alauda.h @@ -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) || ... */ diff --git a/drivers/usb/storage/unusual_cypress.h b/drivers/usb/storage/unusual_cypress.h index 44be6d7..c854fde 100644 --- a/drivers/usb/storage/unusual_cypress.h +++ b/drivers/usb/storage/unusual_cypress.h @@ -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) || ... */ diff --git a/drivers/usb/storage/unusual_datafab.h b/drivers/usb/storage/unusual_datafab.h index c9298ce..582a603 100644 --- a/drivers/usb/storage/unusual_datafab.h +++ b/drivers/usb/storage/unusual_datafab.h @@ -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) || ... */ diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 2c897ee..6ccdd3d 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -63,26 +63,26 @@ UNUSUAL_DEV( 0x03eb, 0x2002, 0x0100, 0x0100, "ATMEL", "SND1 Storage", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE), /* Reported by Rodolfo Quesada <rquesada@roqz.net> */ UNUSUAL_DEV( 0x03ee, 0x6906, 0x0003, 0x0003, "VIA Technologies Inc.", "Mitsumi multi cardreader", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), UNUSUAL_DEV( 0x03f0, 0x0107, 0x0200, 0x0200, "HP", "CD-Writer+", - US_SC_8070, US_PR_CB, NULL, 0), + USB_SC_8070, USB_PR_CB, NULL, 0), /* Reported by Ben Efros <ben@pc-doctor.com> */ UNUSUAL_DEV( 0x03f0, 0x070c, 0x0000, 0x0000, "HP", "Personal Media Drive", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SANE_SENSE ), /* Reported by Grant Grundler <grundler@parisc-linux.org> @@ -91,7 +91,7 @@ UNUSUAL_DEV( 0x03f0, 0x070c, 0x0000, 0x0000, UNUSUAL_DEV( 0x03f0, 0x4002, 0x0001, 0x0001, "HP", "PhotoSmart R707", - US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), /* Reported by Sebastian Kapfer <sebastian_kapfer@gmx.net> * and Olaf Hering <olh@suse.de> (different bcd's, same vendor/product) @@ -100,14 +100,14 @@ UNUSUAL_DEV( 0x03f0, 0x4002, 0x0001, 0x0001, UNUSUAL_DEV( 0x0409, 0x0040, 0x0000, 0x9999, "NEC", "NEC USB UF000x", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Patch submitted by Mihnea-Costin Grigore <mihnea@zulu.ro> */ UNUSUAL_DEV( 0x040d, 0x6205, 0x0003, 0x0003, "VIA Technologies Inc.", "USB 2.0 Card Reader", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Deduced by Jonathan Woithe <jwoithe@physics.adelaide.edu.au> @@ -117,40 +117,40 @@ UNUSUAL_DEV( 0x040d, 0x6205, 0x0003, 0x0003, UNUSUAL_DEV( 0x0411, 0x001c, 0x0113, 0x0113, "Buffalo", "DUB-P40G HDD", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* Submitted by Ernestas Vaiciukevicius <ernisv@gmail.com> */ UNUSUAL_DEV( 0x0419, 0x0100, 0x0100, 0x0100, "Samsung Info. Systems America, Inc.", "MP3 Player", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Orgad Shaneh <orgads@gmail.com> */ UNUSUAL_DEV( 0x0419, 0xaace, 0x0100, 0x0100, "Samsung", "MP3 Player", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Christian Leber <christian@leber.de> */ UNUSUAL_DEV( 0x0419, 0xaaf5, 0x0100, 0x0100, "TrekStor", "i.Beat 115 2.0", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_NOT_LOCKABLE ), /* Reported by Stefan Werner <dustbln@gmx.de> */ UNUSUAL_DEV( 0x0419, 0xaaf6, 0x0100, 0x0100, "TrekStor", "i.Beat Joy 2.0", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Pete Zaitcev <zaitcev@redhat.com>, bz#176584 */ UNUSUAL_DEV( 0x0420, 0x0001, 0x0100, 0x0100, "GENERIC", "MP3 PLAYER", /* MyMusix PD-205 on the outside. */ - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Andrew Nayenko <relan@bk.ru> @@ -158,28 +158,28 @@ UNUSUAL_DEV( 0x0420, 0x0001, 0x0100, 0x0100, UNUSUAL_DEV( 0x0421, 0x0019, 0x0592, 0x0610, "Nokia", "Nokia 6288", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* Reported by Mario Rettig <mariorettig@web.de> */ UNUSUAL_DEV( 0x0421, 0x042e, 0x0100, 0x0100, "Nokia", "Nokia 3250", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), /* Reported by <honkkis@gmail.com> */ UNUSUAL_DEV( 0x0421, 0x0433, 0x0100, 0x0100, "Nokia", "E70", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), /* Reported by Jon Hart <Jon.Hart@web.de> */ UNUSUAL_DEV( 0x0421, 0x0434, 0x0100, 0x0100, "Nokia", "E60", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), /* Reported by Sumedha Swamy <sumedhaswamy@gmail.com> and @@ -187,7 +187,7 @@ UNUSUAL_DEV( 0x0421, 0x0434, 0x0100, 0x0100, UNUSUAL_DEV( 0x0421, 0x0444, 0x0100, 0x0100, "Nokia", "N91", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), /* Reported by Jiri Slaby <jirislaby@gmail.com> and @@ -195,42 +195,42 @@ UNUSUAL_DEV( 0x0421, 0x0444, 0x0100, 0x0100, UNUSUAL_DEV( 0x0421, 0x0446, 0x0100, 0x0100, "Nokia", "N80", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), /* Reported by Matthew Bloch <matthew@bytemark.co.uk> */ UNUSUAL_DEV( 0x0421, 0x044e, 0x0100, 0x0100, "Nokia", "E61", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), /* Reported by Bardur Arantsson <bardur@scientician.net> */ UNUSUAL_DEV( 0x0421, 0x047c, 0x0370, 0x0610, "Nokia", "6131", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* Reported by Manuel Osdoba <manuel.osdoba@tu-ilmenau.de> */ UNUSUAL_DEV( 0x0421, 0x0492, 0x0452, 0x9999, "Nokia", "Nokia 6233", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* Reported by Alex Corcoles <alex@corcoles.net> */ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x0370, "Nokia", "6234", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), #ifdef NO_SDDR09 UNUSUAL_DEV( 0x0436, 0x0005, 0x0100, 0x0100, "Microtech", "CameraMate", - US_SC_SCSI, US_PR_CB, NULL, + USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN ), #endif @@ -239,7 +239,7 @@ UNUSUAL_DEV( 0x0436, 0x0005, 0x0100, 0x0100, UNUSUAL_DEV( 0x0451, 0x5416, 0x0100, 0x0100, "Neuros Audio", "USB 2.0 HD 2.5", - US_SC_DEVICE, US_PR_BULK, NULL, + USB_SC_DEVICE, USB_PR_BULK, NULL, US_FL_NEED_OVERRIDE ), /* @@ -250,7 +250,7 @@ UNUSUAL_DEV( 0x0451, 0x5416, 0x0100, 0x0100, UNUSUAL_DEV( 0x0457, 0x0150, 0x0100, 0x0100, "USBest Technology", /* sold by Transcend */ "USB Mass Storage Device", - US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), /* * Bohdan Linda <bohdan.linda@gmail.com> @@ -260,7 +260,7 @@ UNUSUAL_DEV( 0x0457, 0x0150, 0x0100, 0x0100, UNUSUAL_DEV( 0x0457, 0x0151, 0x0100, 0x0100, "USB 2.0", "Flash Disk", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), /* Reported by Tamas Kerecsen <kerecsen@bigfoot.com> @@ -272,7 +272,7 @@ UNUSUAL_DEV( 0x0457, 0x0151, 0x0100, 0x0100, UNUSUAL_DEV( 0x045e, 0xffff, 0x0000, 0x0000, "Mitac", "GPS", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* @@ -284,32 +284,32 @@ UNUSUAL_DEV( 0x045e, 0xffff, 0x0000, 0x0000, UNUSUAL_DEV( 0x046b, 0xff40, 0x0100, 0x0100, "AMI", "Virtual Floppy", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_WP_DETECT), /* Patch submitted by Philipp Friedrich <philipp@void.at> */ UNUSUAL_DEV( 0x0482, 0x0100, 0x0100, 0x0100, "Kyocera", "Finecam S3x", - US_SC_8070, US_PR_CB, NULL, US_FL_FIX_INQUIRY), + USB_SC_8070, USB_PR_CB, NULL, US_FL_FIX_INQUIRY), /* Patch submitted by Philipp Friedrich <philipp@void.at> */ UNUSUAL_DEV( 0x0482, 0x0101, 0x0100, 0x0100, "Kyocera", "Finecam S4", - US_SC_8070, US_PR_CB, NULL, US_FL_FIX_INQUIRY), + USB_SC_8070, USB_PR_CB, NULL, US_FL_FIX_INQUIRY), /* Patch submitted by Stephane Galles <stephane.galles@free.fr> */ UNUSUAL_DEV( 0x0482, 0x0103, 0x0100, 0x0100, "Kyocera", "Finecam S5", - US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), /* Patch submitted by Jens Taprogge <jens.taprogge@taprogge.org> */ UNUSUAL_DEV( 0x0482, 0x0107, 0x0100, 0x0100, "Kyocera", "CONTAX SL300R T*", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE), /* Reported by Paul Stewart <stewart@wetlogic.net> @@ -317,7 +317,7 @@ UNUSUAL_DEV( 0x0482, 0x0107, 0x0100, 0x0100, UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001, "Hitachi", "DVD-CAM DZ-MV100A Camcorder", - US_SC_SCSI, US_PR_CB, NULL, US_FL_SINGLE_LUN), + USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN), /* BENQ DC5330 * Reported by Manuel Fombuena <mfombuena@ya.com> and @@ -325,7 +325,7 @@ UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001, UNUSUAL_DEV( 0x04a5, 0x3010, 0x0100, 0x0100, "Tekom Technologies, Inc", "300_CAMERA", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Patch for Nikon coolpix 2000 @@ -333,14 +333,14 @@ UNUSUAL_DEV( 0x04a5, 0x3010, 0x0100, 0x0100, UNUSUAL_DEV( 0x04b0, 0x0301, 0x0010, 0x0010, "NIKON", "NIKON DSC E2000", - US_SC_DEVICE, US_PR_DEVICE,NULL, + USB_SC_DEVICE, USB_PR_DEVICE,NULL, US_FL_NOT_LOCKABLE ), /* Reported by Doug Maxey (dwm@austin.ibm.com) */ UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x0110, "IBM", "IBM RSA2", - US_SC_DEVICE, US_PR_CB, NULL, + USB_SC_DEVICE, USB_PR_CB, NULL, US_FL_MAX_SECTORS_MIN), /* Reported by Simon Levitt <simon@whattf.com> @@ -348,14 +348,14 @@ UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x0110, UNUSUAL_DEV( 0x04b8, 0x0601, 0x0100, 0x0100, "Epson", "875DC Storage", - US_SC_SCSI, US_PR_CB, NULL, US_FL_FIX_INQUIRY), + USB_SC_SCSI, USB_PR_CB, NULL, US_FL_FIX_INQUIRY), /* Reported by Khalid Aziz <khalid@gonehiking.org> * This entry is needed because the device reports Sub=ff */ UNUSUAL_DEV( 0x04b8, 0x0602, 0x0110, 0x0110, "Epson", "785EPX Storage", - US_SC_SCSI, US_PR_BULK, NULL, US_FL_SINGLE_LUN), + USB_SC_SCSI, USB_PR_BULK, NULL, US_FL_SINGLE_LUN), /* Not sure who reported this originally but * Pavel Machek <pavel@ucw.cz> reported that the extra US_FL_SINGLE_LUN @@ -363,7 +363,7 @@ UNUSUAL_DEV( 0x04b8, 0x0602, 0x0110, 0x0110, UNUSUAL_DEV( 0x04cb, 0x0100, 0x0000, 0x2210, "Fujifilm", "FinePix 1400Zoom", - US_SC_UFI, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_SINGLE_LUN), + USB_SC_UFI, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_SINGLE_LUN), /* Reported by Ondrej Zary <linux@rainbow-software.org> * The device reports one sector more and breaks when that sector is accessed @@ -371,7 +371,7 @@ UNUSUAL_DEV( 0x04cb, 0x0100, 0x0000, 0x2210, UNUSUAL_DEV( 0x04ce, 0x0002, 0x026c, 0x026c, "ScanLogic", "SL11R-IDE", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), /* Reported by Kriston Fincher <kriston@airmail.net> @@ -382,27 +382,27 @@ UNUSUAL_DEV( 0x04ce, 0x0002, 0x026c, 0x026c, UNUSUAL_DEV( 0x04da, 0x0901, 0x0100, 0x0200, "Panasonic", "LS-120 Camera", - US_SC_UFI, US_PR_DEVICE, NULL, 0), + USB_SC_UFI, USB_PR_DEVICE, NULL, 0), /* From Yukihiro Nakai, via zaitcev@yahoo.com. * This is needed for CB instead of CBI */ UNUSUAL_DEV( 0x04da, 0x0d05, 0x0000, 0x0000, "Sharp CE-CW05", "CD-R/RW Drive", - US_SC_8070, US_PR_CB, NULL, 0), + USB_SC_8070, USB_PR_CB, NULL, 0), /* Reported by Adriaan Penning <a.penning@luon.net> */ UNUSUAL_DEV( 0x04da, 0x2372, 0x0000, 0x9999, "Panasonic", "DMC-LCx Camera", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE ), /* Reported by Simeon Simeonov <simeonov_2000@yahoo.com> */ UNUSUAL_DEV( 0x04da, 0x2373, 0x0000, 0x9999, "LEICA", "D-LUX Camera", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE ), /* Most of the following entries were developed with the help of @@ -411,19 +411,19 @@ UNUSUAL_DEV( 0x04da, 0x2373, 0x0000, 0x9999, UNUSUAL_DEV( 0x04e6, 0x0001, 0x0200, 0x0200, "Matshita", "LS-120", - US_SC_8020, US_PR_CB, NULL, 0), + USB_SC_8020, USB_PR_CB, NULL, 0), UNUSUAL_DEV( 0x04e6, 0x0002, 0x0100, 0x0100, "Shuttle", "eUSCSI Bridge", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_euscsi_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), #ifdef NO_SDDR09 UNUSUAL_DEV( 0x04e6, 0x0005, 0x0100, 0x0208, "SCM Microsystems", "eUSB CompactFlash Adapter", - US_SC_SCSI, US_PR_CB, NULL, + USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN), #endif @@ -431,54 +431,54 @@ UNUSUAL_DEV( 0x04e6, 0x0005, 0x0100, 0x0208, UNUSUAL_DEV( 0x04e6, 0x0006, 0x0100, 0x0100, "SCM Microsystems Inc.", "eUSB MMC Adapter", - US_SC_SCSI, US_PR_CB, NULL, + USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN), /* Reported by Daniel Nouri <dpunktnpunkt@web.de> */ UNUSUAL_DEV( 0x04e6, 0x0006, 0x0205, 0x0205, "Shuttle", "eUSB MMC Adapter", - US_SC_SCSI, US_PR_DEVICE, NULL, + USB_SC_SCSI, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN), UNUSUAL_DEV( 0x04e6, 0x0007, 0x0100, 0x0200, "Sony", "Hifd", - US_SC_SCSI, US_PR_CB, NULL, + USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN), UNUSUAL_DEV( 0x04e6, 0x0009, 0x0200, 0x0200, "Shuttle", "eUSB ATA/ATAPI Adapter", - US_SC_8020, US_PR_CB, NULL, 0), + USB_SC_8020, USB_PR_CB, NULL, 0), UNUSUAL_DEV( 0x04e6, 0x000a, 0x0200, 0x0200, "Shuttle", "eUSB CompactFlash Adapter", - US_SC_8020, US_PR_CB, NULL, 0), + USB_SC_8020, USB_PR_CB, NULL, 0), UNUSUAL_DEV( 0x04e6, 0x000B, 0x0100, 0x0100, "Shuttle", "eUSCSI Bridge", - US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init, + USB_SC_SCSI, USB_PR_BULK, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), UNUSUAL_DEV( 0x04e6, 0x000C, 0x0100, 0x0100, "Shuttle", "eUSCSI Bridge", - US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init, + USB_SC_SCSI, USB_PR_BULK, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), UNUSUAL_DEV( 0x04e6, 0x0101, 0x0200, 0x0200, "Shuttle", "CD-RW Device", - US_SC_8020, US_PR_CB, NULL, 0), + USB_SC_8020, USB_PR_CB, NULL, 0), /* Reported by Dmitry Khlystov <adminimus@gmail.com> */ UNUSUAL_DEV( 0x04e8, 0x507c, 0x0220, 0x0220, "Samsung", "YP-U3", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64), /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. @@ -488,14 +488,14 @@ UNUSUAL_DEV( 0x04e8, 0x507c, 0x0220, 0x0220, UNUSUAL_DEV( 0x04fc, 0x80c2, 0x0100, 0x0100, "Kobian Mercury", "Binocam DCB-132", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BULK32), /* Reported by Bob Sass <rls@vectordb.com> -- only rev 1.33 tested */ UNUSUAL_DEV( 0x050d, 0x0115, 0x0133, 0x0133, "Belkin", "USB SCSI Adaptor", - US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init, + USB_SC_SCSI, USB_PR_BULK, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), /* Iomega Clik! Drive @@ -505,14 +505,14 @@ UNUSUAL_DEV( 0x050d, 0x0115, 0x0133, 0x0133, UNUSUAL_DEV( 0x0525, 0xa140, 0x0100, 0x0100, "Iomega", "USB Clik! 40", - US_SC_8070, US_PR_DEVICE, NULL, + USB_SC_8070, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* Added by Alan Stern <stern@rowland.harvard.edu> */ COMPLIANT_DEV(0x0525, 0xa4a5, 0x0000, 0x9999, "Linux", "File-backed Storage Gadget", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_CAPACITY_OK ), /* Yakumo Mega Image 37 @@ -520,7 +520,7 @@ COMPLIANT_DEV(0x0525, 0xa4a5, 0x0000, 0x9999, UNUSUAL_DEV( 0x052b, 0x1801, 0x0100, 0x0100, "Tekom Technologies, Inc", "300_CAMERA", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Another Yakumo camera. @@ -528,14 +528,14 @@ UNUSUAL_DEV( 0x052b, 0x1801, 0x0100, 0x0100, UNUSUAL_DEV( 0x052b, 0x1804, 0x0100, 0x0100, "Tekom Technologies, Inc", "300_CAMERA", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Iacopo Spalletti <avvisi@spalletti.it> */ UNUSUAL_DEV( 0x052b, 0x1807, 0x0100, 0x0100, "Tekom Technologies, Inc", "300_CAMERA", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Yakumo Mega Image 47 @@ -543,7 +543,7 @@ UNUSUAL_DEV( 0x052b, 0x1807, 0x0100, 0x0100, UNUSUAL_DEV( 0x052b, 0x1905, 0x0100, 0x0100, "Tekom Technologies, Inc", "400_CAMERA", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Paul Ortyl <ortylp@3miasto.net> @@ -551,13 +551,13 @@ UNUSUAL_DEV( 0x052b, 0x1905, 0x0100, 0x0100, UNUSUAL_DEV( 0x052b, 0x1911, 0x0100, 0x0100, "Tekom Technologies, Inc", "400_CAMERA", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), UNUSUAL_DEV( 0x054c, 0x0010, 0x0106, 0x0450, "Sony", "DSC-S30/S70/S75/505V/F505/F707/F717/P8", - US_SC_SCSI, US_PR_DEVICE, NULL, + USB_SC_SCSI, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN | US_FL_NOT_LOCKABLE | US_FL_NO_WP_DETECT ), /* Submitted by Lars Jacob <jacob.lars@googlemail.com> @@ -565,7 +565,7 @@ UNUSUAL_DEV( 0x054c, 0x0010, 0x0106, 0x0450, UNUSUAL_DEV( 0x054c, 0x0010, 0x0500, 0x0610, "Sony", "DSC-T1/T5/H5", - US_SC_8070, US_PR_DEVICE, NULL, + USB_SC_8070, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), @@ -573,88 +573,88 @@ UNUSUAL_DEV( 0x054c, 0x0010, 0x0500, 0x0610, UNUSUAL_DEV( 0x054c, 0x0025, 0x0100, 0x0100, "Sony", "Memorystick NW-MS7", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Submitted by Olaf Hering, <olh@suse.de> SuSE Bugzilla #49049 */ UNUSUAL_DEV( 0x054c, 0x002c, 0x0501, 0x2000, "Sony", "USB Floppy Drive", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), UNUSUAL_DEV( 0x054c, 0x002d, 0x0100, 0x0100, "Sony", "Memorystick MSAC-US1", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Submitted by Klaus Mueller <k.mueller@intershop.de> */ UNUSUAL_DEV( 0x054c, 0x002e, 0x0106, 0x0310, "Sony", "Handycam", - US_SC_SCSI, US_PR_DEVICE, NULL, + USB_SC_SCSI, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Submitted by Rajesh Kumble Nayak <nayak@obs-nice.fr> */ UNUSUAL_DEV( 0x054c, 0x002e, 0x0500, 0x0500, "Sony", "Handycam HC-85", - US_SC_UFI, US_PR_DEVICE, NULL, + USB_SC_UFI, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), UNUSUAL_DEV( 0x054c, 0x0032, 0x0000, 0x9999, "Sony", "Memorystick MSC-U01N", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Submitted by Michal Mlotek <mlotek@foobar.pl> */ UNUSUAL_DEV( 0x054c, 0x0058, 0x0000, 0x9999, "Sony", "PEG N760c Memorystick", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), UNUSUAL_DEV( 0x054c, 0x0069, 0x0000, 0x9999, "Sony", "Memorystick MSC-U03", - US_SC_UFI, US_PR_CB, NULL, + USB_SC_UFI, USB_PR_CB, NULL, US_FL_SINGLE_LUN ), /* Submitted by Nathan Babb <nathan@lexi.com> */ UNUSUAL_DEV( 0x054c, 0x006d, 0x0000, 0x9999, "Sony", "PEG Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* Submitted by Frank Engel <frankie@cse.unsw.edu.au> */ UNUSUAL_DEV( 0x054c, 0x0099, 0x0000, 0x9999, "Sony", "PEG Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* Submitted by Mike Alborn <malborn@deandra.homeip.net> */ UNUSUAL_DEV( 0x054c, 0x016a, 0x0000, 0x9999, "Sony", "PEG Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* floppy reports multiple luns */ UNUSUAL_DEV( 0x055d, 0x2020, 0x0000, 0x0210, "SAMSUNG", "SFD-321U [FW 0C]", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* We keep this entry to force the transport; firmware 3.00 and later is ok. */ UNUSUAL_DEV( 0x057b, 0x0000, 0x0000, 0x0299, "Y-E Data", "Flashbuster-U", - US_SC_DEVICE, US_PR_CB, NULL, + USB_SC_DEVICE, USB_PR_CB, NULL, US_FL_SINGLE_LUN), /* Reported by Johann Cardon <johann.cardon@free.fr> @@ -664,20 +664,20 @@ UNUSUAL_DEV( 0x057b, 0x0000, 0x0000, 0x0299, UNUSUAL_DEV( 0x057b, 0x0022, 0x0000, 0x9999, "Y-E Data", "Silicon Media R/W", - US_SC_DEVICE, US_PR_DEVICE, NULL, 0), + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0), /* Reported by RTE <raszilki@yandex.ru> */ UNUSUAL_DEV( 0x058f, 0x6387, 0x0141, 0x0141, "JetFlash", "TS1GJF2A/120", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* Fabrizio Fellini <fello@libero.it> */ UNUSUAL_DEV( 0x0595, 0x4343, 0x0000, 0x2210, "Fujifilm", "Digital Camera EX-20 DSC", - US_SC_8070, US_PR_DEVICE, NULL, 0 ), + USB_SC_8070, USB_PR_DEVICE, NULL, 0 ), /* Reported by Andre Welter <a.r.welter@gmx.de> * This antique device predates the release of the Bulk-only Transport @@ -688,14 +688,14 @@ UNUSUAL_DEV( 0x0595, 0x4343, 0x0000, 0x2210, UNUSUAL_DEV( 0x059b, 0x0001, 0x0100, 0x0100, "Iomega", "ZIP 100", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Reported by <Hendryk.Pfeiffer@gmx.de> */ UNUSUAL_DEV( 0x059f, 0x0643, 0x0000, 0x0000, "LaCie", "DVD+-RW", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_GO_SLOW ), /* Submitted by Joel Bourquard <numlock@freesurf.ch> @@ -705,7 +705,7 @@ UNUSUAL_DEV( 0x059f, 0x0643, 0x0000, 0x0000, UNUSUAL_DEV( 0x05ab, 0x0060, 0x1104, 0x1110, "In-System", "PyroGate External CD-ROM Enclosure (FCD-523)", - US_SC_SCSI, US_PR_BULK, NULL, + USB_SC_SCSI, USB_PR_BULK, NULL, US_FL_NEED_OVERRIDE ), /* Submitted by Sven Anderson <sven-linux@anderson.de> @@ -717,26 +717,26 @@ UNUSUAL_DEV( 0x05ab, 0x0060, 0x1104, 0x1110, UNUSUAL_DEV( 0x05ac, 0x1202, 0x0000, 0x9999, "Apple", "iPod", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), /* Reported by Avi Kivity <avi@argo.co.il> */ UNUSUAL_DEV( 0x05ac, 0x1203, 0x0000, 0x9999, "Apple", "iPod", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), UNUSUAL_DEV( 0x05ac, 0x1204, 0x0000, 0x9999, "Apple", "iPod", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE ), UNUSUAL_DEV( 0x05ac, 0x1205, 0x0000, 0x9999, "Apple", "iPod", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), /* @@ -746,7 +746,7 @@ UNUSUAL_DEV( 0x05ac, 0x1205, 0x0000, 0x9999, UNUSUAL_DEV( 0x05ac, 0x120a, 0x0000, 0x9999, "Apple", "iPod", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), /* Reported by Dan Williams <dcbw@redhat.com> @@ -758,14 +758,14 @@ UNUSUAL_DEV( 0x05ac, 0x120a, 0x0000, 0x9999, UNUSUAL_DEV( 0x05c6, 0x1000, 0x0000, 0x9999, "Option N.V.", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, option_ms_init, + USB_SC_DEVICE, USB_PR_DEVICE, option_ms_init, 0), /* Reported by Blake Matheny <bmatheny@purdue.edu> */ UNUSUAL_DEV( 0x05dc, 0xb002, 0x0000, 0x0113, "Lexar", "USB CF Reader", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* The following two entries are for a Genesys USB to IDE @@ -782,20 +782,20 @@ UNUSUAL_DEV( 0x05dc, 0xb002, 0x0000, 0x0113, UNUSUAL_DEV( 0x05e3, 0x0701, 0x0000, 0xffff, "Genesys Logic", "USB to IDE Optical", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_GO_SLOW | US_FL_MAX_SECTORS_64 | US_FL_IGNORE_RESIDUE ), UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0xffff, "Genesys Logic", "USB to IDE Disk", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_GO_SLOW | US_FL_MAX_SECTORS_64 | US_FL_IGNORE_RESIDUE ), /* Reported by Ben Efros <ben@pc-doctor.com> */ UNUSUAL_DEV( 0x05e3, 0x0723, 0x9451, 0x9451, "Genesys Logic", "USB to SATA", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SANE_SENSE ), /* Reported by Hanno Boeck <hanno@gmx.de> @@ -803,33 +803,33 @@ UNUSUAL_DEV( 0x05e3, 0x0723, 0x9451, 0x9451, UNUSUAL_DEV( 0x0636, 0x0003, 0x0000, 0x9999, "Vivitar", "Vivicam 35Xx", - US_SC_SCSI, US_PR_BULK, NULL, + USB_SC_SCSI, USB_PR_BULK, NULL, US_FL_FIX_INQUIRY ), UNUSUAL_DEV( 0x0644, 0x0000, 0x0100, 0x0100, "TEAC", "Floppy Drive", - US_SC_UFI, US_PR_CB, NULL, 0 ), + USB_SC_UFI, USB_PR_CB, NULL, 0 ), /* Reported by Darsen Lu <darsen@micro.ee.nthu.edu.tw> */ UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0001, "SigmaTel", "USBMSC Audio Player", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), /* Reported by Daniel Kukula <daniel.kuku@gmail.com> */ UNUSUAL_DEV( 0x067b, 0x1063, 0x0100, 0x0100, "Prolific Technology, Inc.", "Prolific Storage Gadget", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BAD_SENSE ), /* Reported by Rogerio Brito <rbrito@ime.usp.br> */ UNUSUAL_DEV( 0x067b, 0x2317, 0x0001, 0x001, "Prolific Technology, Inc.", "Mass Storage Device", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), /* Reported by Richard -=[]=- <micro_flyer@hotmail.com> */ @@ -838,46 +838,47 @@ UNUSUAL_DEV( 0x067b, 0x2317, 0x0001, 0x001, UNUSUAL_DEV( 0x067b, 0x2507, 0x0001, 0x0100, "Prolific Technology Inc.", "Mass Storage Device", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_GO_SLOW ), /* Reported by Alex Butcher <alex.butcher@assursys.co.uk> */ UNUSUAL_DEV( 0x067b, 0x3507, 0x0001, 0x0101, "Prolific Technology Inc.", "ATAPI-6 Bridge Controller", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_GO_SLOW ), /* Submitted by Benny Sjostrand <benny@hostmobility.com> */ UNUSUAL_DEV( 0x0686, 0x4011, 0x0001, 0x0001, "Minolta", "Dimage F300", - US_SC_SCSI, US_PR_BULK, NULL, 0 ), + USB_SC_SCSI, USB_PR_BULK, NULL, 0 ), /* Reported by Miguel A. Fosas <amn3s1a@ono.com> */ UNUSUAL_DEV( 0x0686, 0x4017, 0x0001, 0x0001, "Minolta", "DIMAGE E223", - US_SC_SCSI, US_PR_DEVICE, NULL, 0 ), + USB_SC_SCSI, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0693, 0x0005, 0x0100, 0x0100, "Hagiwara", "Flashgate", - US_SC_SCSI, US_PR_BULK, NULL, 0 ), + USB_SC_SCSI, USB_PR_BULK, NULL, 0 ), /* Reported by David Hamilton <niftimusmaximus@lycos.com> */ UNUSUAL_DEV( 0x069b, 0x3004, 0x0001, 0x0001, "Thomson Multimedia Inc.", "RCA RD1080 MP3 Player", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), /* Reported by Adrian Pilchowiec <adi1981@epf.pl> */ UNUSUAL_DEV( 0x071b, 0x3203, 0x0000, 0x0000, "RockChip", "MP3", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_NO_WP_DETECT | US_FL_MAX_SECTORS_64), + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_NO_WP_DETECT | US_FL_MAX_SECTORS_64 | + US_FL_NO_READ_CAPACITY_16), /* Reported by Jean-Baptiste Onofre <jb@nanthrax.net> * Support the following product : @@ -886,7 +887,7 @@ UNUSUAL_DEV( 0x071b, 0x3203, 0x0000, 0x0000, UNUSUAL_DEV( 0x071b, 0x32bb, 0x0000, 0x0000, "RockChip", "MTP", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_WP_DETECT | US_FL_MAX_SECTORS_64), /* Reported by Massimiliano Ghilardi <massimiliano.ghilardi@gmail.com> @@ -902,59 +903,59 @@ UNUSUAL_DEV( 0x071b, 0x32bb, 0x0000, 0x0000, UNUSUAL_DEV( 0x071b, 0x3203, 0x0100, 0x0100, "RockChip", "ROCK MP3", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64), /* Reported by Olivier Blondeau <zeitoun@gmail.com> */ UNUSUAL_DEV( 0x0727, 0x0306, 0x0100, 0x0100, "ATMEL", "SND1 Storage", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE), /* Submitted by Roman Hodek <roman@hodek.net> */ UNUSUAL_DEV( 0x0781, 0x0001, 0x0200, 0x0200, "Sandisk", "ImageMate SDDR-05a", - US_SC_SCSI, US_PR_CB, NULL, + USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN ), UNUSUAL_DEV( 0x0781, 0x0002, 0x0009, 0x0009, "SanDisk Corporation", "ImageMate CompactFlash USB", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), UNUSUAL_DEV( 0x0781, 0x0100, 0x0100, 0x0100, "Sandisk", "ImageMate SDDR-12", - US_SC_SCSI, US_PR_CB, NULL, + USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN ), /* Reported by Eero Volotinen <eero@ping-viini.org> */ UNUSUAL_DEV( 0x07ab, 0xfccd, 0x0000, 0x9999, "Freecom Technologies", "FHD-Classic", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), UNUSUAL_DEV( 0x07af, 0x0004, 0x0100, 0x0133, "Microtech", "USB-SCSI-DB25", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_euscsi_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), UNUSUAL_DEV( 0x07af, 0x0005, 0x0100, 0x0100, "Microtech", "USB-SCSI-HD50", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_euscsi_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, US_FL_SCM_MULT_TARG ), #ifdef NO_SDDR09 UNUSUAL_DEV( 0x07af, 0x0006, 0x0100, 0x0100, "Microtech", "CameraMate", - US_SC_SCSI, US_PR_CB, NULL, + USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN ), #endif @@ -967,7 +968,7 @@ UNUSUAL_DEV( 0x07af, 0x0006, 0x0100, 0x0100, UNUSUAL_DEV( 0x07c4, 0xa400, 0x0000, 0xffff, "Datafab", "KECF-USB", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_FIX_CAPACITY ), /* Reported by Rauch Wolke <rauchwolke@gmx.net> @@ -976,7 +977,7 @@ UNUSUAL_DEV( 0x07c4, 0xa400, 0x0000, 0xffff, UNUSUAL_DEV( 0x07c4, 0xa4a5, 0x0000, 0xffff, "Simple Tech/Datafab", "CF+SM Reader", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_MAX_SECTORS_64 ), /* Casio QV 2x00/3x00/4000/8000 digital still cameras are not conformant @@ -986,42 +987,42 @@ UNUSUAL_DEV( 0x07c4, 0xa4a5, 0x0000, 0xffff, * - They don't like the INQUIRY command. So we must handle this command * of the SCSI layer ourselves. * - Some cameras with idProduct=0x1001 and bcdDevice=0x1000 have - * bInterfaceProtocol=0x00 (US_PR_CBI) while others have 0x01 (US_PR_CB). - * So don't remove the US_PR_CB override! - * - Cameras with bcdDevice=0x9009 require the US_SC_8070 override. + * bInterfaceProtocol=0x00 (USB_PR_CBI) while others have 0x01 (USB_PR_CB). + * So don't remove the USB_PR_CB override! + * - Cameras with bcdDevice=0x9009 require the USB_SC_8070 override. */ UNUSUAL_DEV( 0x07cf, 0x1001, 0x1000, 0x9999, "Casio", "QV DigitalCamera", - US_SC_8070, US_PR_CB, NULL, + USB_SC_8070, USB_PR_CB, NULL, US_FL_NEED_OVERRIDE | US_FL_FIX_INQUIRY ), /* Submitted by Hartmut Wahl <hwahl@hwahl.de>*/ UNUSUAL_DEV( 0x0839, 0x000a, 0x0001, 0x0001, "Samsung", "Digimax 410", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), /* Reported by Luciano Rocha <luciano@eurotux.com> */ UNUSUAL_DEV( 0x0840, 0x0082, 0x0001, 0x0001, "Argosy", "Storage", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), /* Reported and patched by Nguyen Anh Quynh <aquynh@gmail.com> */ UNUSUAL_DEV( 0x0840, 0x0084, 0x0001, 0x0001, "Argosy", "Storage", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), /* Reported by Martijn Hijdra <martijn.hijdra@gmail.com> */ UNUSUAL_DEV( 0x0840, 0x0085, 0x0001, 0x0001, "Argosy", "Storage", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. @@ -1033,7 +1034,7 @@ UNUSUAL_DEV( 0x0840, 0x0085, 0x0001, 0x0001, UNUSUAL_DEV( 0x084d, 0x0011, 0x0110, 0x0110, "Grandtech", "DC2MEGA", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BULK32), /* Andrew Lunn <andrew@lunn.ch> @@ -1044,14 +1045,14 @@ UNUSUAL_DEV( 0x084d, 0x0011, 0x0110, 0x0110, UNUSUAL_DEV( 0x0851, 0x1543, 0x0200, 0x0200, "PanDigital", "Photo Frame", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE), /* Submitted by Jan De Luyck <lkml@kcore.org> */ UNUSUAL_DEV( 0x08bd, 0x1100, 0x0000, 0x0000, "CITIZEN", "X1DE-USB", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN), /* Submitted by Dylan Taft <d13f00l@gmail.com> @@ -1060,7 +1061,7 @@ UNUSUAL_DEV( 0x08bd, 0x1100, 0x0000, 0x0000, UNUSUAL_DEV( 0x08ca, 0x3103, 0x0100, 0x0100, "AIPTEK", "Aiptek USB Keychain MP3 Player", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE), /* Entry needed for flags. Moreover, all devices with this ID use @@ -1071,7 +1072,7 @@ UNUSUAL_DEV( 0x08ca, 0x3103, 0x0100, 0x0100, UNUSUAL_DEV( 0x090a, 0x1001, 0x0100, 0x0100, "Trumpion", "t33520 USB Flash Card Controller", - US_SC_DEVICE, US_PR_BULK, NULL, + USB_SC_DEVICE, USB_PR_BULK, NULL, US_FL_NEED_OVERRIDE ), /* Reported by Filippo Bardelli <filibard@libero.it> @@ -1080,21 +1081,21 @@ UNUSUAL_DEV( 0x090a, 0x1001, 0x0100, 0x0100, UNUSUAL_DEV( 0x090a, 0x1050, 0x0100, 0x0100, "Trumpion Microelectronics, Inc.", "33520 USB Digital Voice Recorder", - US_SC_UFI, US_PR_DEVICE, NULL, + USB_SC_UFI, USB_PR_DEVICE, NULL, 0), /* Trumpion Microelectronics MP3 player (felipe_alfaro@linuxmail.org) */ UNUSUAL_DEV( 0x090a, 0x1200, 0x0000, 0x9999, "Trumpion", "MP3 player", - US_SC_RBC, US_PR_BULK, NULL, + USB_SC_RBC, USB_PR_BULK, NULL, 0 ), /* aeb */ UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff, "Feiya", "5-in-1 Card Reader", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), /* This Pentax still camera is not conformant @@ -1107,7 +1108,7 @@ UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff, UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1000, "Pentax", "Optio 2/3/400", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* These are virtual windows driver CDs, which the zd1211rw driver @@ -1115,13 +1116,13 @@ UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1000, UNUSUAL_DEV( 0x0ace, 0x2011, 0x0101, 0x0101, "ZyXEL", "G-220F USB-WLAN Install", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_DEVICE ), UNUSUAL_DEV( 0x0ace, 0x20ff, 0x0101, 0x0101, "SiteCom", "WL-117 USB-WLAN Install", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_DEVICE ), /* Reported by Dan Williams <dcbw@redhat.com> @@ -1133,7 +1134,7 @@ UNUSUAL_DEV( 0x0ace, 0x20ff, 0x0101, 0x0101, UNUSUAL_DEV( 0x0af0, 0x6971, 0x0000, 0x9999, "Option N.V.", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, option_ms_init, + USB_SC_DEVICE, USB_PR_DEVICE, option_ms_init, 0), /* Reported by F. Aben <f.aben@option.com> @@ -1143,7 +1144,7 @@ UNUSUAL_DEV( 0x0af0, 0x6971, 0x0000, 0x9999, UNUSUAL_DEV( 0x0af0, 0x7401, 0x0000, 0x0000, "Option", "GI 0401 SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), /* Reported by Jan Dumon <j.dumon@option.com> @@ -1153,104 +1154,104 @@ UNUSUAL_DEV( 0x0af0, 0x7401, 0x0000, 0x0000, UNUSUAL_DEV( 0x0af0, 0x7501, 0x0000, 0x0000, "Option", "GI 0431 SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x7701, 0x0000, 0x0000, "Option", "GI 0451 SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x7706, 0x0000, 0x0000, "Option", "GI 0451 SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x7901, 0x0000, 0x0000, "Option", "GI 0452 SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x7A01, 0x0000, 0x0000, "Option", "GI 0461 SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x7A05, 0x0000, 0x0000, "Option", "GI 0461 SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x8300, 0x0000, 0x0000, "Option", "GI 033x SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x8302, 0x0000, 0x0000, "Option", "GI 033x SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0x8304, 0x0000, 0x0000, "Option", "GI 033x SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0xc100, 0x0000, 0x0000, "Option", "GI 070x SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0xd057, 0x0000, 0x0000, "Option", "GI 1505 SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0xd058, 0x0000, 0x0000, "Option", "GI 1509 SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0xd157, 0x0000, 0x0000, "Option", "GI 1515 SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0xd257, 0x0000, 0x0000, "Option", "GI 1215 SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), UNUSUAL_DEV( 0x0af0, 0xd357, 0x0000, 0x0000, "Option", "GI 1505 SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), /* Reported by Ben Efros <ben@pc-doctor.com> */ UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0000, "Seagate", "FreeAgent Pro", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SANE_SENSE ), UNUSUAL_DEV( 0x0d49, 0x7310, 0x0000, 0x9999, "Maxtor", "USB to SATA", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SANE_SENSE), /* @@ -1260,14 +1261,14 @@ UNUSUAL_DEV( 0x0d49, 0x7310, 0x0000, 0x9999, UNUSUAL_DEV( 0x0c45, 0x1060, 0x0100, 0x0100, "Unknown", "Unknown", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), /* Submitted by Joris Struyve <joris@struyve.be> */ UNUSUAL_DEV( 0x0d96, 0x410a, 0x0001, 0xffff, "Medion", "MD 7425", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), /* @@ -1278,13 +1279,13 @@ UNUSUAL_DEV( 0x0d96, 0x410a, 0x0001, 0xffff, UNUSUAL_DEV( 0x0d96, 0x5200, 0x0001, 0x0200, "Jenoptik", "JD 5200 z3", - US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), /* Reported by Jason Johnston <killean@shaw.ca> */ UNUSUAL_DEV( 0x0dc4, 0x0073, 0x0000, 0x0000, "Macpower Technology Co.LTD.", "USB 2.0 3.5\" DEVICE", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), /* Reported by Lubomir Blaha <tritol@trilogic.cz> @@ -1295,7 +1296,7 @@ UNUSUAL_DEV( 0x0dc4, 0x0073, 0x0000, 0x0000, UNUSUAL_DEV( 0x0dd8, 0x1060, 0x0000, 0xffff, "Netac", "USB-CF-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* Reported by Edward Chapman (taken from linux-usb mailing list) @@ -1303,7 +1304,7 @@ UNUSUAL_DEV( 0x0dd8, 0x1060, 0x0000, 0xffff, UNUSUAL_DEV( 0x0dd8, 0xd202, 0x0000, 0x9999, "Netac", "USB Flash Disk", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), @@ -1312,28 +1313,28 @@ UNUSUAL_DEV( 0x0dd8, 0xd202, 0x0000, 0x9999, UNUSUAL_DEV( 0x0dda, 0x0001, 0x0012, 0x0012, "WINWARD", "Music Disk", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Ian McConnell <ian at emit.demon.co.uk> */ UNUSUAL_DEV( 0x0dda, 0x0301, 0x0012, 0x0012, "PNP_MP3", "PNP_MP3 PLAYER", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Jim McCloskey <mcclosk@ucsc.edu> */ UNUSUAL_DEV( 0x0e21, 0x0520, 0x0100, 0x0100, "Cowon Systems", "iAUDIO M5", - US_SC_DEVICE, US_PR_BULK, NULL, + USB_SC_DEVICE, USB_PR_BULK, NULL, US_FL_NEED_OVERRIDE ), /* Submitted by Antoine Mairesse <antoine.mairesse@free.fr> */ UNUSUAL_DEV( 0x0ed1, 0x6660, 0x0100, 0x0300, "USB", "Solid state disk", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), /* Submitted by Daniel Drake <dsd@gentoo.org> @@ -1341,14 +1342,14 @@ UNUSUAL_DEV( 0x0ed1, 0x6660, 0x0100, 0x0300, UNUSUAL_DEV( 0x0ea0, 0x2168, 0x0110, 0x0110, "Ours Technology", "Flash Disk", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Rastislav Stanik <rs_kernel@yahoo.com> */ UNUSUAL_DEV( 0x0ea0, 0x6828, 0x0110, 0x0110, "USB", "Flash Disk", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Benjamin Schiller <sbenni@gmx.de> @@ -1356,7 +1357,7 @@ UNUSUAL_DEV( 0x0ea0, 0x6828, 0x0110, 0x0110, UNUSUAL_DEV( 0x0ed1, 0x7636, 0x0103, 0x0103, "Typhoon", "My DJ 1820", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_GO_SLOW | US_FL_MAX_SECTORS_64), /* Patch by Leonid Petrov mail at lpetrov.net @@ -1367,7 +1368,7 @@ UNUSUAL_DEV( 0x0ed1, 0x7636, 0x0103, 0x0103, UNUSUAL_DEV( 0x0f19, 0x0103, 0x0100, 0x0100, "Oracom Co., Ltd", "ORC-200M", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* David Kuehling <dvdkhlng@gmx.de>: @@ -1377,21 +1378,21 @@ UNUSUAL_DEV( 0x0f19, 0x0103, 0x0100, 0x0100, UNUSUAL_DEV( 0x0f19, 0x0105, 0x0100, 0x0100, "C-MEX", "A-VOX", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Michael Stattmann <michael@stattmann.com> */ UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, "Sony Ericsson", "V800-Vodafone 802", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_WP_DETECT ), /* Reported by The Solutor <thesolutor@gmail.com> */ UNUSUAL_DEV( 0x0fce, 0xd0e1, 0x0000, 0x0000, "Sony Ericsson", "MD400", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_DEVICE), /* Reported by Jan Mate <mate@fiit.stuba.sk> @@ -1399,21 +1400,21 @@ UNUSUAL_DEV( 0x0fce, 0xd0e1, 0x0000, 0x0000, UNUSUAL_DEV( 0x0fce, 0xe030, 0x0000, 0x0000, "Sony Ericsson", "P990i", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), /* Reported by Emmanuel Vasilakis <evas@forthnet.gr> */ UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x0000, "Sony Ericsson", "M600i", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), /* Reported by Ricardo Barberis <ricardo@dattatec.com> */ UNUSUAL_DEV( 0x0fce, 0xe092, 0x0000, 0x0000, "Sony Ericsson", "P1i", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu> @@ -1425,13 +1426,13 @@ UNUSUAL_DEV( 0x0fce, 0xe092, 0x0000, 0x0000, UNUSUAL_DEV( 0x1019, 0x0c55, 0x0000, 0x0110, "Desknote", "UCR-61S2B", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_ucr61s2b_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_ucr61s2b_init, 0 ), UNUSUAL_DEV( 0x1058, 0x0704, 0x0000, 0x9999, "Western Digital", "External HDD", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_SANE_SENSE), /* Reported by Fabio Venturi <f.venturi@tdnet.it> @@ -1440,7 +1441,7 @@ UNUSUAL_DEV( 0x1058, 0x0704, 0x0000, 0x9999, UNUSUAL_DEV( 0x10d6, 0x2200, 0x0100, 0x0100, "Actions Semiconductor", "Mtp device", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0), /* Reported by Pascal Terjan <pterjan@mandriva.com> @@ -1449,7 +1450,7 @@ UNUSUAL_DEV( 0x10d6, 0x2200, 0x0100, 0x0100, UNUSUAL_DEV( 0x1186, 0x3e04, 0x0000, 0x0000, "D-Link", "USB Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, option_ms_init, US_FL_IGNORE_DEVICE), + USB_SC_DEVICE, USB_PR_DEVICE, option_ms_init, US_FL_IGNORE_DEVICE), /* Reported by Kevin Lloyd <linux@sierrawireless.com> * Entry is needed for the initializer function override, @@ -1459,7 +1460,7 @@ UNUSUAL_DEV( 0x1186, 0x3e04, 0x0000, 0x0000, UNUSUAL_DEV( 0x1199, 0x0fff, 0x0000, 0x9999, "Sierra Wireless", "USB MMC Storage", - US_SC_DEVICE, US_PR_DEVICE, sierra_ms_init, + USB_SC_DEVICE, USB_PR_DEVICE, sierra_ms_init, 0), /* Reported by Jaco Kroon <jaco@kroon.co.za> @@ -1469,7 +1470,7 @@ UNUSUAL_DEV( 0x1199, 0x0fff, 0x0000, 0x9999, UNUSUAL_DEV( 0x1210, 0x0003, 0x0100, 0x0100, "Digitech HMG", "DigiTech Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by fangxiaozhi <huananhu@huawei.com> @@ -1478,353 +1479,353 @@ UNUSUAL_DEV( 0x1210, 0x0003, 0x0100, 0x0100, UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1004, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1401, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1402, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1403, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1404, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1405, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1406, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1407, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1408, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1409, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x140A, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x140B, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x140C, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x140D, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x140E, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x140F, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1410, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1411, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1412, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1413, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1414, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1415, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1416, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1417, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1418, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1419, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x141A, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x141B, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x141C, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x141D, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x141E, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x141F, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1420, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1421, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1422, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1423, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1424, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1425, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1426, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1427, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1428, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1429, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x142A, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x142B, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x142C, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x142D, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x142E, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x142F, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1430, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1431, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1432, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1433, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1434, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1435, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1436, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1437, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1438, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x1439, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x143A, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x143B, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x143C, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x143D, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x143E, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), UNUSUAL_DEV( 0x12d1, 0x143F, 0x0000, 0x0000, "HUAWEI MOBILE", "Mass Storage", - US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init, + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 0), /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */ UNUSUAL_DEV( 0x132b, 0x000b, 0x0001, 0x0001, "Minolta", "Dimage Z10", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0 ), /* Reported by Kotrla Vitezslav <kotrla@ceb.cz> */ UNUSUAL_DEV( 0x1370, 0x6828, 0x0110, 0x0110, "SWISSBIT", "Black Silver", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Francesco Foresti <frafore@tiscali.it> */ UNUSUAL_DEV( 0x14cd, 0x6600, 0x0201, 0x0201, "Super Top", "IDE DEVICE", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Alexandre Oliva <oliva@lsd.ic.unicamp.br> @@ -1833,7 +1834,7 @@ UNUSUAL_DEV( 0x14cd, 0x6600, 0x0201, 0x0201, UNUSUAL_DEV( 0x152d, 0x2329, 0x0100, 0x0100, "JMicron", "USB to ATA/ATAPI Bridge", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_SANE_SENSE ), /* Reported by Robert Schedel <r.schedel@yahoo.de> @@ -1841,7 +1842,7 @@ UNUSUAL_DEV( 0x152d, 0x2329, 0x0100, 0x0100, UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x0201, "Teac", "HD-35PUK-B", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Hans de Goede <hdegoede@redhat.com> @@ -1851,18 +1852,23 @@ UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x0201, UNUSUAL_DEV( 0x1908, 0x1315, 0x0000, 0x0000, "BUILDWIN", "Photo Frame", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BAD_SENSE ), UNUSUAL_DEV( 0x1908, 0x1320, 0x0000, 0x0000, "BUILDWIN", "Photo Frame", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BAD_SENSE ), +UNUSUAL_DEV( 0x1908, 0x3335, 0x0200, 0x0200, + "BUILDWIN", + "Photo Frame", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_NO_READ_DISC_INFO ), UNUSUAL_DEV( 0x2116, 0x0320, 0x0001, 0x0001, "ST", "2A", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), /* patch submitted by Davide Perini <perini.davide@dpsoftware.org> @@ -1871,7 +1877,7 @@ UNUSUAL_DEV( 0x2116, 0x0320, 0x0001, 0x0001, UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001, "Motorola", "RAZR V3x", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), /* @@ -1882,14 +1888,14 @@ UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001, UNUSUAL_DEV( 0x22b8, 0x6426, 0x0101, 0x0101, "Motorola", "MSnc.", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_FIX_CAPACITY | US_FL_BULK_IGNORE_TAG), /* Reported by Radovan Garabik <garabik@kassiopeia.juls.savba.sk> */ UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999, "MPIO", "HS200", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_GO_SLOW ), /* Reported by Frederic Marchal <frederic.marchal@wowcompany.com> @@ -1898,21 +1904,21 @@ UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999, UNUSUAL_DEV( 0x3340, 0xffff, 0x0000, 0x0000, "Mitac", "Mio DigiWalker USB Sync", - US_SC_DEVICE,US_PR_DEVICE,NULL, + USB_SC_DEVICE,USB_PR_DEVICE,NULL, US_FL_MAX_SECTORS_64 ), /* Reported by Andrey Rahmatullin <wrar@altlinux.org> */ UNUSUAL_DEV( 0x4102, 0x1020, 0x0100, 0x0100, "iRiver", "MP3 T10", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), /* Reported by Sergey Pinaev <dfo@antex.ru> */ UNUSUAL_DEV( 0x4102, 0x1059, 0x0000, 0x0000, "iRiver", "P7K", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), /* @@ -1922,41 +1928,41 @@ UNUSUAL_DEV( 0x4102, 0x1059, 0x0000, 0x0000, UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x0100, "Iomega", "Micro Mini 1GB", - US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), /* Reported by Andrew Simmons <andrew.simmons@gmail.com> */ UNUSUAL_DEV( 0xed06, 0x4500, 0x0001, 0x0001, "DataStor", "USB4500 FW1.04", - US_SC_DEVICE, US_PR_DEVICE, NULL, + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_CAPACITY_HEURISTICS), /* Reported by Alessio Treglia <quadrispro@ubuntu.com> */ UNUSUAL_DEV( 0xed10, 0x7636, 0x0001, 0x0001, "TGE", "Digital MP3 Audio Player", - US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), + USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), /* Control/Bulk transport for all SubClass values */ -USUAL_DEV(US_SC_RBC, US_PR_CB, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_8020, US_PR_CB, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_QIC, US_PR_CB, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_UFI, US_PR_CB, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_8070, US_PR_CB, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_SCSI, US_PR_CB, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_RBC, USB_PR_CB, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_8020, USB_PR_CB, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_QIC, USB_PR_CB, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_UFI, USB_PR_CB, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_8070, USB_PR_CB, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_SCSI, USB_PR_CB, USB_US_TYPE_STOR), /* Control/Bulk/Interrupt transport for all SubClass values */ -USUAL_DEV(US_SC_RBC, US_PR_CBI, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_8020, US_PR_CBI, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_QIC, US_PR_CBI, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_UFI, US_PR_CBI, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_8070, US_PR_CBI, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_SCSI, US_PR_CBI, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_RBC, USB_PR_CBI, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_8020, USB_PR_CBI, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_QIC, USB_PR_CBI, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_UFI, USB_PR_CBI, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_8070, USB_PR_CBI, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_SCSI, USB_PR_CBI, USB_US_TYPE_STOR), /* Bulk-only transport for all SubClass values */ -USUAL_DEV(US_SC_RBC, US_PR_BULK, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_8020, US_PR_BULK, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_QIC, US_PR_BULK, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_UFI, US_PR_BULK, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_8070, US_PR_BULK, USB_US_TYPE_STOR), -USUAL_DEV(US_SC_SCSI, US_PR_BULK, 0), +USUAL_DEV(USB_SC_RBC, USB_PR_BULK, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_8020, USB_PR_BULK, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_QIC, USB_PR_BULK, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_UFI, USB_PR_BULK, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_8070, USB_PR_BULK, USB_US_TYPE_STOR), +USUAL_DEV(USB_SC_SCSI, USB_PR_BULK, 0), diff --git a/drivers/usb/storage/unusual_freecom.h b/drivers/usb/storage/unusual_freecom.h index 3758679..59a2611 100644 --- a/drivers/usb/storage/unusual_freecom.h +++ b/drivers/usb/storage/unusual_freecom.h @@ -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) || ... */ diff --git a/drivers/usb/storage/unusual_isd200.h b/drivers/usb/storage/unusual_isd200.h index 0d99dde..14cca0c 100644 --- a/drivers/usb/storage/unusual_isd200.h +++ b/drivers/usb/storage/unusual_isd200.h @@ -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) || ... */ diff --git a/drivers/usb/storage/unusual_jumpshot.h b/drivers/usb/storage/unusual_jumpshot.h index 2e549b1..54be78b 100644 --- a/drivers/usb/storage/unusual_jumpshot.h +++ b/drivers/usb/storage/unusual_jumpshot.h @@ -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) || ... */ diff --git a/drivers/usb/storage/unusual_karma.h b/drivers/usb/storage/unusual_karma.h index 12ae3a0..6df0397 100644 --- a/drivers/usb/storage/unusual_karma.h +++ b/drivers/usb/storage/unusual_karma.h @@ -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) || ... */ diff --git a/drivers/usb/storage/unusual_onetouch.h b/drivers/usb/storage/unusual_onetouch.h index bd9306b..0abb819 100644 --- a/drivers/usb/storage/unusual_onetouch.h +++ b/drivers/usb/storage/unusual_onetouch.h @@ -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) || ... */ diff --git a/drivers/usb/storage/unusual_sddr09.h b/drivers/usb/storage/unusual_sddr09.h index 50cab51..59a7e37 100644 --- a/drivers/usb/storage/unusual_sddr09.h +++ b/drivers/usb/storage/unusual_sddr09.h @@ -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) || ... */ diff --git a/drivers/usb/storage/unusual_sddr55.h b/drivers/usb/storage/unusual_sddr55.h index ae81ef7..fcb7e12 100644 --- a/drivers/usb/storage/unusual_sddr55.h +++ b/drivers/usb/storage/unusual_sddr55.h @@ -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) || ... */ diff --git a/drivers/usb/storage/unusual_usbat.h b/drivers/usb/storage/unusual_usbat.h index 80e869f..38e79c4 100644 --- a/drivers/usb/storage/unusual_usbat.h +++ b/drivers/usb/storage/unusual_usbat.h @@ -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) || ... */ diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 90bb017..4219c19 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -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); |