diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-16 21:46:21 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-16 21:46:21 -0500 |
commit | 0c864d8b3e51bd61f43484268c9aa4eb9a199b02 (patch) | |
tree | de9fa5c3792c84fa173e6d27c856bde0254f7eeb /drivers/usb | |
parent | 4fd24483d1de7a3c183fa862fa9ff13b49361966 (diff) | |
parent | f4a75d2eb7b1e2206094b901be09adb31ba63681 (diff) |
Merge 3.7-rc6 into usb-next.
This resolves a conflict with these files:
drivers/usb/early/ehci-dbgp.c
drivers/usb/host/ehci-ls1x.c
drivers/usb/host/ohci-xls.c
drivers/usb/musb/ux500.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/hcd.c | 16 | ||||
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 30 | ||||
-rw-r--r-- | drivers/usb/otg/Kconfig | 4 | ||||
-rw-r--r-- | drivers/usb/serial/keyspan.c | 3 | ||||
-rw-r--r-- | drivers/usb/serial/option.c | 9 | ||||
-rw-r--r-- | drivers/usb/serial/usb_wwan.c | 10 |
6 files changed, 59 insertions, 13 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index eaa14514e173..4225d5e72131 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -2166,8 +2166,15 @@ EXPORT_SYMBOL_GPL(usb_bus_start_enum); | |||
2166 | irqreturn_t usb_hcd_irq (int irq, void *__hcd) | 2166 | irqreturn_t usb_hcd_irq (int irq, void *__hcd) |
2167 | { | 2167 | { |
2168 | struct usb_hcd *hcd = __hcd; | 2168 | struct usb_hcd *hcd = __hcd; |
2169 | unsigned long flags; | ||
2169 | irqreturn_t rc; | 2170 | irqreturn_t rc; |
2170 | 2171 | ||
2172 | /* IRQF_DISABLED doesn't work correctly with shared IRQs | ||
2173 | * when the first handler doesn't use it. So let's just | ||
2174 | * assume it's never used. | ||
2175 | */ | ||
2176 | local_irq_save(flags); | ||
2177 | |||
2171 | if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) | 2178 | if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) |
2172 | rc = IRQ_NONE; | 2179 | rc = IRQ_NONE; |
2173 | else if (hcd->driver->irq(hcd) == IRQ_NONE) | 2180 | else if (hcd->driver->irq(hcd) == IRQ_NONE) |
@@ -2175,6 +2182,7 @@ irqreturn_t usb_hcd_irq (int irq, void *__hcd) | |||
2175 | else | 2182 | else |
2176 | rc = IRQ_HANDLED; | 2183 | rc = IRQ_HANDLED; |
2177 | 2184 | ||
2185 | local_irq_restore(flags); | ||
2178 | return rc; | 2186 | return rc; |
2179 | } | 2187 | } |
2180 | EXPORT_SYMBOL_GPL(usb_hcd_irq); | 2188 | EXPORT_SYMBOL_GPL(usb_hcd_irq); |
@@ -2362,6 +2370,14 @@ static int usb_hcd_request_irqs(struct usb_hcd *hcd, | |||
2362 | int retval; | 2370 | int retval; |
2363 | 2371 | ||
2364 | if (hcd->driver->irq) { | 2372 | if (hcd->driver->irq) { |
2373 | |||
2374 | /* IRQF_DISABLED doesn't work as advertised when used together | ||
2375 | * with IRQF_SHARED. As usb_hcd_irq() will always disable | ||
2376 | * interrupts we can remove it here. | ||
2377 | */ | ||
2378 | if (irqflags & IRQF_SHARED) | ||
2379 | irqflags &= ~IRQF_DISABLED; | ||
2380 | |||
2365 | snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", | 2381 | snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", |
2366 | hcd->driver->description, hcd->self.busnum); | 2382 | hcd->driver->description, hcd->self.busnum); |
2367 | retval = request_irq(irqnum, &usb_hcd_irq, irqflags, | 2383 | retval = request_irq(irqnum, &usb_hcd_irq, irqflags, |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 28b9790e84ea..4f23b12a3ae7 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -707,11 +707,12 @@ static void rxstate(struct musb *musb, struct musb_request *req) | |||
707 | fifo_count = musb_readw(epio, MUSB_RXCOUNT); | 707 | fifo_count = musb_readw(epio, MUSB_RXCOUNT); |
708 | 708 | ||
709 | /* | 709 | /* |
710 | * use mode 1 only if we expect data of at least ep packet_sz | 710 | * Enable Mode 1 on RX transfers only when short_not_ok flag |
711 | * and have not yet received a short packet | 711 | * is set. Currently short_not_ok flag is set only from |
712 | * file_storage and f_mass_storage drivers | ||
712 | */ | 713 | */ |
713 | if ((request->length - request->actual >= musb_ep->packet_sz) && | 714 | |
714 | (fifo_count >= musb_ep->packet_sz)) | 715 | if (request->short_not_ok && fifo_count == musb_ep->packet_sz) |
715 | use_mode_1 = 1; | 716 | use_mode_1 = 1; |
716 | else | 717 | else |
717 | use_mode_1 = 0; | 718 | use_mode_1 = 0; |
@@ -727,6 +728,27 @@ static void rxstate(struct musb *musb, struct musb_request *req) | |||
727 | c = musb->dma_controller; | 728 | c = musb->dma_controller; |
728 | channel = musb_ep->dma; | 729 | channel = musb_ep->dma; |
729 | 730 | ||
731 | /* We use DMA Req mode 0 in rx_csr, and DMA controller operates in | ||
732 | * mode 0 only. So we do not get endpoint interrupts due to DMA | ||
733 | * completion. We only get interrupts from DMA controller. | ||
734 | * | ||
735 | * We could operate in DMA mode 1 if we knew the size of the tranfer | ||
736 | * in advance. For mass storage class, request->length = what the host | ||
737 | * sends, so that'd work. But for pretty much everything else, | ||
738 | * request->length is routinely more than what the host sends. For | ||
739 | * most these gadgets, end of is signified either by a short packet, | ||
740 | * or filling the last byte of the buffer. (Sending extra data in | ||
741 | * that last pckate should trigger an overflow fault.) But in mode 1, | ||
742 | * we don't get DMA completion interrupt for short packets. | ||
743 | * | ||
744 | * Theoretically, we could enable DMAReq irq (MUSB_RXCSR_DMAMODE = 1), | ||
745 | * to get endpoint interrupt on every DMA req, but that didn't seem | ||
746 | * to work reliably. | ||
747 | * | ||
748 | * REVISIT an updated g_file_storage can set req->short_not_ok, which | ||
749 | * then becomes usable as a runtime "use mode 1" hint... | ||
750 | */ | ||
751 | |||
730 | /* Experimental: Mode1 works with mass storage use cases */ | 752 | /* Experimental: Mode1 works with mass storage use cases */ |
731 | if (use_mode_1) { | 753 | if (use_mode_1) { |
732 | csr |= MUSB_RXCSR_AUTOCLEAR; | 754 | csr |= MUSB_RXCSR_AUTOCLEAR; |
diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig index d8c8a42bff3e..6223062d5d1b 100644 --- a/drivers/usb/otg/Kconfig +++ b/drivers/usb/otg/Kconfig | |||
@@ -58,7 +58,7 @@ config USB_ULPI_VIEWPORT | |||
58 | 58 | ||
59 | config TWL4030_USB | 59 | config TWL4030_USB |
60 | tristate "TWL4030 USB Transceiver Driver" | 60 | tristate "TWL4030 USB Transceiver Driver" |
61 | depends on TWL4030_CORE && REGULATOR_TWL4030 | 61 | depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS |
62 | select USB_OTG_UTILS | 62 | select USB_OTG_UTILS |
63 | help | 63 | help |
64 | Enable this to support the USB OTG transceiver on TWL4030 | 64 | Enable this to support the USB OTG transceiver on TWL4030 |
@@ -68,7 +68,7 @@ config TWL4030_USB | |||
68 | 68 | ||
69 | config TWL6030_USB | 69 | config TWL6030_USB |
70 | tristate "TWL6030 USB Transceiver Driver" | 70 | tristate "TWL6030 USB Transceiver Driver" |
71 | depends on TWL4030_CORE && OMAP_USB2 | 71 | depends on TWL4030_CORE && OMAP_USB2 && USB_MUSB_OMAP2PLUS |
72 | select USB_OTG_UTILS | 72 | select USB_OTG_UTILS |
73 | help | 73 | help |
74 | Enable this to support the USB OTG transceiver on TWL6030 | 74 | Enable this to support the USB OTG transceiver on TWL6030 |
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index 991ca6a690a0..97bc49f68efd 100644 --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c | |||
@@ -2426,7 +2426,7 @@ static void keyspan_release(struct usb_serial *serial) | |||
2426 | static int keyspan_port_probe(struct usb_serial_port *port) | 2426 | static int keyspan_port_probe(struct usb_serial_port *port) |
2427 | { | 2427 | { |
2428 | struct usb_serial *serial = port->serial; | 2428 | struct usb_serial *serial = port->serial; |
2429 | struct keyspan_port_private *s_priv; | 2429 | struct keyspan_serial_private *s_priv; |
2430 | struct keyspan_port_private *p_priv; | 2430 | struct keyspan_port_private *p_priv; |
2431 | const struct keyspan_device_details *d_details; | 2431 | const struct keyspan_device_details *d_details; |
2432 | struct callbacks *cback; | 2432 | struct callbacks *cback; |
@@ -2441,7 +2441,6 @@ static int keyspan_port_probe(struct usb_serial_port *port) | |||
2441 | if (!p_priv) | 2441 | if (!p_priv) |
2442 | return -ENOMEM; | 2442 | return -ENOMEM; |
2443 | 2443 | ||
2444 | s_priv = usb_get_serial_data(port->serial); | ||
2445 | p_priv->device_details = d_details; | 2444 | p_priv->device_details = d_details; |
2446 | 2445 | ||
2447 | /* Setup values for the various callback routines */ | 2446 | /* Setup values for the various callback routines */ |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 5839f4d662dc..ed660564f0c5 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -157,6 +157,7 @@ static void option_instat_callback(struct urb *urb); | |||
157 | #define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED 0x8001 | 157 | #define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED 0x8001 |
158 | #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0x9000 | 158 | #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0x9000 |
159 | #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0x9001 | 159 | #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0x9001 |
160 | #define NOVATELWIRELESS_PRODUCT_E362 0x9010 | ||
160 | #define NOVATELWIRELESS_PRODUCT_G1 0xA001 | 161 | #define NOVATELWIRELESS_PRODUCT_G1 0xA001 |
161 | #define NOVATELWIRELESS_PRODUCT_G1_M 0xA002 | 162 | #define NOVATELWIRELESS_PRODUCT_G1_M 0xA002 |
162 | #define NOVATELWIRELESS_PRODUCT_G2 0xA010 | 163 | #define NOVATELWIRELESS_PRODUCT_G2 0xA010 |
@@ -192,6 +193,9 @@ static void option_instat_callback(struct urb *urb); | |||
192 | #define DELL_PRODUCT_5730_MINICARD_TELUS 0x8181 | 193 | #define DELL_PRODUCT_5730_MINICARD_TELUS 0x8181 |
193 | #define DELL_PRODUCT_5730_MINICARD_VZW 0x8182 | 194 | #define DELL_PRODUCT_5730_MINICARD_VZW 0x8182 |
194 | 195 | ||
196 | #define DELL_PRODUCT_5800_MINICARD_VZW 0x8195 /* Novatel E362 */ | ||
197 | #define DELL_PRODUCT_5800_V2_MINICARD_VZW 0x8196 /* Novatel E362 */ | ||
198 | |||
195 | #define KYOCERA_VENDOR_ID 0x0c88 | 199 | #define KYOCERA_VENDOR_ID 0x0c88 |
196 | #define KYOCERA_PRODUCT_KPC650 0x17da | 200 | #define KYOCERA_PRODUCT_KPC650 0x17da |
197 | #define KYOCERA_PRODUCT_KPC680 0x180a | 201 | #define KYOCERA_PRODUCT_KPC680 0x180a |
@@ -282,6 +286,7 @@ static void option_instat_callback(struct urb *urb); | |||
282 | /* ALCATEL PRODUCTS */ | 286 | /* ALCATEL PRODUCTS */ |
283 | #define ALCATEL_VENDOR_ID 0x1bbb | 287 | #define ALCATEL_VENDOR_ID 0x1bbb |
284 | #define ALCATEL_PRODUCT_X060S_X200 0x0000 | 288 | #define ALCATEL_PRODUCT_X060S_X200 0x0000 |
289 | #define ALCATEL_PRODUCT_X220_X500D 0x0017 | ||
285 | 290 | ||
286 | #define PIRELLI_VENDOR_ID 0x1266 | 291 | #define PIRELLI_VENDOR_ID 0x1266 |
287 | #define PIRELLI_PRODUCT_C100_1 0x1002 | 292 | #define PIRELLI_PRODUCT_C100_1 0x1002 |
@@ -705,6 +710,7 @@ static const struct usb_device_id option_ids[] = { | |||
705 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G2) }, | 710 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G2) }, |
706 | /* Novatel Ovation MC551 a.k.a. Verizon USB551L */ | 711 | /* Novatel Ovation MC551 a.k.a. Verizon USB551L */ |
707 | { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) }, | 712 | { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) }, |
713 | { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E362, 0xff, 0xff, 0xff) }, | ||
708 | 714 | ||
709 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, | 715 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, |
710 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) }, | 716 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) }, |
@@ -727,6 +733,8 @@ static const struct usb_device_id option_ids[] = { | |||
727 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_SPRINT) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ | 733 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_SPRINT) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
728 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_TELUS) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ | 734 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_TELUS) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
729 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_VZW) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ | 735 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_VZW) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
736 | { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5800_MINICARD_VZW, 0xff, 0xff, 0xff) }, | ||
737 | { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5800_V2_MINICARD_VZW, 0xff, 0xff, 0xff) }, | ||
730 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, /* ADU-E100, ADU-310 */ | 738 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, /* ADU-E100, ADU-310 */ |
731 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, | 739 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, |
732 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) }, | 740 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) }, |
@@ -1156,6 +1164,7 @@ static const struct usb_device_id option_ids[] = { | |||
1156 | { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200), | 1164 | { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200), |
1157 | .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist | 1165 | .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist |
1158 | }, | 1166 | }, |
1167 | { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X220_X500D) }, | ||
1159 | { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, | 1168 | { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, |
1160 | { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, | 1169 | { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, |
1161 | { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14), | 1170 | { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14), |
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index 2be2b5b639ae..01c94aada56c 100644 --- a/drivers/usb/serial/usb_wwan.c +++ b/drivers/usb/serial/usb_wwan.c | |||
@@ -454,9 +454,6 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port, | |||
454 | struct usb_serial *serial = port->serial; | 454 | struct usb_serial *serial = port->serial; |
455 | struct urb *urb; | 455 | struct urb *urb; |
456 | 456 | ||
457 | if (endpoint == -1) | ||
458 | return NULL; /* endpoint not needed */ | ||
459 | |||
460 | urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ | 457 | urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ |
461 | if (urb == NULL) { | 458 | if (urb == NULL) { |
462 | dev_dbg(&serial->interface->dev, | 459 | dev_dbg(&serial->interface->dev, |
@@ -488,6 +485,9 @@ int usb_wwan_port_probe(struct usb_serial_port *port) | |||
488 | init_usb_anchor(&portdata->delayed); | 485 | init_usb_anchor(&portdata->delayed); |
489 | 486 | ||
490 | for (i = 0; i < N_IN_URB; i++) { | 487 | for (i = 0; i < N_IN_URB; i++) { |
488 | if (!port->bulk_in_size) | ||
489 | break; | ||
490 | |||
491 | buffer = (u8 *)__get_free_page(GFP_KERNEL); | 491 | buffer = (u8 *)__get_free_page(GFP_KERNEL); |
492 | if (!buffer) | 492 | if (!buffer) |
493 | goto bail_out_error; | 493 | goto bail_out_error; |
@@ -501,8 +501,8 @@ int usb_wwan_port_probe(struct usb_serial_port *port) | |||
501 | } | 501 | } |
502 | 502 | ||
503 | for (i = 0; i < N_OUT_URB; i++) { | 503 | for (i = 0; i < N_OUT_URB; i++) { |
504 | if (port->bulk_out_endpointAddress == -1) | 504 | if (!port->bulk_out_size) |
505 | continue; | 505 | break; |
506 | 506 | ||
507 | buffer = kmalloc(OUT_BUFLEN, GFP_KERNEL); | 507 | buffer = kmalloc(OUT_BUFLEN, GFP_KERNEL); |
508 | if (!buffer) | 508 | if (!buffer) |