diff options
Diffstat (limited to 'drivers/usb/storage/usb.c')
-rw-r--r-- | drivers/usb/storage/usb.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 90bb0175a152..4219c197cb08 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, | |||
512 | 512 | ||
513 | /* Store the entries */ | 513 | /* Store the entries */ |
514 | us->unusual_dev = unusual_dev; | 514 | us->unusual_dev = unusual_dev; |
515 | us->subclass = (unusual_dev->useProtocol == US_SC_DEVICE) ? | 515 | us->subclass = (unusual_dev->useProtocol == USB_SC_DEVICE) ? |
516 | idesc->bInterfaceSubClass : | 516 | idesc->bInterfaceSubClass : |
517 | unusual_dev->useProtocol; | 517 | unusual_dev->useProtocol; |
518 | us->protocol = (unusual_dev->useTransport == US_PR_DEVICE) ? | 518 | us->protocol = (unusual_dev->useTransport == USB_PR_DEVICE) ? |
519 | idesc->bInterfaceProtocol : | 519 | idesc->bInterfaceProtocol : |
520 | unusual_dev->useTransport; | 520 | unusual_dev->useTransport; |
521 | us->fflags = USB_US_ORIG_FLAGS(id->driver_info); | 521 | 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, | |||
552 | struct usb_device_descriptor *ddesc = &dev->descriptor; | 552 | struct usb_device_descriptor *ddesc = &dev->descriptor; |
553 | int msg = -1; | 553 | int msg = -1; |
554 | 554 | ||
555 | if (unusual_dev->useProtocol != US_SC_DEVICE && | 555 | if (unusual_dev->useProtocol != USB_SC_DEVICE && |
556 | us->subclass == idesc->bInterfaceSubClass) | 556 | us->subclass == idesc->bInterfaceSubClass) |
557 | msg += 1; | 557 | msg += 1; |
558 | if (unusual_dev->useTransport != US_PR_DEVICE && | 558 | if (unusual_dev->useTransport != USB_PR_DEVICE && |
559 | us->protocol == idesc->bInterfaceProtocol) | 559 | us->protocol == idesc->bInterfaceProtocol) |
560 | msg += 2; | 560 | msg += 2; |
561 | if (msg >= 0 && !(us->fflags & US_FL_NEED_OVERRIDE)) | 561 | 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, | |||
582 | static void get_transport(struct us_data *us) | 582 | static void get_transport(struct us_data *us) |
583 | { | 583 | { |
584 | switch (us->protocol) { | 584 | switch (us->protocol) { |
585 | case US_PR_CB: | 585 | case USB_PR_CB: |
586 | us->transport_name = "Control/Bulk"; | 586 | us->transport_name = "Control/Bulk"; |
587 | us->transport = usb_stor_CB_transport; | 587 | us->transport = usb_stor_CB_transport; |
588 | us->transport_reset = usb_stor_CB_reset; | 588 | us->transport_reset = usb_stor_CB_reset; |
589 | us->max_lun = 7; | 589 | us->max_lun = 7; |
590 | break; | 590 | break; |
591 | 591 | ||
592 | case US_PR_CBI: | 592 | case USB_PR_CBI: |
593 | us->transport_name = "Control/Bulk/Interrupt"; | 593 | us->transport_name = "Control/Bulk/Interrupt"; |
594 | us->transport = usb_stor_CB_transport; | 594 | us->transport = usb_stor_CB_transport; |
595 | us->transport_reset = usb_stor_CB_reset; | 595 | us->transport_reset = usb_stor_CB_reset; |
596 | us->max_lun = 7; | 596 | us->max_lun = 7; |
597 | break; | 597 | break; |
598 | 598 | ||
599 | case US_PR_BULK: | 599 | case USB_PR_BULK: |
600 | us->transport_name = "Bulk"; | 600 | us->transport_name = "Bulk"; |
601 | us->transport = usb_stor_Bulk_transport; | 601 | us->transport = usb_stor_Bulk_transport; |
602 | us->transport_reset = usb_stor_Bulk_reset; | 602 | us->transport_reset = usb_stor_Bulk_reset; |
@@ -608,35 +608,35 @@ static void get_transport(struct us_data *us) | |||
608 | static void get_protocol(struct us_data *us) | 608 | static void get_protocol(struct us_data *us) |
609 | { | 609 | { |
610 | switch (us->subclass) { | 610 | switch (us->subclass) { |
611 | case US_SC_RBC: | 611 | case USB_SC_RBC: |
612 | us->protocol_name = "Reduced Block Commands (RBC)"; | 612 | us->protocol_name = "Reduced Block Commands (RBC)"; |
613 | us->proto_handler = usb_stor_transparent_scsi_command; | 613 | us->proto_handler = usb_stor_transparent_scsi_command; |
614 | break; | 614 | break; |
615 | 615 | ||
616 | case US_SC_8020: | 616 | case USB_SC_8020: |
617 | us->protocol_name = "8020i"; | 617 | us->protocol_name = "8020i"; |
618 | us->proto_handler = usb_stor_pad12_command; | 618 | us->proto_handler = usb_stor_pad12_command; |
619 | us->max_lun = 0; | 619 | us->max_lun = 0; |
620 | break; | 620 | break; |
621 | 621 | ||
622 | case US_SC_QIC: | 622 | case USB_SC_QIC: |
623 | us->protocol_name = "QIC-157"; | 623 | us->protocol_name = "QIC-157"; |
624 | us->proto_handler = usb_stor_pad12_command; | 624 | us->proto_handler = usb_stor_pad12_command; |
625 | us->max_lun = 0; | 625 | us->max_lun = 0; |
626 | break; | 626 | break; |
627 | 627 | ||
628 | case US_SC_8070: | 628 | case USB_SC_8070: |
629 | us->protocol_name = "8070i"; | 629 | us->protocol_name = "8070i"; |
630 | us->proto_handler = usb_stor_pad12_command; | 630 | us->proto_handler = usb_stor_pad12_command; |
631 | us->max_lun = 0; | 631 | us->max_lun = 0; |
632 | break; | 632 | break; |
633 | 633 | ||
634 | case US_SC_SCSI: | 634 | case USB_SC_SCSI: |
635 | us->protocol_name = "Transparent SCSI"; | 635 | us->protocol_name = "Transparent SCSI"; |
636 | us->proto_handler = usb_stor_transparent_scsi_command; | 636 | us->proto_handler = usb_stor_transparent_scsi_command; |
637 | break; | 637 | break; |
638 | 638 | ||
639 | case US_SC_UFI: | 639 | case USB_SC_UFI: |
640 | us->protocol_name = "Uniform Floppy Interface (UFI)"; | 640 | us->protocol_name = "Uniform Floppy Interface (UFI)"; |
641 | us->proto_handler = usb_stor_ufi_command; | 641 | us->proto_handler = usb_stor_ufi_command; |
642 | break; | 642 | break; |
@@ -679,7 +679,7 @@ static int get_pipes(struct us_data *us) | |||
679 | } | 679 | } |
680 | } | 680 | } |
681 | 681 | ||
682 | if (!ep_in || !ep_out || (us->protocol == US_PR_CBI && !ep_int)) { | 682 | if (!ep_in || !ep_out || (us->protocol == USB_PR_CBI && !ep_int)) { |
683 | US_DEBUGP("Endpoint sanity check failed! Rejecting dev.\n"); | 683 | US_DEBUGP("Endpoint sanity check failed! Rejecting dev.\n"); |
684 | return -EIO; | 684 | return -EIO; |
685 | } | 685 | } |
@@ -834,7 +834,7 @@ static int usb_stor_scan_thread(void * __us) | |||
834 | if (!test_bit(US_FLIDX_DONT_SCAN, &us->dflags)) { | 834 | if (!test_bit(US_FLIDX_DONT_SCAN, &us->dflags)) { |
835 | 835 | ||
836 | /* For bulk-only devices, determine the max LUN value */ | 836 | /* For bulk-only devices, determine the max LUN value */ |
837 | if (us->protocol == US_PR_BULK && | 837 | if (us->protocol == USB_PR_BULK && |
838 | !(us->fflags & US_FL_SINGLE_LUN)) { | 838 | !(us->fflags & US_FL_SINGLE_LUN)) { |
839 | mutex_lock(&us->dev_mutex); | 839 | mutex_lock(&us->dev_mutex); |
840 | us->max_lun = usb_stor_Bulk_max_lun(us); | 840 | us->max_lun = usb_stor_Bulk_max_lun(us); |