usb: fixes for v3.5-rc3
A few remaining fixes for our v3.5 cycle containing a fix for a long standing bug which would cause musb to starve its dma channels by never releasing them, a build fix on lpc32xx_udc, another fix to Ido's endpoint descriptor series on fsl udc, a fix to the order of arguments on twl6030-usb driver and a fix to dwc3's dequeue method. All patches have been pending on the list for quite a while. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJP5EtwAAoJEIaOsuA1yqREFHcP/RQeOXuymfd8oTNGp+Yub2NY 5xjT5KmOWd1xbsHCH8nU7cHbnF6lsNl6tB4ibRzp+TtQyYZd67Us2F+Q1ejMvbkx 29pkrUiqd7BXz7jsh4m9DVsp1MLYNe4pozOWIxedY21VRUeAc1unlcYfL48zqvss o23x8s4A6mva3ETKvlcacESuXA/OQzYQDugSW95DzzLk5UAGZx5kB1MGLmfKMCo3 wKLRoss15ibBPsSriF7Xm7T6f7FHwcCG3WCUa8XQPb+7chDfKZmgnAYeLcrXJKUv VIwM3v0NJ2jYP0KKf6dEbh9zkmWy/qxGCVViX+yLWYgB/8vArr3r9nde+FOUh0IE hFCruXabqRK/WY1eh+kc/N/V3KnGqqL3+z56XP440IXhS/pEN/AfpTI/hwW9kSle ewHJldSRJECCnQSo1rTyJmBU/qQgWB19IqlwRM4ZBL0NUxHLMSv3t9dnwsesM23K uNf5F0bGGZRMoClQ+AtdVbLYx1fNCitw3tty9auAdCUxYwwech5cglS0OoQDyJqP MYdKLj47aYsdaNr2PA9UVS/Sp3GONZbQk5xOzMrMzoW91L8ii7WP3QxGiaQzWKhq G8WWPG0NZ/HPL1IW0X4sdnNby4pkDBEuxW50EINAy4sv7fY1RZJ7rYWGMWOdABbz 4BmFcdm7eq/9IRBcvu0K =0Dme -----END PGP SIGNATURE----- Merge tag 'fixes-for-v3.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus usb: fixes for v3.5-rc3 A few remaining fixes for our v3.5 cycle containing a fix for a long standing bug which would cause musb to starve its dma channels by never releasing them, a build fix on lpc32xx_udc, another fix to Ido's endpoint descriptor series on fsl udc, a fix to the order of arguments on twl6030-usb driver and a fix to dwc3's dequeue method. All patches have been pending on the list for quite a while.
This commit is contained in:
commit
0a6a2daf1c
|
@ -1091,7 +1091,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
|
|||
if (r == req) {
|
||||
/* wait until it is processed */
|
||||
dwc3_stop_active_transfer(dwc, dep->number);
|
||||
goto out0;
|
||||
goto out1;
|
||||
}
|
||||
dev_err(dwc->dev, "request %p was not queued to %s\n",
|
||||
request, ep->name);
|
||||
|
@ -1099,6 +1099,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
|
|||
goto out0;
|
||||
}
|
||||
|
||||
out1:
|
||||
/* giveback the request */
|
||||
dwc3_gadget_giveback(dep, req, -ECONNRESET);
|
||||
|
||||
|
|
|
@ -153,10 +153,10 @@ struct usb_ep_para{
|
|||
#define USB_BUSMODE_DTB 0x02
|
||||
|
||||
/* Endpoint basic handle */
|
||||
#define ep_index(EP) ((EP)->desc->bEndpointAddress & 0xF)
|
||||
#define ep_index(EP) ((EP)->ep.desc->bEndpointAddress & 0xF)
|
||||
#define ep_maxpacket(EP) ((EP)->ep.maxpacket)
|
||||
#define ep_is_in(EP) ((ep_index(EP) == 0) ? (EP->udc->ep0_dir == \
|
||||
USB_DIR_IN) : ((EP)->desc->bEndpointAddress \
|
||||
USB_DIR_IN) : ((EP)->ep.desc->bEndpointAddress \
|
||||
& USB_DIR_IN) == USB_DIR_IN)
|
||||
|
||||
/* ep0 transfer state */
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
#include <mach/irqs.h>
|
||||
#include <mach/board.h>
|
||||
#ifdef CONFIG_USB_GADGET_DEBUG_FILES
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/seq_file.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -375,11 +375,21 @@ static void musb_advance_schedule(struct musb *musb, struct urb *urb,
|
|||
*/
|
||||
if (list_empty(&qh->hep->urb_list)) {
|
||||
struct list_head *head;
|
||||
struct dma_controller *dma = musb->dma_controller;
|
||||
|
||||
if (is_in)
|
||||
if (is_in) {
|
||||
ep->rx_reinit = 1;
|
||||
else
|
||||
if (ep->rx_channel) {
|
||||
dma->channel_release(ep->rx_channel);
|
||||
ep->rx_channel = NULL;
|
||||
}
|
||||
} else {
|
||||
ep->tx_reinit = 1;
|
||||
if (ep->tx_channel) {
|
||||
dma->channel_release(ep->tx_channel);
|
||||
ep->tx_channel = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Clobber old pointers to this qh */
|
||||
musb_ep_set_qh(ep, is_in, NULL);
|
||||
|
|
|
@ -305,9 +305,8 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl)
|
|||
|
||||
regulator_enable(twl->usb3v3);
|
||||
twl->asleep = 1;
|
||||
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_CLR, 0x1);
|
||||
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_SET,
|
||||
0x10);
|
||||
twl6030_writeb(twl, TWL_MODULE_USB, 0x1, USB_ID_INT_EN_HI_CLR);
|
||||
twl6030_writeb(twl, TWL_MODULE_USB, 0x10, USB_ID_INT_EN_HI_SET);
|
||||
status = USB_EVENT_ID;
|
||||
otg->default_a = true;
|
||||
twl->phy.state = OTG_STATE_A_IDLE;
|
||||
|
@ -316,12 +315,10 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl)
|
|||
atomic_notifier_call_chain(&twl->phy.notifier, status,
|
||||
otg->gadget);
|
||||
} else {
|
||||
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_CLR,
|
||||
0x10);
|
||||
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_SET,
|
||||
0x1);
|
||||
twl6030_writeb(twl, TWL_MODULE_USB, 0x10, USB_ID_INT_EN_HI_CLR);
|
||||
twl6030_writeb(twl, TWL_MODULE_USB, 0x1, USB_ID_INT_EN_HI_SET);
|
||||
}
|
||||
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_LATCH_CLR, status);
|
||||
twl6030_writeb(twl, TWL_MODULE_USB, status, USB_ID_INT_LATCH_CLR);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
@ -343,7 +340,7 @@ static int twl6030_enable_irq(struct usb_phy *x)
|
|||
{
|
||||
struct twl6030_usb *twl = phy_to_twl(x);
|
||||
|
||||
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_SET, 0x1);
|
||||
twl6030_writeb(twl, TWL_MODULE_USB, 0x1, USB_ID_INT_EN_HI_SET);
|
||||
twl6030_interrupt_unmask(0x05, REG_INT_MSK_LINE_C);
|
||||
twl6030_interrupt_unmask(0x05, REG_INT_MSK_STS_C);
|
||||
|
||||
|
|
Loading…
Reference in New Issue