diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-23 22:24:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-23 22:24:23 -0400 |
commit | c24d1ce579139116e684c118a89509c48b453bad (patch) | |
tree | c9cb1de961f5c6d4fee85fbb3b8d9043d3d4e20b /drivers/usb | |
parent | 3b6054da68f9b0d5ed6a7ed0f42a79e61904352c (diff) | |
parent | 1cb60156defa4f23d5318ea1ddd400f25b2d0ce5 (diff) |
Merge tag 'fixes-for-v3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
usb: fixes for v3.7-rc3
Here's a new set of fixes for v3.7-rc3. It's quite small, only
four patches.
There's one bug fix for the newly added musb-dsps glue layer where
we could be overflowing a buffer when creating the instance name.
NET2272 got a fix for a case where the lock would be left held
when exiting the IRQ handler with error in case of Spurious IRQs.
Renensas USBHS got a DMA stall fix which would cause transfers to
stall forever and a NULL pointer deref fix in case of pipe detach.
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/net2272.c | 4 | ||||
-rw-r--r-- | drivers/usb/musb/musb_dsps.c | 8 | ||||
-rw-r--r-- | drivers/usb/renesas_usbhs/fifo.c | 1 | ||||
-rw-r--r-- | drivers/usb/renesas_usbhs/mod_host.c | 5 |
4 files changed, 13 insertions, 5 deletions
diff --git a/drivers/usb/gadget/net2272.c b/drivers/usb/gadget/net2272.c index 43ac7482fa9..c009263a47e 100644 --- a/drivers/usb/gadget/net2272.c +++ b/drivers/usb/gadget/net2272.c | |||
@@ -2069,8 +2069,10 @@ static irqreturn_t net2272_irq(int irq, void *_dev) | |||
2069 | #if defined(PLX_PCI_RDK2) | 2069 | #if defined(PLX_PCI_RDK2) |
2070 | /* see if PCI int for us by checking irqstat */ | 2070 | /* see if PCI int for us by checking irqstat */ |
2071 | intcsr = readl(dev->rdk2.fpga_base_addr + RDK2_IRQSTAT); | 2071 | intcsr = readl(dev->rdk2.fpga_base_addr + RDK2_IRQSTAT); |
2072 | if (!intcsr & (1 << NET2272_PCI_IRQ)) | 2072 | if (!intcsr & (1 << NET2272_PCI_IRQ)) { |
2073 | spin_unlock(&dev->lock); | ||
2073 | return IRQ_NONE; | 2074 | return IRQ_NONE; |
2075 | } | ||
2074 | /* check dma interrupts */ | 2076 | /* check dma interrupts */ |
2075 | #endif | 2077 | #endif |
2076 | /* Platform/devcice interrupt handler */ | 2078 | /* Platform/devcice interrupt handler */ |
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 444346e1e10..ff5f112053d 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c | |||
@@ -458,11 +458,11 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id) | |||
458 | struct platform_device *musb; | 458 | struct platform_device *musb; |
459 | struct resource *res; | 459 | struct resource *res; |
460 | struct resource resources[2]; | 460 | struct resource resources[2]; |
461 | char res_name[10]; | 461 | char res_name[11]; |
462 | int ret, musbid; | 462 | int ret, musbid; |
463 | 463 | ||
464 | /* get memory resource */ | 464 | /* get memory resource */ |
465 | sprintf(res_name, "musb%d", id); | 465 | snprintf(res_name, sizeof(res_name), "musb%d", id); |
466 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, res_name); | 466 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, res_name); |
467 | if (!res) { | 467 | if (!res) { |
468 | dev_err(dev, "%s get mem resource failed\n", res_name); | 468 | dev_err(dev, "%s get mem resource failed\n", res_name); |
@@ -473,7 +473,7 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id) | |||
473 | resources[0] = *res; | 473 | resources[0] = *res; |
474 | 474 | ||
475 | /* get irq resource */ | 475 | /* get irq resource */ |
476 | sprintf(res_name, "musb%d-irq", id); | 476 | snprintf(res_name, sizeof(res_name), "musb%d-irq", id); |
477 | res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, res_name); | 477 | res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, res_name); |
478 | if (!res) { | 478 | if (!res) { |
479 | dev_err(dev, "%s get irq resource failed\n", res_name); | 479 | dev_err(dev, "%s get irq resource failed\n", res_name); |
@@ -530,7 +530,7 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id) | |||
530 | 530 | ||
531 | of_property_read_u32(np, "num-eps", (u32 *)&config->num_eps); | 531 | of_property_read_u32(np, "num-eps", (u32 *)&config->num_eps); |
532 | of_property_read_u32(np, "ram-bits", (u32 *)&config->ram_bits); | 532 | of_property_read_u32(np, "ram-bits", (u32 *)&config->ram_bits); |
533 | sprintf(res_name, "port%d-mode", id); | 533 | snprintf(res_name, sizeof(res_name), "port%d-mode", id); |
534 | of_property_read_u32(np, res_name, (u32 *)&pdata->mode); | 534 | of_property_read_u32(np, res_name, (u32 *)&pdata->mode); |
535 | of_property_read_u32(np, "power", (u32 *)&pdata->power); | 535 | of_property_read_u32(np, "power", (u32 *)&pdata->power); |
536 | config->multipoint = of_property_read_bool(np, "multipoint"); | 536 | config->multipoint = of_property_read_bool(np, "multipoint"); |
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index 143c4e9e1be..c021b202c0f 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c | |||
@@ -795,6 +795,7 @@ static void xfer_work(struct work_struct *work) | |||
795 | dev_dbg(dev, " %s %d (%d/ %d)\n", | 795 | dev_dbg(dev, " %s %d (%d/ %d)\n", |
796 | fifo->name, usbhs_pipe_number(pipe), pkt->length, pkt->zero); | 796 | fifo->name, usbhs_pipe_number(pipe), pkt->length, pkt->zero); |
797 | 797 | ||
798 | usbhs_pipe_enable(pipe); | ||
798 | usbhsf_dma_start(pipe, fifo); | 799 | usbhsf_dma_start(pipe, fifo); |
799 | dma_async_issue_pending(chan); | 800 | dma_async_issue_pending(chan); |
800 | } | 801 | } |
diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c index 9b69a132329..069cd765400 100644 --- a/drivers/usb/renesas_usbhs/mod_host.c +++ b/drivers/usb/renesas_usbhs/mod_host.c | |||
@@ -334,6 +334,11 @@ static void usbhsh_pipe_detach(struct usbhsh_hpriv *hpriv, | |||
334 | struct device *dev = usbhs_priv_to_dev(priv); | 334 | struct device *dev = usbhs_priv_to_dev(priv); |
335 | unsigned long flags; | 335 | unsigned long flags; |
336 | 336 | ||
337 | if (unlikely(!uep)) { | ||
338 | dev_err(dev, "no uep\n"); | ||
339 | return; | ||
340 | } | ||
341 | |||
337 | /******************** spin lock ********************/ | 342 | /******************** spin lock ********************/ |
338 | usbhs_lock(priv, flags); | 343 | usbhs_lock(priv, flags); |
339 | 344 | ||