diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 19:36:53 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 19:36:53 -0500 |
| commit | 10955d2251387df3997d8b9b6c572dfad9f23dd0 (patch) | |
| tree | f7962c9d20c41ca9139f06164c3c484cd245d514 | |
| parent | b2a5cd6938879b5bcfef0a73c28fea84c49519c2 (diff) | |
| parent | 4ae897df80019db433cd46cdd50d3b48463757d9 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: ftdi_sio - really enable EM1010PC
USB: remove incorrect struct class_device from the printer gadget
USB: pxa2xx_udc: fix misuse of clock enable/disable calls
USB: ftdi_sio: Workaround for broken Matrix Orbital serial port
USB: Add support for AXESSTEL MV110H CDMA modem
usb-storage: update earlier scatter-gather bug fix
USB: isp116x: fix enumeration on boot
USB: ehci: handle large bulk URBs correctly (again)
USB: spruce up the device blacklist
USB: fix comment of struct usb_interface
USB: update Kconfig entry for USB_SUSPEND
usb: Add support for the mos7820/7840-based B&B USB/RS485 converter to mos7840.c
| -rw-r--r-- | drivers/usb/core/Kconfig | 9 | ||||
| -rw-r--r-- | drivers/usb/core/quirks.c | 21 | ||||
| -rw-r--r-- | drivers/usb/gadget/printer.c | 1 | ||||
| -rw-r--r-- | drivers/usb/gadget/pxa2xx_udc.c | 88 | ||||
| -rw-r--r-- | drivers/usb/gadget/pxa2xx_udc.h | 4 | ||||
| -rw-r--r-- | drivers/usb/host/ehci-q.c | 2 | ||||
| -rw-r--r-- | drivers/usb/host/isp116x-hcd.c | 15 | ||||
| -rw-r--r-- | drivers/usb/host/isp116x.h | 1 | ||||
| -rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 25 | ||||
| -rw-r--r-- | drivers/usb/serial/ftdi_sio.h | 7 | ||||
| -rw-r--r-- | drivers/usb/serial/mos7840.c | 15 | ||||
| -rw-r--r-- | drivers/usb/serial/option.c | 4 | ||||
| -rw-r--r-- | drivers/usb/storage/protocol.c | 2 | ||||
| -rw-r--r-- | include/linux/usb.h | 3 |
14 files changed, 129 insertions, 68 deletions
diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig index 5c33cdb9cac7..a2b0aa48b8ea 100644 --- a/drivers/usb/core/Kconfig +++ b/drivers/usb/core/Kconfig | |||
| @@ -87,12 +87,13 @@ config USB_DYNAMIC_MINORS | |||
| 87 | If you are unsure about this, say N here. | 87 | If you are unsure about this, say N here. |
| 88 | 88 | ||
| 89 | config USB_SUSPEND | 89 | config USB_SUSPEND |
| 90 | bool "USB selective suspend/resume and wakeup (EXPERIMENTAL)" | 90 | bool "USB selective suspend/resume and wakeup" |
| 91 | depends on USB && PM && EXPERIMENTAL | 91 | depends on USB && PM |
| 92 | help | 92 | help |
| 93 | If you say Y here, you can use driver calls or the sysfs | 93 | If you say Y here, you can use driver calls or the sysfs |
| 94 | "power/state" file to suspend or resume individual USB | 94 | "power/level" file to suspend or resume individual USB |
| 95 | peripherals. | 95 | peripherals and to enable or disable autosuspend (see |
| 96 | Documentation/usb/power-management.txt for more details). | ||
| 96 | 97 | ||
| 97 | Also, USB "remote wakeup" signaling is supported, whereby some | 98 | Also, USB "remote wakeup" signaling is supported, whereby some |
| 98 | USB devices (like keyboards and network adapters) can wake up | 99 | USB devices (like keyboards and network adapters) can wake up |
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index f90ab5e94c58..d9d1eb19f2a1 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c | |||
| @@ -28,35 +28,38 @@ | |||
| 28 | * devices is broken... | 28 | * devices is broken... |
| 29 | */ | 29 | */ |
| 30 | static const struct usb_device_id usb_quirk_list[] = { | 30 | static const struct usb_device_id usb_quirk_list[] = { |
| 31 | /* Action Semiconductor flash disk */ | ||
| 32 | { USB_DEVICE(0x10d6, 0x2200), .driver_info = USB_QUIRK_STRING_FETCH_255}, | ||
| 33 | |||
| 34 | /* CBM - Flash disk */ | 31 | /* CBM - Flash disk */ |
| 35 | { USB_DEVICE(0x0204, 0x6025), .driver_info = USB_QUIRK_RESET_RESUME }, | 32 | { USB_DEVICE(0x0204, 0x6025), .driver_info = USB_QUIRK_RESET_RESUME }, |
| 33 | |||
| 36 | /* HP 5300/5370C scanner */ | 34 | /* HP 5300/5370C scanner */ |
| 37 | { USB_DEVICE(0x03f0, 0x0701), .driver_info = USB_QUIRK_STRING_FETCH_255 }, | 35 | { USB_DEVICE(0x03f0, 0x0701), .driver_info = |
| 36 | USB_QUIRK_STRING_FETCH_255 }, | ||
| 38 | 37 | ||
| 39 | /* Creative SB Audigy 2 NX */ | 38 | /* Creative SB Audigy 2 NX */ |
| 40 | { USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME }, | 39 | { USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME }, |
| 41 | 40 | ||
| 41 | /* Philips PSC805 audio device */ | ||
| 42 | { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME }, | ||
| 43 | |||
| 42 | /* Roland SC-8820 */ | 44 | /* Roland SC-8820 */ |
| 43 | { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME }, | 45 | { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME }, |
| 44 | 46 | ||
| 45 | /* Edirol SD-20 */ | 47 | /* Edirol SD-20 */ |
| 46 | { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME }, | 48 | { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME }, |
| 47 | 49 | ||
| 48 | /* INTEL VALUE SSD */ | ||
| 49 | { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME }, | ||
| 50 | |||
| 51 | /* M-Systems Flash Disk Pioneers */ | 50 | /* M-Systems Flash Disk Pioneers */ |
| 52 | { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, | 51 | { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, |
| 53 | 52 | ||
| 54 | /* Philips PSC805 audio device */ | 53 | /* Action Semiconductor flash disk */ |
| 55 | { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME }, | 54 | { USB_DEVICE(0x10d6, 0x2200), .driver_info = |
| 55 | USB_QUIRK_STRING_FETCH_255 }, | ||
| 56 | 56 | ||
| 57 | /* SKYMEDI USB_DRIVE */ | 57 | /* SKYMEDI USB_DRIVE */ |
| 58 | { USB_DEVICE(0x1516, 0x8628), .driver_info = USB_QUIRK_RESET_RESUME }, | 58 | { USB_DEVICE(0x1516, 0x8628), .driver_info = USB_QUIRK_RESET_RESUME }, |
| 59 | 59 | ||
| 60 | /* INTEL VALUE SSD */ | ||
| 61 | { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME }, | ||
| 62 | |||
| 60 | { } /* terminating entry must be last */ | 63 | { } /* terminating entry must be last */ |
| 61 | }; | 64 | }; |
| 62 | 65 | ||
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 4f6bfa100f2a..2c32bd08ee7d 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
| @@ -92,7 +92,6 @@ struct printer_dev { | |||
| 92 | u8 *current_rx_buf; | 92 | u8 *current_rx_buf; |
| 93 | u8 printer_status; | 93 | u8 printer_status; |
| 94 | u8 reset_printer; | 94 | u8 reset_printer; |
| 95 | struct class_device *printer_class_dev; | ||
| 96 | struct cdev printer_cdev; | 95 | struct cdev printer_cdev; |
| 97 | struct device *pdev; | 96 | struct device *pdev; |
| 98 | u8 printer_cdev_open; | 97 | u8 printer_cdev_open; |
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c index 4402d6f042d9..096c41cc40d1 100644 --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c | |||
| @@ -103,6 +103,12 @@ static const char ep0name [] = "ep0"; | |||
| 103 | #error "Can't configure both IXP and PXA" | 103 | #error "Can't configure both IXP and PXA" |
| 104 | #endif | 104 | #endif |
| 105 | 105 | ||
| 106 | /* IXP doesn't yet support <linux/clk.h> */ | ||
| 107 | #define clk_get(dev,name) NULL | ||
| 108 | #define clk_enable(clk) do { } while (0) | ||
| 109 | #define clk_disable(clk) do { } while (0) | ||
| 110 | #define clk_put(clk) do { } while (0) | ||
| 111 | |||
| 106 | #endif | 112 | #endif |
| 107 | 113 | ||
| 108 | #include "pxa2xx_udc.h" | 114 | #include "pxa2xx_udc.h" |
| @@ -934,20 +940,31 @@ static void udc_disable(struct pxa2xx_udc *); | |||
| 934 | /* We disable the UDC -- and its 48 MHz clock -- whenever it's not | 940 | /* We disable the UDC -- and its 48 MHz clock -- whenever it's not |
| 935 | * in active use. | 941 | * in active use. |
| 936 | */ | 942 | */ |
| 937 | static int pullup(struct pxa2xx_udc *udc, int is_active) | 943 | static int pullup(struct pxa2xx_udc *udc) |
| 938 | { | 944 | { |
| 939 | is_active = is_active && udc->vbus && udc->pullup; | 945 | int is_active = udc->vbus && udc->pullup && !udc->suspended; |
| 940 | DMSG("%s\n", is_active ? "active" : "inactive"); | 946 | DMSG("%s\n", is_active ? "active" : "inactive"); |
| 941 | if (is_active) | 947 | if (is_active) { |
| 942 | udc_enable(udc); | 948 | if (!udc->active) { |
| 943 | else { | 949 | udc->active = 1; |
| 944 | if (udc->gadget.speed != USB_SPEED_UNKNOWN) { | 950 | /* Enable clock for USB device */ |
| 945 | DMSG("disconnect %s\n", udc->driver | 951 | clk_enable(udc->clk); |
| 946 | ? udc->driver->driver.name | 952 | udc_enable(udc); |
| 947 | : "(no driver)"); | ||
| 948 | stop_activity(udc, udc->driver); | ||
| 949 | } | 953 | } |
| 950 | udc_disable(udc); | 954 | } else { |
| 955 | if (udc->active) { | ||
| 956 | if (udc->gadget.speed != USB_SPEED_UNKNOWN) { | ||
| 957 | DMSG("disconnect %s\n", udc->driver | ||
| 958 | ? udc->driver->driver.name | ||
| 959 | : "(no driver)"); | ||
| 960 | stop_activity(udc, udc->driver); | ||
| 961 | } | ||
| 962 | udc_disable(udc); | ||
| 963 | /* Disable clock for USB device */ | ||
| 964 | clk_disable(udc->clk); | ||
| 965 | udc->active = 0; | ||
| 966 | } | ||
| 967 | |||
| 951 | } | 968 | } |
| 952 | return 0; | 969 | return 0; |
| 953 | } | 970 | } |
| @@ -958,9 +975,9 @@ static int pxa2xx_udc_vbus_session(struct usb_gadget *_gadget, int is_active) | |||
| 958 | struct pxa2xx_udc *udc; | 975 | struct pxa2xx_udc *udc; |
| 959 | 976 | ||
| 960 | udc = container_of(_gadget, struct pxa2xx_udc, gadget); | 977 | udc = container_of(_gadget, struct pxa2xx_udc, gadget); |
| 961 | udc->vbus = is_active = (is_active != 0); | 978 | udc->vbus = (is_active != 0); |
| 962 | DMSG("vbus %s\n", is_active ? "supplied" : "inactive"); | 979 | DMSG("vbus %s\n", is_active ? "supplied" : "inactive"); |
| 963 | pullup(udc, is_active); | 980 | pullup(udc); |
| 964 | return 0; | 981 | return 0; |
| 965 | } | 982 | } |
| 966 | 983 | ||
| @@ -975,9 +992,8 @@ static int pxa2xx_udc_pullup(struct usb_gadget *_gadget, int is_active) | |||
| 975 | if (!udc->mach->gpio_pullup && !udc->mach->udc_command) | 992 | if (!udc->mach->gpio_pullup && !udc->mach->udc_command) |
| 976 | return -EOPNOTSUPP; | 993 | return -EOPNOTSUPP; |
| 977 | 994 | ||
| 978 | is_active = (is_active != 0); | 995 | udc->pullup = (is_active != 0); |
| 979 | udc->pullup = is_active; | 996 | pullup(udc); |
| 980 | pullup(udc, is_active); | ||
| 981 | return 0; | 997 | return 0; |
| 982 | } | 998 | } |
| 983 | 999 | ||
| @@ -997,7 +1013,7 @@ static const struct usb_gadget_ops pxa2xx_udc_ops = { | |||
| 997 | #ifdef CONFIG_USB_GADGET_DEBUG_FS | 1013 | #ifdef CONFIG_USB_GADGET_DEBUG_FS |
| 998 | 1014 | ||
| 999 | static int | 1015 | static int |
| 1000 | udc_seq_show(struct seq_file *m, void *d) | 1016 | udc_seq_show(struct seq_file *m, void *_d) |
| 1001 | { | 1017 | { |
| 1002 | struct pxa2xx_udc *dev = m->private; | 1018 | struct pxa2xx_udc *dev = m->private; |
| 1003 | unsigned long flags; | 1019 | unsigned long flags; |
| @@ -1146,11 +1162,6 @@ static void udc_disable(struct pxa2xx_udc *dev) | |||
| 1146 | 1162 | ||
| 1147 | udc_clear_mask_UDCCR(UDCCR_UDE); | 1163 | udc_clear_mask_UDCCR(UDCCR_UDE); |
| 1148 | 1164 | ||
| 1149 | #ifdef CONFIG_ARCH_PXA | ||
| 1150 | /* Disable clock for USB device */ | ||
| 1151 | clk_disable(dev->clk); | ||
| 1152 | #endif | ||
| 1153 | |||
| 1154 | ep0_idle (dev); | 1165 | ep0_idle (dev); |
| 1155 | dev->gadget.speed = USB_SPEED_UNKNOWN; | 1166 | dev->gadget.speed = USB_SPEED_UNKNOWN; |
| 1156 | } | 1167 | } |
| @@ -1191,11 +1202,6 @@ static void udc_enable (struct pxa2xx_udc *dev) | |||
| 1191 | { | 1202 | { |
| 1192 | udc_clear_mask_UDCCR(UDCCR_UDE); | 1203 | udc_clear_mask_UDCCR(UDCCR_UDE); |
| 1193 | 1204 | ||
| 1194 | #ifdef CONFIG_ARCH_PXA | ||
| 1195 | /* Enable clock for USB device */ | ||
| 1196 | clk_enable(dev->clk); | ||
| 1197 | #endif | ||
| 1198 | |||
| 1199 | /* try to clear these bits before we enable the udc */ | 1205 | /* try to clear these bits before we enable the udc */ |
| 1200 | udc_ack_int_UDCCR(UDCCR_SUSIR|/*UDCCR_RSTIR|*/UDCCR_RESIR); | 1206 | udc_ack_int_UDCCR(UDCCR_SUSIR|/*UDCCR_RSTIR|*/UDCCR_RESIR); |
| 1201 | 1207 | ||
| @@ -1286,7 +1292,7 @@ fail: | |||
| 1286 | * for set_configuration as well as eventual disconnect. | 1292 | * for set_configuration as well as eventual disconnect. |
| 1287 | */ | 1293 | */ |
| 1288 | DMSG("registered gadget driver '%s'\n", driver->driver.name); | 1294 | DMSG("registered gadget driver '%s'\n", driver->driver.name); |
| 1289 | pullup(dev, 1); | 1295 | pullup(dev); |
| 1290 | dump_state(dev); | 1296 | dump_state(dev); |
| 1291 | return 0; | 1297 | return 0; |
| 1292 | } | 1298 | } |
| @@ -1329,7 +1335,8 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) | |||
| 1329 | return -EINVAL; | 1335 | return -EINVAL; |
| 1330 | 1336 | ||
| 1331 | local_irq_disable(); | 1337 | local_irq_disable(); |
| 1332 | pullup(dev, 0); | 1338 | dev->pullup = 0; |
| 1339 | pullup(dev); | ||
| 1333 | stop_activity(dev, driver); | 1340 | stop_activity(dev, driver); |
| 1334 | local_irq_enable(); | 1341 | local_irq_enable(); |
| 1335 | 1342 | ||
| @@ -2131,13 +2138,11 @@ static int __init pxa2xx_udc_probe(struct platform_device *pdev) | |||
| 2131 | if (irq < 0) | 2138 | if (irq < 0) |
| 2132 | return -ENODEV; | 2139 | return -ENODEV; |
| 2133 | 2140 | ||
| 2134 | #ifdef CONFIG_ARCH_PXA | ||
| 2135 | dev->clk = clk_get(&pdev->dev, "UDCCLK"); | 2141 | dev->clk = clk_get(&pdev->dev, "UDCCLK"); |
| 2136 | if (IS_ERR(dev->clk)) { | 2142 | if (IS_ERR(dev->clk)) { |
| 2137 | retval = PTR_ERR(dev->clk); | 2143 | retval = PTR_ERR(dev->clk); |
| 2138 | goto err_clk; | 2144 | goto err_clk; |
| 2139 | } | 2145 | } |
| 2140 | #endif | ||
| 2141 | 2146 | ||
| 2142 | pr_debug("%s: IRQ %d%s%s\n", driver_name, irq, | 2147 | pr_debug("%s: IRQ %d%s%s\n", driver_name, irq, |
| 2143 | dev->has_cfr ? "" : " (!cfr)", | 2148 | dev->has_cfr ? "" : " (!cfr)", |
| @@ -2250,10 +2255,8 @@ lubbock_fail0: | |||
| 2250 | if (dev->mach->gpio_vbus) | 2255 | if (dev->mach->gpio_vbus) |
| 2251 | gpio_free(dev->mach->gpio_vbus); | 2256 | gpio_free(dev->mach->gpio_vbus); |
| 2252 | err_gpio_vbus: | 2257 | err_gpio_vbus: |
| 2253 | #ifdef CONFIG_ARCH_PXA | ||
| 2254 | clk_put(dev->clk); | 2258 | clk_put(dev->clk); |
| 2255 | err_clk: | 2259 | err_clk: |
| 2256 | #endif | ||
| 2257 | return retval; | 2260 | return retval; |
| 2258 | } | 2261 | } |
| 2259 | 2262 | ||
| @@ -2269,7 +2272,9 @@ static int __exit pxa2xx_udc_remove(struct platform_device *pdev) | |||
| 2269 | if (dev->driver) | 2272 | if (dev->driver) |
| 2270 | return -EBUSY; | 2273 | return -EBUSY; |
| 2271 | 2274 | ||
| 2272 | udc_disable(dev); | 2275 | dev->pullup = 0; |
| 2276 | pullup(dev); | ||
| 2277 | |||
| 2273 | remove_debug_files(dev); | 2278 | remove_debug_files(dev); |
| 2274 | 2279 | ||
| 2275 | if (dev->got_irq) { | 2280 | if (dev->got_irq) { |
| @@ -2289,9 +2294,7 @@ static int __exit pxa2xx_udc_remove(struct platform_device *pdev) | |||
| 2289 | if (dev->mach->gpio_pullup) | 2294 | if (dev->mach->gpio_pullup) |
| 2290 | gpio_free(dev->mach->gpio_pullup); | 2295 | gpio_free(dev->mach->gpio_pullup); |
| 2291 | 2296 | ||
| 2292 | #ifdef CONFIG_ARCH_PXA | ||
| 2293 | clk_put(dev->clk); | 2297 | clk_put(dev->clk); |
| 2294 | #endif | ||
| 2295 | 2298 | ||
| 2296 | platform_set_drvdata(pdev, NULL); | 2299 | platform_set_drvdata(pdev, NULL); |
| 2297 | the_controller = NULL; | 2300 | the_controller = NULL; |
| @@ -2317,10 +2320,15 @@ static int __exit pxa2xx_udc_remove(struct platform_device *pdev) | |||
| 2317 | static int pxa2xx_udc_suspend(struct platform_device *dev, pm_message_t state) | 2320 | static int pxa2xx_udc_suspend(struct platform_device *dev, pm_message_t state) |
| 2318 | { | 2321 | { |
| 2319 | struct pxa2xx_udc *udc = platform_get_drvdata(dev); | 2322 | struct pxa2xx_udc *udc = platform_get_drvdata(dev); |
| 2323 | unsigned long flags; | ||
| 2320 | 2324 | ||
| 2321 | if (!udc->mach->gpio_pullup && !udc->mach->udc_command) | 2325 | if (!udc->mach->gpio_pullup && !udc->mach->udc_command) |
| 2322 | WARN("USB host won't detect disconnect!\n"); | 2326 | WARN("USB host won't detect disconnect!\n"); |
| 2323 | pullup(udc, 0); | 2327 | udc->suspended = 1; |
| 2328 | |||
| 2329 | local_irq_save(flags); | ||
| 2330 | pullup(udc); | ||
| 2331 | local_irq_restore(flags); | ||
| 2324 | 2332 | ||
| 2325 | return 0; | 2333 | return 0; |
| 2326 | } | 2334 | } |
| @@ -2328,8 +2336,12 @@ static int pxa2xx_udc_suspend(struct platform_device *dev, pm_message_t state) | |||
| 2328 | static int pxa2xx_udc_resume(struct platform_device *dev) | 2336 | static int pxa2xx_udc_resume(struct platform_device *dev) |
| 2329 | { | 2337 | { |
| 2330 | struct pxa2xx_udc *udc = platform_get_drvdata(dev); | 2338 | struct pxa2xx_udc *udc = platform_get_drvdata(dev); |
| 2339 | unsigned long flags; | ||
| 2331 | 2340 | ||
| 2332 | pullup(udc, 1); | 2341 | udc->suspended = 0; |
| 2342 | local_irq_save(flags); | ||
| 2343 | pullup(udc); | ||
| 2344 | local_irq_restore(flags); | ||
| 2333 | 2345 | ||
| 2334 | return 0; | 2346 | return 0; |
| 2335 | } | 2347 | } |
diff --git a/drivers/usb/gadget/pxa2xx_udc.h b/drivers/usb/gadget/pxa2xx_udc.h index b67e3ff5e4eb..e2c19e88c875 100644 --- a/drivers/usb/gadget/pxa2xx_udc.h +++ b/drivers/usb/gadget/pxa2xx_udc.h | |||
| @@ -119,7 +119,9 @@ struct pxa2xx_udc { | |||
| 119 | has_cfr : 1, | 119 | has_cfr : 1, |
| 120 | req_pending : 1, | 120 | req_pending : 1, |
| 121 | req_std : 1, | 121 | req_std : 1, |
| 122 | req_config : 1; | 122 | req_config : 1, |
| 123 | suspended : 1, | ||
| 124 | active : 1; | ||
| 123 | 125 | ||
| 124 | #define start_watchdog(dev) mod_timer(&dev->timer, jiffies + (HZ/200)) | 126 | #define start_watchdog(dev) mod_timer(&dev->timer, jiffies + (HZ/200)) |
| 125 | struct timer_list timer; | 127 | struct timer_list timer; |
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 776a97f33914..2e49de820b14 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c | |||
| @@ -319,10 +319,10 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
| 319 | if (likely (last->urb != urb)) { | 319 | if (likely (last->urb != urb)) { |
| 320 | ehci_urb_done(ehci, last->urb, last_status); | 320 | ehci_urb_done(ehci, last->urb, last_status); |
| 321 | count++; | 321 | count++; |
| 322 | last_status = -EINPROGRESS; | ||
| 322 | } | 323 | } |
| 323 | ehci_qtd_free (ehci, last); | 324 | ehci_qtd_free (ehci, last); |
| 324 | last = NULL; | 325 | last = NULL; |
| 325 | last_status = -EINPROGRESS; | ||
| 326 | } | 326 | } |
| 327 | 327 | ||
| 328 | /* ignore urbs submitted during completions we reported */ | 328 | /* ignore urbs submitted during completions we reported */ |
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c index 0130fd8571e4..d7071c855758 100644 --- a/drivers/usb/host/isp116x-hcd.c +++ b/drivers/usb/host/isp116x-hcd.c | |||
| @@ -911,8 +911,7 @@ static int isp116x_hub_status_data(struct usb_hcd *hcd, char *buf) | |||
| 911 | buf[0] = 0; | 911 | buf[0] = 0; |
| 912 | 912 | ||
| 913 | for (i = 0; i < ports; i++) { | 913 | for (i = 0; i < ports; i++) { |
| 914 | u32 status = isp116x->rhport[i] = | 914 | u32 status = isp116x_read_reg32(isp116x, i ? HCRHPORT2 : HCRHPORT1); |
| 915 | isp116x_read_reg32(isp116x, i ? HCRHPORT2 : HCRHPORT1); | ||
| 916 | 915 | ||
| 917 | if (status & (RH_PS_CSC | RH_PS_PESC | RH_PS_PSSC | 916 | if (status & (RH_PS_CSC | RH_PS_PESC | RH_PS_PSSC |
| 918 | | RH_PS_OCIC | RH_PS_PRSC)) { | 917 | | RH_PS_OCIC | RH_PS_PRSC)) { |
| @@ -1031,7 +1030,9 @@ static int isp116x_hub_control(struct usb_hcd *hcd, | |||
| 1031 | DBG("GetPortStatus\n"); | 1030 | DBG("GetPortStatus\n"); |
| 1032 | if (!wIndex || wIndex > ports) | 1031 | if (!wIndex || wIndex > ports) |
| 1033 | goto error; | 1032 | goto error; |
| 1034 | tmp = isp116x->rhport[--wIndex]; | 1033 | spin_lock_irqsave(&isp116x->lock, flags); |
| 1034 | tmp = isp116x_read_reg32(isp116x, (--wIndex) ? HCRHPORT2 : HCRHPORT1); | ||
| 1035 | spin_unlock_irqrestore(&isp116x->lock, flags); | ||
| 1035 | *(__le32 *) buf = cpu_to_le32(tmp); | 1036 | *(__le32 *) buf = cpu_to_le32(tmp); |
| 1036 | DBG("GetPortStatus: port[%d] %08x\n", wIndex + 1, tmp); | 1037 | DBG("GetPortStatus: port[%d] %08x\n", wIndex + 1, tmp); |
| 1037 | break; | 1038 | break; |
| @@ -1080,8 +1081,6 @@ static int isp116x_hub_control(struct usb_hcd *hcd, | |||
| 1080 | spin_lock_irqsave(&isp116x->lock, flags); | 1081 | spin_lock_irqsave(&isp116x->lock, flags); |
| 1081 | isp116x_write_reg32(isp116x, wIndex | 1082 | isp116x_write_reg32(isp116x, wIndex |
| 1082 | ? HCRHPORT2 : HCRHPORT1, tmp); | 1083 | ? HCRHPORT2 : HCRHPORT1, tmp); |
| 1083 | isp116x->rhport[wIndex] = | ||
| 1084 | isp116x_read_reg32(isp116x, wIndex ? HCRHPORT2 : HCRHPORT1); | ||
| 1085 | spin_unlock_irqrestore(&isp116x->lock, flags); | 1084 | spin_unlock_irqrestore(&isp116x->lock, flags); |
| 1086 | break; | 1085 | break; |
| 1087 | case SetPortFeature: | 1086 | case SetPortFeature: |
| @@ -1095,24 +1094,22 @@ static int isp116x_hub_control(struct usb_hcd *hcd, | |||
| 1095 | spin_lock_irqsave(&isp116x->lock, flags); | 1094 | spin_lock_irqsave(&isp116x->lock, flags); |
| 1096 | isp116x_write_reg32(isp116x, wIndex | 1095 | isp116x_write_reg32(isp116x, wIndex |
| 1097 | ? HCRHPORT2 : HCRHPORT1, RH_PS_PSS); | 1096 | ? HCRHPORT2 : HCRHPORT1, RH_PS_PSS); |
| 1097 | spin_unlock_irqrestore(&isp116x->lock, flags); | ||
| 1098 | break; | 1098 | break; |
| 1099 | case USB_PORT_FEAT_POWER: | 1099 | case USB_PORT_FEAT_POWER: |
| 1100 | DBG("USB_PORT_FEAT_POWER\n"); | 1100 | DBG("USB_PORT_FEAT_POWER\n"); |
| 1101 | spin_lock_irqsave(&isp116x->lock, flags); | 1101 | spin_lock_irqsave(&isp116x->lock, flags); |
| 1102 | isp116x_write_reg32(isp116x, wIndex | 1102 | isp116x_write_reg32(isp116x, wIndex |
| 1103 | ? HCRHPORT2 : HCRHPORT1, RH_PS_PPS); | 1103 | ? HCRHPORT2 : HCRHPORT1, RH_PS_PPS); |
| 1104 | spin_unlock_irqrestore(&isp116x->lock, flags); | ||
| 1104 | break; | 1105 | break; |
| 1105 | case USB_PORT_FEAT_RESET: | 1106 | case USB_PORT_FEAT_RESET: |
| 1106 | DBG("USB_PORT_FEAT_RESET\n"); | 1107 | DBG("USB_PORT_FEAT_RESET\n"); |
| 1107 | root_port_reset(isp116x, wIndex); | 1108 | root_port_reset(isp116x, wIndex); |
| 1108 | spin_lock_irqsave(&isp116x->lock, flags); | ||
| 1109 | break; | 1109 | break; |
| 1110 | default: | 1110 | default: |
| 1111 | goto error; | 1111 | goto error; |
| 1112 | } | 1112 | } |
| 1113 | isp116x->rhport[wIndex] = | ||
| 1114 | isp116x_read_reg32(isp116x, wIndex ? HCRHPORT2 : HCRHPORT1); | ||
| 1115 | spin_unlock_irqrestore(&isp116x->lock, flags); | ||
| 1116 | break; | 1113 | break; |
| 1117 | 1114 | ||
| 1118 | default: | 1115 | default: |
diff --git a/drivers/usb/host/isp116x.h b/drivers/usb/host/isp116x.h index b91e2edd9c5c..595b90a99848 100644 --- a/drivers/usb/host/isp116x.h +++ b/drivers/usb/host/isp116x.h | |||
| @@ -270,7 +270,6 @@ struct isp116x { | |||
| 270 | u32 rhdesca; | 270 | u32 rhdesca; |
| 271 | u32 rhdescb; | 271 | u32 rhdescb; |
| 272 | u32 rhstatus; | 272 | u32 rhstatus; |
| 273 | u32 rhport[2]; | ||
| 274 | 273 | ||
| 275 | /* async schedule: control, bulk */ | 274 | /* async schedule: control, bulk */ |
| 276 | struct list_head async; | 275 | struct list_head async; |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 76db2fef4657..91dc433dbcf1 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
| @@ -92,6 +92,7 @@ struct ftdi_sio_quirk { | |||
| 92 | }; | 92 | }; |
| 93 | 93 | ||
| 94 | static int ftdi_jtag_probe (struct usb_serial *serial); | 94 | static int ftdi_jtag_probe (struct usb_serial *serial); |
| 95 | static int ftdi_mtxorb_hack_setup (struct usb_serial *serial); | ||
| 95 | static void ftdi_USB_UIRT_setup (struct ftdi_private *priv); | 96 | static void ftdi_USB_UIRT_setup (struct ftdi_private *priv); |
| 96 | static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv); | 97 | static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv); |
| 97 | 98 | ||
| @@ -99,6 +100,10 @@ static struct ftdi_sio_quirk ftdi_jtag_quirk = { | |||
| 99 | .probe = ftdi_jtag_probe, | 100 | .probe = ftdi_jtag_probe, |
| 100 | }; | 101 | }; |
| 101 | 102 | ||
| 103 | static struct ftdi_sio_quirk ftdi_mtxorb_hack_quirk = { | ||
| 104 | .probe = ftdi_mtxorb_hack_setup, | ||
| 105 | }; | ||
| 106 | |||
| 102 | static struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = { | 107 | static struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = { |
| 103 | .port_probe = ftdi_USB_UIRT_setup, | 108 | .port_probe = ftdi_USB_UIRT_setup, |
| 104 | }; | 109 | }; |
| @@ -161,6 +166,8 @@ static struct usb_device_id id_table_combined [] = { | |||
| 161 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) }, | 166 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) }, |
| 162 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, | 167 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, |
| 163 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, | 168 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, |
| 169 | { USB_DEVICE(MTXORB_VK_VID, MTXORB_VK_PID), | ||
| 170 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
| 164 | { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) }, | 171 | { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) }, |
| 165 | { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, | 172 | { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, |
| 166 | { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) }, | 173 | { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) }, |
| @@ -274,6 +281,7 @@ static struct usb_device_id id_table_combined [] = { | |||
| 274 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FS20SIG_PID) }, | 281 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FS20SIG_PID) }, |
| 275 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS300PC_PID) }, | 282 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS300PC_PID) }, |
| 276 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1300PC_PID) }, | 283 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1300PC_PID) }, |
| 284 | { USB_DEVICE(FTDI_VID, FTDI_ELV_EM1010PC_PID) }, | ||
| 277 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS500_PID) }, | 285 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS500_PID) }, |
| 278 | { USB_DEVICE(FTDI_VID, LINX_SDMUSBQSS_PID) }, | 286 | { USB_DEVICE(FTDI_VID, LINX_SDMUSBQSS_PID) }, |
| 279 | { USB_DEVICE(FTDI_VID, LINX_MASTERDEVEL2_PID) }, | 287 | { USB_DEVICE(FTDI_VID, LINX_MASTERDEVEL2_PID) }, |
| @@ -1088,6 +1096,23 @@ static int ftdi_jtag_probe(struct usb_serial *serial) | |||
| 1088 | return 0; | 1096 | return 0; |
| 1089 | } | 1097 | } |
| 1090 | 1098 | ||
| 1099 | /* | ||
| 1100 | * The Matrix Orbital VK204-25-USB has an invalid IN endpoint. | ||
| 1101 | * We have to correct it if we want to read from it. | ||
| 1102 | */ | ||
| 1103 | static int ftdi_mtxorb_hack_setup(struct usb_serial *serial) | ||
| 1104 | { | ||
| 1105 | struct usb_host_endpoint *ep = serial->dev->ep_in[1]; | ||
| 1106 | struct usb_endpoint_descriptor *ep_desc = &ep->desc; | ||
| 1107 | |||
| 1108 | if (ep->enabled && ep_desc->wMaxPacketSize == 0) { | ||
| 1109 | ep_desc->wMaxPacketSize = 0x40; | ||
| 1110 | info("Fixing invalid wMaxPacketSize on read pipe"); | ||
| 1111 | } | ||
| 1112 | |||
| 1113 | return 0; | ||
| 1114 | } | ||
| 1115 | |||
| 1091 | /* ftdi_shutdown is called from usbserial:usb_serial_disconnect | 1116 | /* ftdi_shutdown is called from usbserial:usb_serial_disconnect |
| 1092 | * it is called when the usb device is disconnected | 1117 | * it is called when the usb device is disconnected |
| 1093 | * | 1118 | * |
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index 6eee2ab914ec..e1eb742abcd5 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
| @@ -102,6 +102,13 @@ | |||
| 102 | * (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */ | 102 | * (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */ |
| 103 | #define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ | 103 | #define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ |
| 104 | 104 | ||
| 105 | /* | ||
| 106 | * The following are the values for the Matrix Orbital VK204-25-USB | ||
| 107 | * display, which use the FT232RL. | ||
| 108 | */ | ||
| 109 | #define MTXORB_VK_VID 0x1b3d | ||
| 110 | #define MTXORB_VK_PID 0x0158 | ||
| 111 | |||
| 105 | /* Interbiometrics USB I/O Board */ | 112 | /* Interbiometrics USB I/O Board */ |
| 106 | /* Developed for Interbiometrics by Rudolf Gugler */ | 113 | /* Developed for Interbiometrics by Rudolf Gugler */ |
| 107 | #define INTERBIOMETRICS_VID 0x1209 | 114 | #define INTERBIOMETRICS_VID 0x1209 |
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 869ecd374cb4..aeeb9cb20999 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
| @@ -110,11 +110,20 @@ | |||
| 110 | 110 | ||
| 111 | /* vendor id and device id defines */ | 111 | /* vendor id and device id defines */ |
| 112 | 112 | ||
| 113 | /* The native mos7840/7820 component */ | ||
| 113 | #define USB_VENDOR_ID_MOSCHIP 0x9710 | 114 | #define USB_VENDOR_ID_MOSCHIP 0x9710 |
| 114 | #define MOSCHIP_DEVICE_ID_7840 0x7840 | 115 | #define MOSCHIP_DEVICE_ID_7840 0x7840 |
| 115 | #define MOSCHIP_DEVICE_ID_7820 0x7820 | 116 | #define MOSCHIP_DEVICE_ID_7820 0x7820 |
| 117 | /* The native component can have its vendor/device id's overridden | ||
| 118 | * in vendor-specific implementations. Such devices can be handled | ||
| 119 | * by making a change here, in moschip_port_id_table, and in | ||
| 120 | * moschip_id_table_combined | ||
| 121 | */ | ||
| 122 | #define USB_VENDOR_ID_BANDB 0x0856 | ||
| 123 | #define BANDB_DEVICE_ID_USOPTL4_4 0xAC44 | ||
| 124 | #define BANDB_DEVICE_ID_USOPTL4_2 0xAC42 | ||
| 116 | 125 | ||
| 117 | /* Interrupt Rotinue Defines */ | 126 | /* Interrupt Routine Defines */ |
| 118 | 127 | ||
| 119 | #define SERIAL_IIR_RLS 0x06 | 128 | #define SERIAL_IIR_RLS 0x06 |
| 120 | #define SERIAL_IIR_MS 0x00 | 129 | #define SERIAL_IIR_MS 0x00 |
| @@ -159,12 +168,16 @@ | |||
| 159 | static struct usb_device_id moschip_port_id_table[] = { | 168 | static struct usb_device_id moschip_port_id_table[] = { |
| 160 | {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)}, | 169 | {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)}, |
| 161 | {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)}, | 170 | {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)}, |
| 171 | {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)}, | ||
| 172 | {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)}, | ||
| 162 | {} /* terminating entry */ | 173 | {} /* terminating entry */ |
| 163 | }; | 174 | }; |
| 164 | 175 | ||
| 165 | static __devinitdata struct usb_device_id moschip_id_table_combined[] = { | 176 | static __devinitdata struct usb_device_id moschip_id_table_combined[] = { |
| 166 | {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)}, | 177 | {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)}, |
| 167 | {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)}, | 178 | {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)}, |
| 179 | {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)}, | ||
| 180 | {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)}, | ||
| 168 | {} /* terminating entry */ | 181 | {} /* terminating entry */ |
| 169 | }; | 182 | }; |
| 170 | 183 | ||
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index af2674c57414..828a4377ec6a 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
| @@ -120,6 +120,9 @@ static int option_send_setup(struct usb_serial_port *port); | |||
| 120 | #define ANYDATA_PRODUCT_ADU_E100A 0x6501 | 120 | #define ANYDATA_PRODUCT_ADU_E100A 0x6501 |
| 121 | #define ANYDATA_PRODUCT_ADU_500A 0x6502 | 121 | #define ANYDATA_PRODUCT_ADU_500A 0x6502 |
| 122 | 122 | ||
| 123 | #define AXESSTEL_VENDOR_ID 0x1726 | ||
| 124 | #define AXESSTEL_PRODUCT_MV110H 0x1000 | ||
| 125 | |||
| 123 | #define BANDRICH_VENDOR_ID 0x1A8D | 126 | #define BANDRICH_VENDOR_ID 0x1A8D |
| 124 | #define BANDRICH_PRODUCT_C100_1 0x1002 | 127 | #define BANDRICH_PRODUCT_C100_1 0x1002 |
| 125 | #define BANDRICH_PRODUCT_C100_2 0x1003 | 128 | #define BANDRICH_PRODUCT_C100_2 0x1003 |
| @@ -192,6 +195,7 @@ static struct usb_device_id option_ids[] = { | |||
| 192 | { USB_DEVICE(DELL_VENDOR_ID, 0x8137) }, /* Dell Wireless HSDPA 5520 */ | 195 | { USB_DEVICE(DELL_VENDOR_ID, 0x8137) }, /* Dell Wireless HSDPA 5520 */ |
| 193 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, | 196 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, |
| 194 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, | 197 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, |
| 198 | { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, | ||
| 195 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, | 199 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, |
| 196 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, | 200 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, |
| 197 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, | 201 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, |
diff --git a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c index 958f5b17847c..b9b8ede61fb3 100644 --- a/drivers/usb/storage/protocol.c +++ b/drivers/usb/storage/protocol.c | |||
| @@ -170,7 +170,6 @@ unsigned int usb_stor_access_xfer_buf(unsigned char *buffer, | |||
| 170 | 170 | ||
| 171 | if (!sg) | 171 | if (!sg) |
| 172 | sg = scsi_sglist(srb); | 172 | sg = scsi_sglist(srb); |
| 173 | buflen = min(buflen, scsi_bufflen(srb)); | ||
| 174 | 173 | ||
| 175 | /* This loop handles a single s-g list entry, which may | 174 | /* This loop handles a single s-g list entry, which may |
| 176 | * include multiple pages. Find the initial page structure | 175 | * include multiple pages. Find the initial page structure |
| @@ -232,6 +231,7 @@ void usb_stor_set_xfer_buf(unsigned char *buffer, | |||
| 232 | unsigned int offset = 0; | 231 | unsigned int offset = 0; |
| 233 | struct scatterlist *sg = NULL; | 232 | struct scatterlist *sg = NULL; |
| 234 | 233 | ||
| 234 | buflen = min(buflen, scsi_bufflen(srb)); | ||
| 235 | buflen = usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset, | 235 | buflen = usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset, |
| 236 | TO_XFER_BUF); | 236 | TO_XFER_BUF); |
| 237 | if (buflen < scsi_bufflen(srb)) | 237 | if (buflen < scsi_bufflen(srb)) |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 5bd3ae8aaaf4..583e0481dfa0 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -94,10 +94,9 @@ enum usb_interface_condition { | |||
| 94 | * @altsetting: array of interface structures, one for each alternate | 94 | * @altsetting: array of interface structures, one for each alternate |
| 95 | * setting that may be selected. Each one includes a set of | 95 | * setting that may be selected. Each one includes a set of |
| 96 | * endpoint configurations. They will be in no particular order. | 96 | * endpoint configurations. They will be in no particular order. |
| 97 | * @num_altsetting: number of altsettings defined. | ||
| 98 | * @cur_altsetting: the current altsetting. | 97 | * @cur_altsetting: the current altsetting. |
| 98 | * @num_altsetting: number of altsettings defined. | ||
| 99 | * @intf_assoc: interface association descriptor | 99 | * @intf_assoc: interface association descriptor |
| 100 | * @driver: the USB driver that is bound to this interface. | ||
| 101 | * @minor: the minor number assigned to this interface, if this | 100 | * @minor: the minor number assigned to this interface, if this |
| 102 | * interface is bound to a driver that uses the USB major number. | 101 | * interface is bound to a driver that uses the USB major number. |
| 103 | * If this interface does not use the USB major, this field should | 102 | * If this interface does not use the USB major, this field should |
