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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQhkFgAAoJEIaOsuA1yqREDn4P/3I3h1F5Oee0F/G1OXFYVWid
 KD/d5S5I8bP3OESZcsnufn6sLD5zaeucdVh20gDjGuTH7QK6N2z+/i5A6RlgS++U
 eIIXMb7oLJ30NeGV8/wdtrRXT/+DKHq0RWLMWcdlc/KxH2jvbvD23pSA44gzWLdL
 GoaViXFAKJ6aEWoBo7AEPx9uzv4HRk+6uHPqmp6xlhNgFnlShR6oWDSO+0EdJyTI
 ADk22Qy9R15kSJZFxlWI7CizCF7VvPgSSfnIh38wKUS/qNEiUO5tuoxXkDq0J0x2
 csB+NJOv8zqF+ouRVB2ypNxwJyT+2hGyTRz8+QSbwnNtOFd42yy/KhzgxWoMqSXR
 F9EzzFWhYw+VLtJTq+EKSZ947rTLRbIGE0Mma1OZ4NvfVvaeiOUYKuHSRzsXsDQ2
 F4jhpqa1sAzUqHxmkCpb2j3mYbFmmvenpa7VYTdwCEclhzNN8wg6ReVrQdOTqlgs
 ry93yLLTCf7zb4DbqbYuK0xyJPjXysDxQfyVh9Iomiaqocf+06XdzGc1cUJsHom5
 3zVreQEqjnPHs3VJV65HDcuokCfEB4UsWM2aJQvTGZez8wCXn6LThbeE8o8oigq7
 qDHFfKKcfxWgBO4qDu3YBsIwsIhBml93Sb6wEgB1e2Xoly+3VPcJHX7/TujKX99/
 iFoxRZM/KhOwUJniVCE5
 =smxQ
 -----END PGP SIGNATURE-----

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.
This commit is contained in:
Greg Kroah-Hartman 2012-10-23 19:24:23 -07:00
commit c24d1ce579
4 changed files with 13 additions and 5 deletions

View File

@ -2069,8 +2069,10 @@ static irqreturn_t net2272_irq(int irq, void *_dev)
#if defined(PLX_PCI_RDK2)
/* see if PCI int for us by checking irqstat */
intcsr = readl(dev->rdk2.fpga_base_addr + RDK2_IRQSTAT);
if (!intcsr & (1 << NET2272_PCI_IRQ))
if (!intcsr & (1 << NET2272_PCI_IRQ)) {
spin_unlock(&dev->lock);
return IRQ_NONE;
}
/* check dma interrupts */
#endif
/* Platform/devcice interrupt handler */

View File

@ -458,11 +458,11 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id)
struct platform_device *musb;
struct resource *res;
struct resource resources[2];
char res_name[10];
char res_name[11];
int ret, musbid;
/* get memory resource */
sprintf(res_name, "musb%d", id);
snprintf(res_name, sizeof(res_name), "musb%d", id);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, res_name);
if (!res) {
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)
resources[0] = *res;
/* get irq resource */
sprintf(res_name, "musb%d-irq", id);
snprintf(res_name, sizeof(res_name), "musb%d-irq", id);
res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, res_name);
if (!res) {
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)
of_property_read_u32(np, "num-eps", (u32 *)&config->num_eps);
of_property_read_u32(np, "ram-bits", (u32 *)&config->ram_bits);
sprintf(res_name, "port%d-mode", id);
snprintf(res_name, sizeof(res_name), "port%d-mode", id);
of_property_read_u32(np, res_name, (u32 *)&pdata->mode);
of_property_read_u32(np, "power", (u32 *)&pdata->power);
config->multipoint = of_property_read_bool(np, "multipoint");

View File

@ -795,6 +795,7 @@ static void xfer_work(struct work_struct *work)
dev_dbg(dev, " %s %d (%d/ %d)\n",
fifo->name, usbhs_pipe_number(pipe), pkt->length, pkt->zero);
usbhs_pipe_enable(pipe);
usbhsf_dma_start(pipe, fifo);
dma_async_issue_pending(chan);
}

View File

@ -334,6 +334,11 @@ static void usbhsh_pipe_detach(struct usbhsh_hpriv *hpriv,
struct device *dev = usbhs_priv_to_dev(priv);
unsigned long flags;
if (unlikely(!uep)) {
dev_err(dev, "no uep\n");
return;
}
/******************** spin lock ********************/
usbhs_lock(priv, flags);