diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
commit | bcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (patch) | |
tree | 2f6dffd2d3e4dd67355a224de7e7a960335a92fd /drivers/usb | |
parent | 11c34c7deaeeebcee342cbc35e1bb2a6711b2431 (diff) | |
parent | 3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c (diff) |
Merge commit 'origin/master' into next
Conflicts:
include/linux/kvm.h
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/hub.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/amd5536udc.c | 49 | ||||
-rw-r--r-- | drivers/usb/gadget/omap_udc.c | 25 | ||||
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-pci.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ehci-q.c | 16 | ||||
-rw-r--r-- | drivers/usb/host/ehci-sched.c | 12 | ||||
-rw-r--r-- | drivers/usb/host/ehci.h | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-omap.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/sl811_cs.c | 49 | ||||
-rw-r--r-- | drivers/usb/musb/cppi_dma.c | 10 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.c | 4 | ||||
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 79 | ||||
-rw-r--r-- | drivers/usb/musb/musb_gadget_ep0.c | 3 | ||||
-rw-r--r-- | drivers/usb/musb/musb_host.c | 5 | ||||
-rw-r--r-- | drivers/usb/musb/omap2430.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/omap2430.h | 2 | ||||
-rw-r--r-- | drivers/usb/musb/tusb6010_omap.c | 4 | ||||
-rw-r--r-- | drivers/usb/otg/isp1301_omap.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 3 | ||||
-rw-r--r-- | drivers/usb/serial/option.c | 5 |
21 files changed, 161 insertions, 127 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 5ce839137ad6..0f857e645058 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -444,7 +444,7 @@ resubmit: | |||
444 | static inline int | 444 | static inline int |
445 | hub_clear_tt_buffer (struct usb_device *hdev, u16 devinfo, u16 tt) | 445 | hub_clear_tt_buffer (struct usb_device *hdev, u16 devinfo, u16 tt) |
446 | { | 446 | { |
447 | return usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0), | 447 | return usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), |
448 | HUB_CLEAR_TT_BUFFER, USB_RT_PORT, devinfo, | 448 | HUB_CLEAR_TT_BUFFER, USB_RT_PORT, devinfo, |
449 | tt, NULL, 0, 1000); | 449 | tt, NULL, 0, 1000); |
450 | } | 450 | } |
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c index d5b65962dd36..731150d4b1d9 100644 --- a/drivers/usb/gadget/amd5536udc.c +++ b/drivers/usb/gadget/amd5536udc.c | |||
@@ -1213,7 +1213,12 @@ udc_queue(struct usb_ep *usbep, struct usb_request *usbreq, gfp_t gfp) | |||
1213 | tmp &= AMD_UNMASK_BIT(ep->num); | 1213 | tmp &= AMD_UNMASK_BIT(ep->num); |
1214 | writel(tmp, &dev->regs->ep_irqmsk); | 1214 | writel(tmp, &dev->regs->ep_irqmsk); |
1215 | } | 1215 | } |
1216 | } | 1216 | } else if (ep->in) { |
1217 | /* enable ep irq */ | ||
1218 | tmp = readl(&dev->regs->ep_irqmsk); | ||
1219 | tmp &= AMD_UNMASK_BIT(ep->num); | ||
1220 | writel(tmp, &dev->regs->ep_irqmsk); | ||
1221 | } | ||
1217 | 1222 | ||
1218 | } else if (ep->dma) { | 1223 | } else if (ep->dma) { |
1219 | 1224 | ||
@@ -2005,18 +2010,17 @@ __acquires(dev->lock) | |||
2005 | { | 2010 | { |
2006 | int tmp; | 2011 | int tmp; |
2007 | 2012 | ||
2008 | /* empty queues and init hardware */ | ||
2009 | udc_basic_init(dev); | ||
2010 | for (tmp = 0; tmp < UDC_EP_NUM; tmp++) { | ||
2011 | empty_req_queue(&dev->ep[tmp]); | ||
2012 | } | ||
2013 | |||
2014 | if (dev->gadget.speed != USB_SPEED_UNKNOWN) { | 2013 | if (dev->gadget.speed != USB_SPEED_UNKNOWN) { |
2015 | spin_unlock(&dev->lock); | 2014 | spin_unlock(&dev->lock); |
2016 | driver->disconnect(&dev->gadget); | 2015 | driver->disconnect(&dev->gadget); |
2017 | spin_lock(&dev->lock); | 2016 | spin_lock(&dev->lock); |
2018 | } | 2017 | } |
2019 | /* init */ | 2018 | |
2019 | /* empty queues and init hardware */ | ||
2020 | udc_basic_init(dev); | ||
2021 | for (tmp = 0; tmp < UDC_EP_NUM; tmp++) | ||
2022 | empty_req_queue(&dev->ep[tmp]); | ||
2023 | |||
2020 | udc_setup_endpoints(dev); | 2024 | udc_setup_endpoints(dev); |
2021 | } | 2025 | } |
2022 | 2026 | ||
@@ -2472,6 +2476,13 @@ static irqreturn_t udc_data_in_isr(struct udc *dev, int ep_ix) | |||
2472 | } | 2476 | } |
2473 | } | 2477 | } |
2474 | 2478 | ||
2479 | } else if (!use_dma && ep->in) { | ||
2480 | /* disable interrupt */ | ||
2481 | tmp = readl( | ||
2482 | &dev->regs->ep_irqmsk); | ||
2483 | tmp |= AMD_BIT(ep->num); | ||
2484 | writel(tmp, | ||
2485 | &dev->regs->ep_irqmsk); | ||
2475 | } | 2486 | } |
2476 | } | 2487 | } |
2477 | /* clear status bits */ | 2488 | /* clear status bits */ |
@@ -3279,6 +3290,17 @@ static int udc_pci_probe( | |||
3279 | goto finished; | 3290 | goto finished; |
3280 | } | 3291 | } |
3281 | 3292 | ||
3293 | spin_lock_init(&dev->lock); | ||
3294 | /* udc csr registers base */ | ||
3295 | dev->csr = dev->virt_addr + UDC_CSR_ADDR; | ||
3296 | /* dev registers base */ | ||
3297 | dev->regs = dev->virt_addr + UDC_DEVCFG_ADDR; | ||
3298 | /* ep registers base */ | ||
3299 | dev->ep_regs = dev->virt_addr + UDC_EPREGS_ADDR; | ||
3300 | /* fifo's base */ | ||
3301 | dev->rxfifo = (u32 __iomem *)(dev->virt_addr + UDC_RXFIFO_ADDR); | ||
3302 | dev->txfifo = (u32 __iomem *)(dev->virt_addr + UDC_TXFIFO_ADDR); | ||
3303 | |||
3282 | if (request_irq(pdev->irq, udc_irq, IRQF_SHARED, name, dev) != 0) { | 3304 | if (request_irq(pdev->irq, udc_irq, IRQF_SHARED, name, dev) != 0) { |
3283 | dev_dbg(&dev->pdev->dev, "request_irq(%d) fail\n", pdev->irq); | 3305 | dev_dbg(&dev->pdev->dev, "request_irq(%d) fail\n", pdev->irq); |
3284 | kfree(dev); | 3306 | kfree(dev); |
@@ -3331,7 +3353,6 @@ static int udc_probe(struct udc *dev) | |||
3331 | udc_pollstall_timer.data = 0; | 3353 | udc_pollstall_timer.data = 0; |
3332 | 3354 | ||
3333 | /* device struct setup */ | 3355 | /* device struct setup */ |
3334 | spin_lock_init(&dev->lock); | ||
3335 | dev->gadget.ops = &udc_ops; | 3356 | dev->gadget.ops = &udc_ops; |
3336 | 3357 | ||
3337 | dev_set_name(&dev->gadget.dev, "gadget"); | 3358 | dev_set_name(&dev->gadget.dev, "gadget"); |
@@ -3340,16 +3361,6 @@ static int udc_probe(struct udc *dev) | |||
3340 | dev->gadget.name = name; | 3361 | dev->gadget.name = name; |
3341 | dev->gadget.is_dualspeed = 1; | 3362 | dev->gadget.is_dualspeed = 1; |
3342 | 3363 | ||
3343 | /* udc csr registers base */ | ||
3344 | dev->csr = dev->virt_addr + UDC_CSR_ADDR; | ||
3345 | /* dev registers base */ | ||
3346 | dev->regs = dev->virt_addr + UDC_DEVCFG_ADDR; | ||
3347 | /* ep registers base */ | ||
3348 | dev->ep_regs = dev->virt_addr + UDC_EPREGS_ADDR; | ||
3349 | /* fifo's base */ | ||
3350 | dev->rxfifo = (u32 __iomem *)(dev->virt_addr + UDC_RXFIFO_ADDR); | ||
3351 | dev->txfifo = (u32 __iomem *)(dev->virt_addr + UDC_TXFIFO_ADDR); | ||
3352 | |||
3353 | /* init registers, interrupts, ... */ | 3364 | /* init registers, interrupts, ... */ |
3354 | startup_registers(dev); | 3365 | startup_registers(dev); |
3355 | 3366 | ||
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index a2db0e174f2c..f81e4f025f23 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c | |||
@@ -52,9 +52,9 @@ | |||
52 | #include <asm/unaligned.h> | 52 | #include <asm/unaligned.h> |
53 | #include <asm/mach-types.h> | 53 | #include <asm/mach-types.h> |
54 | 54 | ||
55 | #include <mach/dma.h> | 55 | #include <plat/dma.h> |
56 | #include <mach/usb.h> | 56 | #include <plat/usb.h> |
57 | #include <mach/control.h> | 57 | #include <plat/control.h> |
58 | 58 | ||
59 | #include "omap_udc.h" | 59 | #include "omap_udc.h" |
60 | 60 | ||
@@ -2098,6 +2098,7 @@ static inline int machine_without_vbus_sense(void) | |||
2098 | || machine_is_omap_h4() | 2098 | || machine_is_omap_h4() |
2099 | #endif | 2099 | #endif |
2100 | || machine_is_sx1() | 2100 | || machine_is_sx1() |
2101 | || cpu_is_omap7xx() /* No known omap7xx boards with vbus sense */ | ||
2101 | ); | 2102 | ); |
2102 | } | 2103 | } |
2103 | 2104 | ||
@@ -2838,6 +2839,16 @@ static int __init omap_udc_probe(struct platform_device *pdev) | |||
2838 | udelay(100); | 2839 | udelay(100); |
2839 | } | 2840 | } |
2840 | 2841 | ||
2842 | if (cpu_is_omap7xx()) { | ||
2843 | dc_clk = clk_get(&pdev->dev, "usb_dc_ck"); | ||
2844 | hhc_clk = clk_get(&pdev->dev, "l3_ocpi_ck"); | ||
2845 | BUG_ON(IS_ERR(dc_clk) || IS_ERR(hhc_clk)); | ||
2846 | /* can't use omap_udc_enable_clock yet */ | ||
2847 | clk_enable(dc_clk); | ||
2848 | clk_enable(hhc_clk); | ||
2849 | udelay(100); | ||
2850 | } | ||
2851 | |||
2841 | INFO("OMAP UDC rev %d.%d%s\n", | 2852 | INFO("OMAP UDC rev %d.%d%s\n", |
2842 | omap_readw(UDC_REV) >> 4, omap_readw(UDC_REV) & 0xf, | 2853 | omap_readw(UDC_REV) >> 4, omap_readw(UDC_REV) & 0xf, |
2843 | config->otg ? ", Mini-AB" : ""); | 2854 | config->otg ? ", Mini-AB" : ""); |
@@ -2970,7 +2981,7 @@ known: | |||
2970 | goto cleanup3; | 2981 | goto cleanup3; |
2971 | } | 2982 | } |
2972 | #endif | 2983 | #endif |
2973 | if (cpu_is_omap16xx()) { | 2984 | if (cpu_is_omap16xx() || cpu_is_omap7xx()) { |
2974 | udc->dc_clk = dc_clk; | 2985 | udc->dc_clk = dc_clk; |
2975 | udc->hhc_clk = hhc_clk; | 2986 | udc->hhc_clk = hhc_clk; |
2976 | clk_disable(hhc_clk); | 2987 | clk_disable(hhc_clk); |
@@ -3008,7 +3019,7 @@ cleanup0: | |||
3008 | if (xceiv) | 3019 | if (xceiv) |
3009 | otg_put_transceiver(xceiv); | 3020 | otg_put_transceiver(xceiv); |
3010 | 3021 | ||
3011 | if (cpu_is_omap16xx() || cpu_is_omap24xx()) { | 3022 | if (cpu_is_omap16xx() || cpu_is_omap24xx() || cpu_is_omap7xx()) { |
3012 | clk_disable(hhc_clk); | 3023 | clk_disable(hhc_clk); |
3013 | clk_disable(dc_clk); | 3024 | clk_disable(dc_clk); |
3014 | clk_put(hhc_clk); | 3025 | clk_put(hhc_clk); |
@@ -3115,6 +3126,10 @@ static struct platform_driver udc_driver = { | |||
3115 | 3126 | ||
3116 | static int __init udc_init(void) | 3127 | static int __init udc_init(void) |
3117 | { | 3128 | { |
3129 | /* Disable DMA for omap7xx -- it doesn't work right. */ | ||
3130 | if (cpu_is_omap7xx()) | ||
3131 | use_dma = 0; | ||
3132 | |||
3118 | INFO("%s, version: " DRIVER_VERSION | 3133 | INFO("%s, version: " DRIVER_VERSION |
3119 | #ifdef USE_ISO | 3134 | #ifdef USE_ISO |
3120 | " (iso)" | 3135 | " (iso)" |
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 9835e0713943..f5f5601701c9 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/timer.h> | 30 | #include <linux/timer.h> |
31 | #include <linux/ktime.h> | ||
31 | #include <linux/list.h> | 32 | #include <linux/list.h> |
32 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
33 | #include <linux/usb.h> | 34 | #include <linux/usb.h> |
@@ -676,6 +677,7 @@ static int ehci_run (struct usb_hcd *hcd) | |||
676 | ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ | 677 | ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ |
677 | msleep(5); | 678 | msleep(5); |
678 | up_write(&ehci_cf_port_reset_rwsem); | 679 | up_write(&ehci_cf_port_reset_rwsem); |
680 | ehci->last_periodic_enable = ktime_get_real(); | ||
679 | 681 | ||
680 | temp = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase)); | 682 | temp = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase)); |
681 | ehci_info (ehci, | 683 | ehci_info (ehci, |
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 378861b9d79a..ead5f4f2aa5a 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c | |||
@@ -111,6 +111,10 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | |||
111 | switch (pdev->vendor) { | 111 | switch (pdev->vendor) { |
112 | case PCI_VENDOR_ID_INTEL: | 112 | case PCI_VENDOR_ID_INTEL: |
113 | ehci->need_io_watchdog = 0; | 113 | ehci->need_io_watchdog = 0; |
114 | if (pdev->device == 0x27cc) { | ||
115 | ehci->broken_periodic = 1; | ||
116 | ehci_info(ehci, "using broken periodic workaround\n"); | ||
117 | } | ||
114 | break; | 118 | break; |
115 | case PCI_VENDOR_ID_TDI: | 119 | case PCI_VENDOR_ID_TDI: |
116 | if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { | 120 | if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { |
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 00ad9ce392ed..139a2cc3f641 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c | |||
@@ -487,8 +487,20 @@ halt: | |||
487 | * we must clear the TT buffer (11.17.5). | 487 | * we must clear the TT buffer (11.17.5). |
488 | */ | 488 | */ |
489 | if (unlikely(last_status != -EINPROGRESS && | 489 | if (unlikely(last_status != -EINPROGRESS && |
490 | last_status != -EREMOTEIO)) | 490 | last_status != -EREMOTEIO)) { |
491 | ehci_clear_tt_buffer(ehci, qh, urb, token); | 491 | /* The TT's in some hubs malfunction when they |
492 | * receive this request following a STALL (they | ||
493 | * stop sending isochronous packets). Since a | ||
494 | * STALL can't leave the TT buffer in a busy | ||
495 | * state (if you believe Figures 11-48 - 11-51 | ||
496 | * in the USB 2.0 spec), we won't clear the TT | ||
497 | * buffer in this case. Strictly speaking this | ||
498 | * is a violation of the spec. | ||
499 | */ | ||
500 | if (last_status != -EPIPE) | ||
501 | ehci_clear_tt_buffer(ehci, qh, urb, | ||
502 | token); | ||
503 | } | ||
492 | } | 504 | } |
493 | 505 | ||
494 | /* if we're removing something not at the queue head, | 506 | /* if we're removing something not at the queue head, |
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index b25cdea93a1f..a5535b5e3fe2 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -475,6 +475,8 @@ static int enable_periodic (struct ehci_hcd *ehci) | |||
475 | /* make sure ehci_work scans these */ | 475 | /* make sure ehci_work scans these */ |
476 | ehci->next_uframe = ehci_readl(ehci, &ehci->regs->frame_index) | 476 | ehci->next_uframe = ehci_readl(ehci, &ehci->regs->frame_index) |
477 | % (ehci->periodic_size << 3); | 477 | % (ehci->periodic_size << 3); |
478 | if (unlikely(ehci->broken_periodic)) | ||
479 | ehci->last_periodic_enable = ktime_get_real(); | ||
478 | return 0; | 480 | return 0; |
479 | } | 481 | } |
480 | 482 | ||
@@ -486,6 +488,16 @@ static int disable_periodic (struct ehci_hcd *ehci) | |||
486 | if (--ehci->periodic_sched) | 488 | if (--ehci->periodic_sched) |
487 | return 0; | 489 | return 0; |
488 | 490 | ||
491 | if (unlikely(ehci->broken_periodic)) { | ||
492 | /* delay experimentally determined */ | ||
493 | ktime_t safe = ktime_add_us(ehci->last_periodic_enable, 1000); | ||
494 | ktime_t now = ktime_get_real(); | ||
495 | s64 delay = ktime_us_delta(safe, now); | ||
496 | |||
497 | if (unlikely(delay > 0)) | ||
498 | udelay(delay); | ||
499 | } | ||
500 | |||
489 | /* did setting PSE not take effect yet? | 501 | /* did setting PSE not take effect yet? |
490 | * takes effect only at frame boundaries... | 502 | * takes effect only at frame boundaries... |
491 | */ | 503 | */ |
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 064e76821ff5..2d85e21ff282 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -118,6 +118,7 @@ struct ehci_hcd { /* one per controller */ | |||
118 | unsigned stamp; | 118 | unsigned stamp; |
119 | unsigned random_frame; | 119 | unsigned random_frame; |
120 | unsigned long next_statechange; | 120 | unsigned long next_statechange; |
121 | ktime_t last_periodic_enable; | ||
121 | u32 command; | 122 | u32 command; |
122 | 123 | ||
123 | /* SILICON QUIRKS */ | 124 | /* SILICON QUIRKS */ |
@@ -127,6 +128,7 @@ struct ehci_hcd { /* one per controller */ | |||
127 | unsigned big_endian_desc:1; | 128 | unsigned big_endian_desc:1; |
128 | unsigned has_amcc_usb23:1; | 129 | unsigned has_amcc_usb23:1; |
129 | unsigned need_io_watchdog:1; | 130 | unsigned need_io_watchdog:1; |
131 | unsigned broken_periodic:1; | ||
130 | 132 | ||
131 | /* required for usb32 quirk */ | 133 | /* required for usb32 quirk */ |
132 | #define OHCI_CTRL_HCFS (3 << 6) | 134 | #define OHCI_CTRL_HCFS (3 << 6) |
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 83cbecd2a1ed..5645f70b9214 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
@@ -24,10 +24,10 @@ | |||
24 | #include <asm/io.h> | 24 | #include <asm/io.h> |
25 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
26 | 26 | ||
27 | #include <mach/mux.h> | 27 | #include <plat/mux.h> |
28 | #include <mach/irqs.h> | 28 | #include <mach/irqs.h> |
29 | #include <mach/fpga.h> | 29 | #include <plat/fpga.h> |
30 | #include <mach/usb.h> | 30 | #include <plat/usb.h> |
31 | 31 | ||
32 | 32 | ||
33 | /* OMAP-1510 OHCI has its own MMU for DMA */ | 33 | /* OMAP-1510 OHCI has its own MMU for DMA */ |
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c index 516848dd9b48..39d253e841f6 100644 --- a/drivers/usb/host/sl811_cs.c +++ b/drivers/usb/host/sl811_cs.c | |||
@@ -37,28 +37,8 @@ MODULE_LICENSE("GPL"); | |||
37 | /* MACROS */ | 37 | /* MACROS */ |
38 | /*====================================================================*/ | 38 | /*====================================================================*/ |
39 | 39 | ||
40 | #if defined(DEBUG) || defined(PCMCIA_DEBUG) | ||
41 | |||
42 | static int pc_debug = 0; | ||
43 | module_param(pc_debug, int, 0644); | ||
44 | |||
45 | #define DBG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG "sl811_cs: " args) | ||
46 | |||
47 | #else | ||
48 | #define DBG(n, args...) do{}while(0) | ||
49 | #endif /* no debugging */ | ||
50 | |||
51 | #define INFO(args...) printk(KERN_INFO "sl811_cs: " args) | 40 | #define INFO(args...) printk(KERN_INFO "sl811_cs: " args) |
52 | 41 | ||
53 | #define INT_MODULE_PARM(n, v) static int n = v; module_param(n, int, 0444) | ||
54 | |||
55 | #define CS_CHECK(fn, ret) \ | ||
56 | do { \ | ||
57 | last_fn = (fn); \ | ||
58 | if ((last_ret = (ret)) != 0) \ | ||
59 | goto cs_failed; \ | ||
60 | } while (0) | ||
61 | |||
62 | /*====================================================================*/ | 42 | /*====================================================================*/ |
63 | /* VARIABLES */ | 43 | /* VARIABLES */ |
64 | /*====================================================================*/ | 44 | /*====================================================================*/ |
@@ -76,7 +56,7 @@ static void sl811_cs_release(struct pcmcia_device * link); | |||
76 | 56 | ||
77 | static void release_platform_dev(struct device * dev) | 57 | static void release_platform_dev(struct device * dev) |
78 | { | 58 | { |
79 | DBG(0, "sl811_cs platform_dev release\n"); | 59 | dev_dbg(dev, "sl811_cs platform_dev release\n"); |
80 | dev->parent = NULL; | 60 | dev->parent = NULL; |
81 | } | 61 | } |
82 | 62 | ||
@@ -140,7 +120,7 @@ static int sl811_hc_init(struct device *parent, resource_size_t base_addr, | |||
140 | 120 | ||
141 | static void sl811_cs_detach(struct pcmcia_device *link) | 121 | static void sl811_cs_detach(struct pcmcia_device *link) |
142 | { | 122 | { |
143 | DBG(0, "sl811_cs_detach(0x%p)\n", link); | 123 | dev_dbg(&link->dev, "sl811_cs_detach\n"); |
144 | 124 | ||
145 | sl811_cs_release(link); | 125 | sl811_cs_release(link); |
146 | 126 | ||
@@ -150,7 +130,7 @@ static void sl811_cs_detach(struct pcmcia_device *link) | |||
150 | 130 | ||
151 | static void sl811_cs_release(struct pcmcia_device * link) | 131 | static void sl811_cs_release(struct pcmcia_device * link) |
152 | { | 132 | { |
153 | DBG(0, "sl811_cs_release(0x%p)\n", link); | 133 | dev_dbg(&link->dev, "sl811_cs_release\n"); |
154 | 134 | ||
155 | pcmcia_disable_device(link); | 135 | pcmcia_disable_device(link); |
156 | platform_device_unregister(&platform_dev); | 136 | platform_device_unregister(&platform_dev); |
@@ -205,11 +185,11 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev, | |||
205 | 185 | ||
206 | static int sl811_cs_config(struct pcmcia_device *link) | 186 | static int sl811_cs_config(struct pcmcia_device *link) |
207 | { | 187 | { |
208 | struct device *parent = &handle_to_dev(link); | 188 | struct device *parent = &link->dev; |
209 | local_info_t *dev = link->priv; | 189 | local_info_t *dev = link->priv; |
210 | int last_fn, last_ret; | 190 | int ret; |
211 | 191 | ||
212 | DBG(0, "sl811_cs_config(0x%p)\n", link); | 192 | dev_dbg(&link->dev, "sl811_cs_config\n"); |
213 | 193 | ||
214 | if (pcmcia_loop_config(link, sl811_cs_config_check, NULL)) | 194 | if (pcmcia_loop_config(link, sl811_cs_config_check, NULL)) |
215 | goto failed; | 195 | goto failed; |
@@ -217,14 +197,16 @@ static int sl811_cs_config(struct pcmcia_device *link) | |||
217 | /* require an IRQ and two registers */ | 197 | /* require an IRQ and two registers */ |
218 | if (!link->io.NumPorts1 || link->io.NumPorts1 < 2) | 198 | if (!link->io.NumPorts1 || link->io.NumPorts1 < 2) |
219 | goto failed; | 199 | goto failed; |
220 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 200 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { |
221 | CS_CHECK(RequestIRQ, | 201 | ret = pcmcia_request_irq(link, &link->irq); |
222 | pcmcia_request_irq(link, &link->irq)); | 202 | if (ret) |
223 | else | 203 | goto failed; |
204 | } else | ||
224 | goto failed; | 205 | goto failed; |
225 | 206 | ||
226 | CS_CHECK(RequestConfiguration, | 207 | ret = pcmcia_request_configuration(link, &link->conf); |
227 | pcmcia_request_configuration(link, &link->conf)); | 208 | if (ret) |
209 | goto failed; | ||
228 | 210 | ||
229 | sprintf(dev->node.dev_name, driver_name); | 211 | sprintf(dev->node.dev_name, driver_name); |
230 | dev->node.major = dev->node.minor = 0; | 212 | dev->node.major = dev->node.minor = 0; |
@@ -241,8 +223,6 @@ static int sl811_cs_config(struct pcmcia_device *link) | |||
241 | 223 | ||
242 | if (sl811_hc_init(parent, link->io.BasePort1, link->irq.AssignedIRQ) | 224 | if (sl811_hc_init(parent, link->io.BasePort1, link->irq.AssignedIRQ) |
243 | < 0) { | 225 | < 0) { |
244 | cs_failed: | ||
245 | cs_error(link, last_fn, last_ret); | ||
246 | failed: | 226 | failed: |
247 | printk(KERN_WARNING "sl811_cs_config failed\n"); | 227 | printk(KERN_WARNING "sl811_cs_config failed\n"); |
248 | sl811_cs_release(link); | 228 | sl811_cs_release(link); |
@@ -263,7 +243,6 @@ static int sl811_cs_probe(struct pcmcia_device *link) | |||
263 | 243 | ||
264 | /* Initialize */ | 244 | /* Initialize */ |
265 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; | 245 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; |
266 | link->irq.IRQInfo1 = IRQ_INFO2_VALID|IRQ_LEVEL_ID; | ||
267 | link->irq.Handler = NULL; | 246 | link->irq.Handler = NULL; |
268 | 247 | ||
269 | link->conf.Attributes = 0; | 248 | link->conf.Attributes = 0; |
diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c index c3577bbbae6c..ef2332a9941d 100644 --- a/drivers/usb/musb/cppi_dma.c +++ b/drivers/usb/musb/cppi_dma.c | |||
@@ -1442,11 +1442,6 @@ static int cppi_channel_abort(struct dma_channel *channel) | |||
1442 | musb_writew(regs, MUSB_TXCSR, value); | 1442 | musb_writew(regs, MUSB_TXCSR, value); |
1443 | musb_writew(regs, MUSB_TXCSR, value); | 1443 | musb_writew(regs, MUSB_TXCSR, value); |
1444 | 1444 | ||
1445 | /* re-enable interrupt */ | ||
1446 | if (enabled) | ||
1447 | musb_writel(tibase, DAVINCI_TXCPPI_INTENAB_REG, | ||
1448 | (1 << cppi_ch->index)); | ||
1449 | |||
1450 | /* While we scrub the TX state RAM, ensure that we clean | 1445 | /* While we scrub the TX state RAM, ensure that we clean |
1451 | * up any interrupt that's currently asserted: | 1446 | * up any interrupt that's currently asserted: |
1452 | * 1. Write to completion Ptr value 0x1(bit 0 set) | 1447 | * 1. Write to completion Ptr value 0x1(bit 0 set) |
@@ -1459,6 +1454,11 @@ static int cppi_channel_abort(struct dma_channel *channel) | |||
1459 | cppi_reset_tx(tx_ram, 1); | 1454 | cppi_reset_tx(tx_ram, 1); |
1460 | musb_writel(&tx_ram->tx_complete, 0, 0); | 1455 | musb_writel(&tx_ram->tx_complete, 0, 0); |
1461 | 1456 | ||
1457 | /* re-enable interrupt */ | ||
1458 | if (enabled) | ||
1459 | musb_writel(tibase, DAVINCI_TXCPPI_INTENAB_REG, | ||
1460 | (1 << cppi_ch->index)); | ||
1461 | |||
1462 | cppi_dump_tx(5, cppi_ch, " (done teardown)"); | 1462 | cppi_dump_tx(5, cppi_ch, " (done teardown)"); |
1463 | 1463 | ||
1464 | /* REVISIT tx side _should_ clean up the same way | 1464 | /* REVISIT tx side _should_ clean up the same way |
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 3a61ddb62bd2..547e0e390726 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1450,7 +1450,7 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb) | |||
1450 | #endif | 1450 | #endif |
1451 | 1451 | ||
1452 | if (hw_ep->max_packet_sz_tx) { | 1452 | if (hw_ep->max_packet_sz_tx) { |
1453 | printk(KERN_DEBUG | 1453 | DBG(1, |
1454 | "%s: hw_ep %d%s, %smax %d\n", | 1454 | "%s: hw_ep %d%s, %smax %d\n", |
1455 | musb_driver_name, i, | 1455 | musb_driver_name, i, |
1456 | hw_ep->is_shared_fifo ? "shared" : "tx", | 1456 | hw_ep->is_shared_fifo ? "shared" : "tx", |
@@ -1459,7 +1459,7 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb) | |||
1459 | hw_ep->max_packet_sz_tx); | 1459 | hw_ep->max_packet_sz_tx); |
1460 | } | 1460 | } |
1461 | if (hw_ep->max_packet_sz_rx && !hw_ep->is_shared_fifo) { | 1461 | if (hw_ep->max_packet_sz_rx && !hw_ep->is_shared_fifo) { |
1462 | printk(KERN_DEBUG | 1462 | DBG(1, |
1463 | "%s: hw_ep %d%s, %smax %d\n", | 1463 | "%s: hw_ep %d%s, %smax %d\n", |
1464 | musb_driver_name, i, | 1464 | musb_driver_name, i, |
1465 | "rx", | 1465 | "rx", |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 8b3c4e2ed7b8..74073f9a43f0 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Copyright 2005 Mentor Graphics Corporation | 4 | * Copyright 2005 Mentor Graphics Corporation |
5 | * Copyright (C) 2005-2006 by Texas Instruments | 5 | * Copyright (C) 2005-2006 by Texas Instruments |
6 | * Copyright (C) 2006-2007 Nokia Corporation | 6 | * Copyright (C) 2006-2007 Nokia Corporation |
7 | * Copyright (C) 2009 MontaVista Software, Inc. <source@mvista.com> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 10 | * modify it under the terms of the GNU General Public License |
@@ -436,14 +437,6 @@ void musb_g_tx(struct musb *musb, u8 epnum) | |||
436 | csr |= MUSB_TXCSR_P_WZC_BITS; | 437 | csr |= MUSB_TXCSR_P_WZC_BITS; |
437 | csr &= ~MUSB_TXCSR_P_SENTSTALL; | 438 | csr &= ~MUSB_TXCSR_P_SENTSTALL; |
438 | musb_writew(epio, MUSB_TXCSR, csr); | 439 | musb_writew(epio, MUSB_TXCSR, csr); |
439 | if (dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY) { | ||
440 | dma->status = MUSB_DMA_STATUS_CORE_ABORT; | ||
441 | musb->dma_controller->channel_abort(dma); | ||
442 | } | ||
443 | |||
444 | if (request) | ||
445 | musb_g_giveback(musb_ep, request, -EPIPE); | ||
446 | |||
447 | break; | 440 | break; |
448 | } | 441 | } |
449 | 442 | ||
@@ -582,15 +575,25 @@ void musb_g_tx(struct musb *musb, u8 epnum) | |||
582 | */ | 575 | */ |
583 | static void rxstate(struct musb *musb, struct musb_request *req) | 576 | static void rxstate(struct musb *musb, struct musb_request *req) |
584 | { | 577 | { |
585 | u16 csr = 0; | ||
586 | const u8 epnum = req->epnum; | 578 | const u8 epnum = req->epnum; |
587 | struct usb_request *request = &req->request; | 579 | struct usb_request *request = &req->request; |
588 | struct musb_ep *musb_ep = &musb->endpoints[epnum].ep_out; | 580 | struct musb_ep *musb_ep = &musb->endpoints[epnum].ep_out; |
589 | void __iomem *epio = musb->endpoints[epnum].regs; | 581 | void __iomem *epio = musb->endpoints[epnum].regs; |
590 | unsigned fifo_count = 0; | 582 | unsigned fifo_count = 0; |
591 | u16 len = musb_ep->packet_sz; | 583 | u16 len = musb_ep->packet_sz; |
584 | u16 csr = musb_readw(epio, MUSB_RXCSR); | ||
592 | 585 | ||
593 | csr = musb_readw(epio, MUSB_RXCSR); | 586 | /* We shouldn't get here while DMA is active, but we do... */ |
587 | if (dma_channel_status(musb_ep->dma) == MUSB_DMA_STATUS_BUSY) { | ||
588 | DBG(4, "DMA pending...\n"); | ||
589 | return; | ||
590 | } | ||
591 | |||
592 | if (csr & MUSB_RXCSR_P_SENDSTALL) { | ||
593 | DBG(5, "%s stalling, RXCSR %04x\n", | ||
594 | musb_ep->end_point.name, csr); | ||
595 | return; | ||
596 | } | ||
594 | 597 | ||
595 | if (is_cppi_enabled() && musb_ep->dma) { | 598 | if (is_cppi_enabled() && musb_ep->dma) { |
596 | struct dma_controller *c = musb->dma_controller; | 599 | struct dma_controller *c = musb->dma_controller; |
@@ -761,19 +764,10 @@ void musb_g_rx(struct musb *musb, u8 epnum) | |||
761 | csr, dma ? " (dma)" : "", request); | 764 | csr, dma ? " (dma)" : "", request); |
762 | 765 | ||
763 | if (csr & MUSB_RXCSR_P_SENTSTALL) { | 766 | if (csr & MUSB_RXCSR_P_SENTSTALL) { |
764 | if (dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY) { | ||
765 | dma->status = MUSB_DMA_STATUS_CORE_ABORT; | ||
766 | (void) musb->dma_controller->channel_abort(dma); | ||
767 | request->actual += musb_ep->dma->actual_len; | ||
768 | } | ||
769 | |||
770 | csr |= MUSB_RXCSR_P_WZC_BITS; | 767 | csr |= MUSB_RXCSR_P_WZC_BITS; |
771 | csr &= ~MUSB_RXCSR_P_SENTSTALL; | 768 | csr &= ~MUSB_RXCSR_P_SENTSTALL; |
772 | musb_writew(epio, MUSB_RXCSR, csr); | 769 | musb_writew(epio, MUSB_RXCSR, csr); |
773 | 770 | return; | |
774 | if (request) | ||
775 | musb_g_giveback(musb_ep, request, -EPIPE); | ||
776 | goto done; | ||
777 | } | 771 | } |
778 | 772 | ||
779 | if (csr & MUSB_RXCSR_P_OVERRUN) { | 773 | if (csr & MUSB_RXCSR_P_OVERRUN) { |
@@ -795,7 +789,7 @@ void musb_g_rx(struct musb *musb, u8 epnum) | |||
795 | DBG((csr & MUSB_RXCSR_DMAENAB) ? 4 : 1, | 789 | DBG((csr & MUSB_RXCSR_DMAENAB) ? 4 : 1, |
796 | "%s busy, csr %04x\n", | 790 | "%s busy, csr %04x\n", |
797 | musb_ep->end_point.name, csr); | 791 | musb_ep->end_point.name, csr); |
798 | goto done; | 792 | return; |
799 | } | 793 | } |
800 | 794 | ||
801 | if (dma && (csr & MUSB_RXCSR_DMAENAB)) { | 795 | if (dma && (csr & MUSB_RXCSR_DMAENAB)) { |
@@ -826,22 +820,15 @@ void musb_g_rx(struct musb *musb, u8 epnum) | |||
826 | if ((request->actual < request->length) | 820 | if ((request->actual < request->length) |
827 | && (musb_ep->dma->actual_len | 821 | && (musb_ep->dma->actual_len |
828 | == musb_ep->packet_sz)) | 822 | == musb_ep->packet_sz)) |
829 | goto done; | 823 | return; |
830 | #endif | 824 | #endif |
831 | musb_g_giveback(musb_ep, request, 0); | 825 | musb_g_giveback(musb_ep, request, 0); |
832 | 826 | ||
833 | request = next_request(musb_ep); | 827 | request = next_request(musb_ep); |
834 | if (!request) | 828 | if (!request) |
835 | goto done; | 829 | return; |
836 | |||
837 | /* don't start more i/o till the stall clears */ | ||
838 | musb_ep_select(mbase, epnum); | ||
839 | csr = musb_readw(epio, MUSB_RXCSR); | ||
840 | if (csr & MUSB_RXCSR_P_SENDSTALL) | ||
841 | goto done; | ||
842 | } | 830 | } |
843 | 831 | ||
844 | |||
845 | /* analyze request if the ep is hot */ | 832 | /* analyze request if the ep is hot */ |
846 | if (request) | 833 | if (request) |
847 | rxstate(musb, to_musb_request(request)); | 834 | rxstate(musb, to_musb_request(request)); |
@@ -849,8 +836,6 @@ void musb_g_rx(struct musb *musb, u8 epnum) | |||
849 | DBG(3, "packet waiting for %s%s request\n", | 836 | DBG(3, "packet waiting for %s%s request\n", |
850 | musb_ep->desc ? "" : "inactive ", | 837 | musb_ep->desc ? "" : "inactive ", |
851 | musb_ep->end_point.name); | 838 | musb_ep->end_point.name); |
852 | |||
853 | done: | ||
854 | return; | 839 | return; |
855 | } | 840 | } |
856 | 841 | ||
@@ -1244,7 +1229,7 @@ int musb_gadget_set_halt(struct usb_ep *ep, int value) | |||
1244 | void __iomem *mbase; | 1229 | void __iomem *mbase; |
1245 | unsigned long flags; | 1230 | unsigned long flags; |
1246 | u16 csr; | 1231 | u16 csr; |
1247 | struct musb_request *request = NULL; | 1232 | struct musb_request *request; |
1248 | int status = 0; | 1233 | int status = 0; |
1249 | 1234 | ||
1250 | if (!ep) | 1235 | if (!ep) |
@@ -1260,24 +1245,29 @@ int musb_gadget_set_halt(struct usb_ep *ep, int value) | |||
1260 | 1245 | ||
1261 | musb_ep_select(mbase, epnum); | 1246 | musb_ep_select(mbase, epnum); |
1262 | 1247 | ||
1263 | /* cannot portably stall with non-empty FIFO */ | ||
1264 | request = to_musb_request(next_request(musb_ep)); | 1248 | request = to_musb_request(next_request(musb_ep)); |
1265 | if (value && musb_ep->is_in) { | 1249 | if (value) { |
1266 | csr = musb_readw(epio, MUSB_TXCSR); | 1250 | if (request) { |
1267 | if (csr & MUSB_TXCSR_FIFONOTEMPTY) { | 1251 | DBG(3, "request in progress, cannot halt %s\n", |
1268 | DBG(3, "%s fifo busy, cannot halt\n", ep->name); | 1252 | ep->name); |
1269 | spin_unlock_irqrestore(&musb->lock, flags); | 1253 | status = -EAGAIN; |
1270 | return -EAGAIN; | 1254 | goto done; |
1255 | } | ||
1256 | /* Cannot portably stall with non-empty FIFO */ | ||
1257 | if (musb_ep->is_in) { | ||
1258 | csr = musb_readw(epio, MUSB_TXCSR); | ||
1259 | if (csr & MUSB_TXCSR_FIFONOTEMPTY) { | ||
1260 | DBG(3, "FIFO busy, cannot halt %s\n", ep->name); | ||
1261 | status = -EAGAIN; | ||
1262 | goto done; | ||
1263 | } | ||
1271 | } | 1264 | } |
1272 | |||
1273 | } | 1265 | } |
1274 | 1266 | ||
1275 | /* set/clear the stall and toggle bits */ | 1267 | /* set/clear the stall and toggle bits */ |
1276 | DBG(2, "%s: %s stall\n", ep->name, value ? "set" : "clear"); | 1268 | DBG(2, "%s: %s stall\n", ep->name, value ? "set" : "clear"); |
1277 | if (musb_ep->is_in) { | 1269 | if (musb_ep->is_in) { |
1278 | csr = musb_readw(epio, MUSB_TXCSR); | 1270 | csr = musb_readw(epio, MUSB_TXCSR); |
1279 | if (csr & MUSB_TXCSR_FIFONOTEMPTY) | ||
1280 | csr |= MUSB_TXCSR_FLUSHFIFO; | ||
1281 | csr |= MUSB_TXCSR_P_WZC_BITS | 1271 | csr |= MUSB_TXCSR_P_WZC_BITS |
1282 | | MUSB_TXCSR_CLRDATATOG; | 1272 | | MUSB_TXCSR_CLRDATATOG; |
1283 | if (value) | 1273 | if (value) |
@@ -1300,14 +1290,13 @@ int musb_gadget_set_halt(struct usb_ep *ep, int value) | |||
1300 | musb_writew(epio, MUSB_RXCSR, csr); | 1290 | musb_writew(epio, MUSB_RXCSR, csr); |
1301 | } | 1291 | } |
1302 | 1292 | ||
1303 | done: | ||
1304 | |||
1305 | /* maybe start the first request in the queue */ | 1293 | /* maybe start the first request in the queue */ |
1306 | if (!musb_ep->busy && !value && request) { | 1294 | if (!musb_ep->busy && !value && request) { |
1307 | DBG(3, "restarting the request\n"); | 1295 | DBG(3, "restarting the request\n"); |
1308 | musb_ep_restart(musb, request); | 1296 | musb_ep_restart(musb, request); |
1309 | } | 1297 | } |
1310 | 1298 | ||
1299 | done: | ||
1311 | spin_unlock_irqrestore(&musb->lock, flags); | 1300 | spin_unlock_irqrestore(&musb->lock, flags); |
1312 | return status; | 1301 | return status; |
1313 | } | 1302 | } |
diff --git a/drivers/usb/musb/musb_gadget_ep0.c b/drivers/usb/musb/musb_gadget_ep0.c index 7a6778675ad3..522efb31b56b 100644 --- a/drivers/usb/musb/musb_gadget_ep0.c +++ b/drivers/usb/musb/musb_gadget_ep0.c | |||
@@ -511,7 +511,8 @@ static void ep0_txstate(struct musb *musb) | |||
511 | 511 | ||
512 | /* update the flags */ | 512 | /* update the flags */ |
513 | if (fifo_count < MUSB_MAX_END0_PACKET | 513 | if (fifo_count < MUSB_MAX_END0_PACKET |
514 | || request->actual == request->length) { | 514 | || (request->actual == request->length |
515 | && !request->zero)) { | ||
515 | musb->ep0_state = MUSB_EP0_STAGE_STATUSOUT; | 516 | musb->ep0_state = MUSB_EP0_STAGE_STATUSOUT; |
516 | csr |= MUSB_CSR0_P_DATAEND; | 517 | csr |= MUSB_CSR0_P_DATAEND; |
517 | } else | 518 | } else |
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index cf94511485f2..e3ab40a966eb 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c | |||
@@ -1301,8 +1301,11 @@ void musb_host_tx(struct musb *musb, u8 epnum) | |||
1301 | return; | 1301 | return; |
1302 | } else if (usb_pipeisoc(pipe) && dma) { | 1302 | } else if (usb_pipeisoc(pipe) && dma) { |
1303 | if (musb_tx_dma_program(musb->dma_controller, hw_ep, qh, urb, | 1303 | if (musb_tx_dma_program(musb->dma_controller, hw_ep, qh, urb, |
1304 | offset, length)) | 1304 | offset, length)) { |
1305 | if (is_cppi_enabled() || tusb_dma_omap()) | ||
1306 | musb_h_tx_dma_start(hw_ep); | ||
1305 | return; | 1307 | return; |
1308 | } | ||
1306 | } else if (tx_csr & MUSB_TXCSR_DMAENAB) { | 1309 | } else if (tx_csr & MUSB_TXCSR_DMAENAB) { |
1307 | DBG(1, "not complete, but DMA enabled?\n"); | 1310 | DBG(1, "not complete, but DMA enabled?\n"); |
1308 | return; | 1311 | return; |
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 34875201ee04..6761d2088db8 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/mux.h> | 38 | #include <plat/mux.h> |
39 | 39 | ||
40 | #include "musb_core.h" | 40 | #include "musb_core.h" |
41 | #include "omap2430.h" | 41 | #include "omap2430.h" |
diff --git a/drivers/usb/musb/omap2430.h b/drivers/usb/musb/omap2430.h index dc7670718cd2..fbede7798aed 100644 --- a/drivers/usb/musb/omap2430.h +++ b/drivers/usb/musb/omap2430.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430) | 13 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430) |
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <mach/usb.h> | 15 | #include <plat/usb.h> |
16 | 16 | ||
17 | /* | 17 | /* |
18 | * OMAP2430-specific definitions | 18 | * OMAP2430-specific definitions |
diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c index 7e073a0d7ac9..e13c77052e5e 100644 --- a/drivers/usb/musb/tusb6010_omap.c +++ b/drivers/usb/musb/tusb6010_omap.c | |||
@@ -15,8 +15,8 @@ | |||
15 | #include <linux/usb.h> | 15 | #include <linux/usb.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/dma-mapping.h> | 17 | #include <linux/dma-mapping.h> |
18 | #include <mach/dma.h> | 18 | #include <plat/dma.h> |
19 | #include <mach/mux.h> | 19 | #include <plat/mux.h> |
20 | 20 | ||
21 | #include "musb_core.h" | 21 | #include "musb_core.h" |
22 | 22 | ||
diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c index 77a5f4188999..d54460a88173 100644 --- a/drivers/usb/otg/isp1301_omap.c +++ b/drivers/usb/otg/isp1301_omap.c | |||
@@ -36,8 +36,8 @@ | |||
36 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
37 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
38 | 38 | ||
39 | #include <mach/usb.h> | 39 | #include <plat/usb.h> |
40 | #include <mach/mux.h> | 40 | #include <plat/mux.h> |
41 | 41 | ||
42 | 42 | ||
43 | #ifndef DEBUG | 43 | #ifndef DEBUG |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 9c60d6d4908a..ebcc6d0e2e91 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -1937,7 +1937,7 @@ static void ftdi_write_bulk_callback(struct urb *urb) | |||
1937 | return; | 1937 | return; |
1938 | } | 1938 | } |
1939 | /* account for transferred data */ | 1939 | /* account for transferred data */ |
1940 | countback = urb->actual_length; | 1940 | countback = urb->transfer_buffer_length; |
1941 | data_offset = priv->write_offset; | 1941 | data_offset = priv->write_offset; |
1942 | if (data_offset > 0) { | 1942 | if (data_offset > 0) { |
1943 | /* Subtract the control bytes */ | 1943 | /* Subtract the control bytes */ |
@@ -1950,7 +1950,6 @@ static void ftdi_write_bulk_callback(struct urb *urb) | |||
1950 | 1950 | ||
1951 | if (status) { | 1951 | if (status) { |
1952 | dbg("nonzero write bulk status received: %d", status); | 1952 | dbg("nonzero write bulk status received: %d", status); |
1953 | return; | ||
1954 | } | 1953 | } |
1955 | 1954 | ||
1956 | usb_serial_port_softint(port); | 1955 | usb_serial_port_softint(port); |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 319aaf9725b3..0577e4b61114 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -336,6 +336,10 @@ static int option_resume(struct usb_serial *serial); | |||
336 | #define AIRPLUS_VENDOR_ID 0x1011 | 336 | #define AIRPLUS_VENDOR_ID 0x1011 |
337 | #define AIRPLUS_PRODUCT_MCD650 0x3198 | 337 | #define AIRPLUS_PRODUCT_MCD650 0x3198 |
338 | 338 | ||
339 | /* 4G Systems products */ | ||
340 | #define FOUR_G_SYSTEMS_VENDOR_ID 0x1c9e | ||
341 | #define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603 | ||
342 | |||
339 | static struct usb_device_id option_ids[] = { | 343 | static struct usb_device_id option_ids[] = { |
340 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, | 344 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, |
341 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, | 345 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, |
@@ -599,6 +603,7 @@ static struct usb_device_id option_ids[] = { | |||
599 | { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) }, | 603 | { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) }, |
600 | { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, | 604 | { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, |
601 | { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, | 605 | { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, |
606 | { USB_DEVICE(FOUR_G_SYSTEMS_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14) }, | ||
602 | { } /* Terminating entry */ | 607 | { } /* Terminating entry */ |
603 | }; | 608 | }; |
604 | MODULE_DEVICE_TABLE(usb, option_ids); | 609 | MODULE_DEVICE_TABLE(usb, option_ids); |