diff options
Diffstat (limited to 'drivers/usb/storage')
| -rw-r--r-- | drivers/usb/storage/Kconfig | 4 | ||||
| -rw-r--r-- | drivers/usb/storage/Makefile | 3 | ||||
| -rw-r--r-- | drivers/usb/storage/jumpshot.c | 99 | ||||
| -rw-r--r-- | drivers/usb/storage/unusual_devs.h | 8 | ||||
| -rw-r--r-- | drivers/usb/storage/unusual_jumpshot.h (renamed from drivers/usb/storage/jumpshot.h) | 30 | ||||
| -rw-r--r-- | drivers/usb/storage/usb.c | 12 | ||||
| -rw-r--r-- | drivers/usb/storage/usual-tables.c | 1 |
7 files changed, 112 insertions, 45 deletions
diff --git a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig index 7dac413e0f2f..43e1afeb7f8c 100644 --- a/drivers/usb/storage/Kconfig +++ b/drivers/usb/storage/Kconfig | |||
| @@ -110,12 +110,14 @@ config USB_STORAGE_SDDR55 | |||
| 110 | If this driver is compiled as a module, it will be named ums-sddr55. | 110 | If this driver is compiled as a module, it will be named ums-sddr55. |
| 111 | 111 | ||
| 112 | config USB_STORAGE_JUMPSHOT | 112 | config USB_STORAGE_JUMPSHOT |
| 113 | bool "Lexar Jumpshot Compact Flash Reader" | 113 | tristate "Lexar Jumpshot Compact Flash Reader" |
| 114 | depends on USB_STORAGE | 114 | depends on USB_STORAGE |
| 115 | help | 115 | help |
| 116 | Say Y here to include additional code to support the Lexar Jumpshot | 116 | Say Y here to include additional code to support the Lexar Jumpshot |
| 117 | USB CompactFlash reader. | 117 | USB CompactFlash reader. |
| 118 | 118 | ||
| 119 | If this driver is compiled as a module, it will be named ums-jumpshot. | ||
| 120 | |||
| 119 | config USB_STORAGE_ALAUDA | 121 | config USB_STORAGE_ALAUDA |
| 120 | bool "Olympus MAUSB-10/Fuji DPC-R1 support" | 122 | bool "Olympus MAUSB-10/Fuji DPC-R1 support" |
| 121 | depends on USB_STORAGE | 123 | depends on USB_STORAGE |
diff --git a/drivers/usb/storage/Makefile b/drivers/usb/storage/Makefile index 0f78bd680f0f..7b9d53563d34 100644 --- a/drivers/usb/storage/Makefile +++ b/drivers/usb/storage/Makefile | |||
| @@ -10,7 +10,6 @@ EXTRA_CFLAGS := -Idrivers/scsi | |||
| 10 | obj-$(CONFIG_USB_STORAGE) += usb-storage.o | 10 | obj-$(CONFIG_USB_STORAGE) += usb-storage.o |
| 11 | 11 | ||
| 12 | usb-storage-obj-$(CONFIG_USB_STORAGE_DEBUG) += debug.o | 12 | usb-storage-obj-$(CONFIG_USB_STORAGE_DEBUG) += debug.o |
| 13 | usb-storage-obj-$(CONFIG_USB_STORAGE_JUMPSHOT) += jumpshot.o | ||
| 14 | usb-storage-obj-$(CONFIG_USB_STORAGE_ALAUDA) += alauda.o | 13 | usb-storage-obj-$(CONFIG_USB_STORAGE_ALAUDA) += alauda.o |
| 15 | usb-storage-obj-$(CONFIG_USB_STORAGE_ONETOUCH) += onetouch.o | 14 | usb-storage-obj-$(CONFIG_USB_STORAGE_ONETOUCH) += onetouch.o |
| 16 | usb-storage-obj-$(CONFIG_USB_STORAGE_KARMA) += karma.o | 15 | usb-storage-obj-$(CONFIG_USB_STORAGE_KARMA) += karma.o |
| @@ -28,6 +27,7 @@ obj-$(CONFIG_USB_STORAGE_CYPRESS_ATACB) += ums-cypress.o | |||
| 28 | obj-$(CONFIG_USB_STORAGE_DATAFAB) += ums-datafab.o | 27 | obj-$(CONFIG_USB_STORAGE_DATAFAB) += ums-datafab.o |
| 29 | obj-$(CONFIG_USB_STORAGE_FREECOM) += ums-freecom.o | 28 | obj-$(CONFIG_USB_STORAGE_FREECOM) += ums-freecom.o |
| 30 | obj-$(CONFIG_USB_STORAGE_ISD200) += ums-isd200.o | 29 | obj-$(CONFIG_USB_STORAGE_ISD200) += ums-isd200.o |
| 30 | obj-$(CONFIG_USB_STORAGE_JUMPSHOT) += ums-jumpshot.o | ||
| 31 | obj-$(CONFIG_USB_STORAGE_SDDR09) += ums-sddr09.o | 31 | obj-$(CONFIG_USB_STORAGE_SDDR09) += ums-sddr09.o |
| 32 | obj-$(CONFIG_USB_STORAGE_SDDR55) += ums-sddr55.o | 32 | obj-$(CONFIG_USB_STORAGE_SDDR55) += ums-sddr55.o |
| 33 | obj-$(CONFIG_USB_STORAGE_USBAT) += ums-usbat.o | 33 | obj-$(CONFIG_USB_STORAGE_USBAT) += ums-usbat.o |
| @@ -36,6 +36,7 @@ ums-cypress-objs := cypress_atacb.o | |||
| 36 | ums-datafab-objs := datafab.o | 36 | ums-datafab-objs := datafab.o |
| 37 | ums-freecom-objs := freecom.o | 37 | ums-freecom-objs := freecom.o |
| 38 | ums-isd200-objs := isd200.o | 38 | ums-isd200-objs := isd200.o |
| 39 | ums-jumpshot-objs := jumpshot.o | ||
| 39 | ums-sddr09-objs := sddr09.o | 40 | ums-sddr09-objs := sddr09.o |
| 40 | ums-sddr55-objs := sddr55.o | 41 | ums-sddr55-objs := sddr55.o |
| 41 | ums-usbat-objs := shuttle_usbat.o | 42 | ums-usbat-objs := shuttle_usbat.o |
diff --git a/drivers/usb/storage/jumpshot.c b/drivers/usb/storage/jumpshot.c index df67f13c9e73..a50d6dc1fe64 100644 --- a/drivers/usb/storage/jumpshot.c +++ b/drivers/usb/storage/jumpshot.c | |||
| @@ -46,6 +46,7 @@ | |||
| 46 | */ | 46 | */ |
| 47 | 47 | ||
| 48 | #include <linux/errno.h> | 48 | #include <linux/errno.h> |
| 49 | #include <linux/module.h> | ||
| 49 | #include <linux/slab.h> | 50 | #include <linux/slab.h> |
| 50 | 51 | ||
| 51 | #include <scsi/scsi.h> | 52 | #include <scsi/scsi.h> |
| @@ -55,9 +56,57 @@ | |||
| 55 | #include "transport.h" | 56 | #include "transport.h" |
| 56 | #include "protocol.h" | 57 | #include "protocol.h" |
| 57 | #include "debug.h" | 58 | #include "debug.h" |
| 58 | #include "jumpshot.h" | ||
| 59 | 59 | ||
| 60 | 60 | ||
| 61 | /* | ||
| 62 | * The table of devices | ||
| 63 | */ | ||
| 64 | #define UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, \ | ||
| 65 | vendorName, productName, useProtocol, useTransport, \ | ||
| 66 | initFunction, flags) \ | ||
| 67 | { USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \ | ||
| 68 | .driver_info = (flags)|(USB_US_TYPE_STOR<<24) } | ||
| 69 | |||
| 70 | struct usb_device_id jumpshot_usb_ids[] = { | ||
| 71 | # include "unusual_jumpshot.h" | ||
| 72 | { } /* Terminating entry */ | ||
| 73 | }; | ||
| 74 | MODULE_DEVICE_TABLE(usb, jumpshot_usb_ids); | ||
| 75 | |||
| 76 | #undef UNUSUAL_DEV | ||
| 77 | |||
| 78 | /* | ||
| 79 | * The flags table | ||
| 80 | */ | ||
| 81 | #define UNUSUAL_DEV(idVendor, idProduct, bcdDeviceMin, bcdDeviceMax, \ | ||
| 82 | vendor_name, product_name, use_protocol, use_transport, \ | ||
| 83 | init_function, Flags) \ | ||
| 84 | { \ | ||
| 85 | .vendorName = vendor_name, \ | ||
| 86 | .productName = product_name, \ | ||
| 87 | .useProtocol = use_protocol, \ | ||
| 88 | .useTransport = use_transport, \ | ||
| 89 | .initFunction = init_function, \ | ||
| 90 | } | ||
| 91 | |||
| 92 | static struct us_unusual_dev jumpshot_unusual_dev_list[] = { | ||
| 93 | # include "unusual_jumpshot.h" | ||
| 94 | { } /* Terminating entry */ | ||
| 95 | }; | ||
| 96 | |||
| 97 | #undef UNUSUAL_DEV | ||
| 98 | |||
| 99 | |||
| 100 | struct jumpshot_info { | ||
| 101 | unsigned long sectors; /* total sector count */ | ||
| 102 | unsigned long ssize; /* sector size in bytes */ | ||
| 103 | |||
| 104 | /* the following aren't used yet */ | ||
| 105 | unsigned char sense_key; | ||
| 106 | unsigned long sense_asc; /* additional sense code */ | ||
| 107 | unsigned long sense_ascq; /* additional sense code qualifier */ | ||
| 108 | }; | ||
| 109 | |||
| 61 | static inline int jumpshot_bulk_read(struct us_data *us, | 110 | static inline int jumpshot_bulk_read(struct us_data *us, |
| 62 | unsigned char *data, | 111 | unsigned char *data, |
| 63 | unsigned int len) | 112 | unsigned int len) |
| @@ -429,7 +478,7 @@ static void jumpshot_info_destructor(void *extra) | |||
| 429 | 478 | ||
| 430 | // Transport for the Lexar 'Jumpshot' | 479 | // Transport for the Lexar 'Jumpshot' |
| 431 | // | 480 | // |
| 432 | int jumpshot_transport(struct scsi_cmnd * srb, struct us_data *us) | 481 | static int jumpshot_transport(struct scsi_cmnd *srb, struct us_data *us) |
| 433 | { | 482 | { |
| 434 | struct jumpshot_info *info; | 483 | struct jumpshot_info *info; |
| 435 | int rc; | 484 | int rc; |
| @@ -592,3 +641,49 @@ int jumpshot_transport(struct scsi_cmnd * srb, struct us_data *us) | |||
| 592 | info->sense_ascq = 0x00; | 641 | info->sense_ascq = 0x00; |
| 593 | return USB_STOR_TRANSPORT_FAILED; | 642 | return USB_STOR_TRANSPORT_FAILED; |
| 594 | } | 643 | } |
| 644 | |||
| 645 | static int jumpshot_probe(struct usb_interface *intf, | ||
| 646 | const struct usb_device_id *id) | ||
| 647 | { | ||
| 648 | struct us_data *us; | ||
| 649 | int result; | ||
| 650 | |||
| 651 | result = usb_stor_probe1(&us, intf, id, | ||
| 652 | (id - jumpshot_usb_ids) + jumpshot_unusual_dev_list); | ||
| 653 | if (result) | ||
| 654 | return result; | ||
| 655 | |||
| 656 | us->transport_name = "Lexar Jumpshot Control/Bulk"; | ||
| 657 | us->transport = jumpshot_transport; | ||
| 658 | us->transport_reset = usb_stor_Bulk_reset; | ||
| 659 | us->max_lun = 1; | ||
| 660 | |||
| 661 | result = usb_stor_probe2(us); | ||
| 662 | return result; | ||
| 663 | } | ||
| 664 | |||
| 665 | static struct usb_driver jumpshot_driver = { | ||
| 666 | .name = "ums-jumpshot", | ||
| 667 | .probe = jumpshot_probe, | ||
| 668 | .disconnect = usb_stor_disconnect, | ||
| 669 | .suspend = usb_stor_suspend, | ||
| 670 | .resume = usb_stor_resume, | ||
| 671 | .reset_resume = usb_stor_reset_resume, | ||
| 672 | .pre_reset = usb_stor_pre_reset, | ||
| 673 | .post_reset = usb_stor_post_reset, | ||
| 674 | .id_table = jumpshot_usb_ids, | ||
| 675 | .soft_unbind = 1, | ||
| 676 | }; | ||
| 677 | |||
| 678 | static int __init jumpshot_init(void) | ||
| 679 | { | ||
| 680 | return usb_register(&jumpshot_driver); | ||
| 681 | } | ||
| 682 | |||
| 683 | static void __exit jumpshot_exit(void) | ||
| 684 | { | ||
| 685 | usb_deregister(&jumpshot_driver); | ||
| 686 | } | ||
| 687 | |||
| 688 | module_init(jumpshot_init); | ||
| 689 | module_exit(jumpshot_exit); | ||
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index a5867c6d761b..24e23c29d292 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
| @@ -794,14 +794,6 @@ UNUSUAL_DEV( 0x05c6, 0x1000, 0x0000, 0x9999, | |||
| 794 | US_SC_DEVICE, US_PR_DEVICE, option_ms_init, | 794 | US_SC_DEVICE, US_PR_DEVICE, option_ms_init, |
| 795 | 0), | 795 | 0), |
| 796 | 796 | ||
| 797 | #ifdef CONFIG_USB_STORAGE_JUMPSHOT | ||
| 798 | UNUSUAL_DEV( 0x05dc, 0x0001, 0x0000, 0x0001, | ||
| 799 | "Lexar", | ||
| 800 | "Jumpshot USB CF Reader", | ||
| 801 | US_SC_SCSI, US_PR_JUMPSHOT, NULL, | ||
| 802 | US_FL_NEED_OVERRIDE ), | ||
| 803 | #endif | ||
| 804 | |||
| 805 | /* Reported by Blake Matheny <bmatheny@purdue.edu> */ | 797 | /* Reported by Blake Matheny <bmatheny@purdue.edu> */ |
| 806 | UNUSUAL_DEV( 0x05dc, 0xb002, 0x0000, 0x0113, | 798 | UNUSUAL_DEV( 0x05dc, 0xb002, 0x0000, 0x0113, |
| 807 | "Lexar", | 799 | "Lexar", |
diff --git a/drivers/usb/storage/jumpshot.h b/drivers/usb/storage/unusual_jumpshot.h index 19bac9d1558f..2e549b1c2c62 100644 --- a/drivers/usb/storage/jumpshot.h +++ b/drivers/usb/storage/unusual_jumpshot.h | |||
| @@ -1,10 +1,4 @@ | |||
| 1 | /* Driver for Lexar "Jumpshot" USB Compact Flash reader | 1 | /* Unusual Devices File for the Lexar "Jumpshot" Compact Flash reader |
| 2 | * Header File | ||
| 3 | * | ||
| 4 | * Current development and maintenance by: | ||
| 5 | * (c) 2000 Jimmie Mayfield (mayfield+usb@sackheads.org) | ||
| 6 | * | ||
| 7 | * See jumpshot.c for more explanation | ||
| 8 | * | 2 | * |
| 9 | * This program is free software; you can redistribute it and/or modify it | 3 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * under the terms of the GNU General Public License as published by the | 4 | * under the terms of the GNU General Public License as published by the |
| @@ -21,19 +15,13 @@ | |||
| 21 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 15 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
| 22 | */ | 16 | */ |
| 23 | 17 | ||
| 24 | #ifndef _USB_JUMPSHOT_H | 18 | #if defined(CONFIG_USB_STORAGE_JUMPSHOT) || \ |
| 25 | #define _USB_JUMPSHOT_H | 19 | defined(CONFIG_USB_STORAGE_JUMPSHOT_MODULE) |
| 26 | |||
| 27 | extern int jumpshot_transport(struct scsi_cmnd *srb, struct us_data *us); | ||
| 28 | 20 | ||
| 29 | struct jumpshot_info { | 21 | UNUSUAL_DEV( 0x05dc, 0x0001, 0x0000, 0x0001, |
| 30 | unsigned long sectors; // total sector count | 22 | "Lexar", |
| 31 | unsigned long ssize; // sector size in bytes | 23 | "Jumpshot USB CF Reader", |
| 32 | 24 | US_SC_SCSI, US_PR_JUMPSHOT, NULL, | |
| 33 | // the following aren't used yet | 25 | US_FL_NEED_OVERRIDE), |
| 34 | unsigned char sense_key; | ||
| 35 | unsigned long sense_asc; // additional sense code | ||
| 36 | unsigned long sense_ascq; // additional sense code qualifier | ||
| 37 | }; | ||
| 38 | 26 | ||
| 39 | #endif | 27 | #endif /* defined(CONFIG_USB_STORAGE_JUMPSHOT) || ... */ |
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index a537b3513b9b..2ea57691a7ba 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
| @@ -66,9 +66,6 @@ | |||
| 66 | #include "debug.h" | 66 | #include "debug.h" |
| 67 | #include "initializers.h" | 67 | #include "initializers.h" |
| 68 | 68 | ||
| 69 | #ifdef CONFIG_USB_STORAGE_JUMPSHOT | ||
| 70 | #include "jumpshot.h" | ||
| 71 | #endif | ||
| 72 | #ifdef CONFIG_USB_STORAGE_ONETOUCH | 69 | #ifdef CONFIG_USB_STORAGE_ONETOUCH |
| 73 | #include "onetouch.h" | 70 | #include "onetouch.h" |
| 74 | #endif | 71 | #endif |
| @@ -601,15 +598,6 @@ static void get_transport(struct us_data *us) | |||
| 601 | us->transport_reset = usb_stor_Bulk_reset; | 598 | us->transport_reset = usb_stor_Bulk_reset; |
| 602 | break; | 599 | break; |
| 603 | 600 | ||
| 604 | #ifdef CONFIG_USB_STORAGE_JUMPSHOT | ||
| 605 | case US_PR_JUMPSHOT: | ||
| 606 | us->transport_name = "Lexar Jumpshot Control/Bulk"; | ||
| 607 | us->transport = jumpshot_transport; | ||
| 608 | us->transport_reset = usb_stor_Bulk_reset; | ||
| 609 | us->max_lun = 1; | ||
| 610 | break; | ||
| 611 | #endif | ||
| 612 | |||
| 613 | #ifdef CONFIG_USB_STORAGE_ALAUDA | 601 | #ifdef CONFIG_USB_STORAGE_ALAUDA |
| 614 | case US_PR_ALAUDA: | 602 | case US_PR_ALAUDA: |
| 615 | us->transport_name = "Alauda Control/Bulk"; | 603 | us->transport_name = "Alauda Control/Bulk"; |
diff --git a/drivers/usb/storage/usual-tables.c b/drivers/usb/storage/usual-tables.c index c6ceac62cf60..182a097e0767 100644 --- a/drivers/usb/storage/usual-tables.c +++ b/drivers/usb/storage/usual-tables.c | |||
| @@ -81,6 +81,7 @@ static struct ignore_entry ignore_ids[] = { | |||
| 81 | # include "unusual_datafab.h" | 81 | # include "unusual_datafab.h" |
| 82 | # include "unusual_freecom.h" | 82 | # include "unusual_freecom.h" |
| 83 | # include "unusual_isd200.h" | 83 | # include "unusual_isd200.h" |
| 84 | # include "unusual_jumpshot.h" | ||
| 84 | # include "unusual_sddr09.h" | 85 | # include "unusual_sddr09.h" |
| 85 | # include "unusual_sddr55.h" | 86 | # include "unusual_sddr55.h" |
| 86 | # include "unusual_usbat.h" | 87 | # include "unusual_usbat.h" |
