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:
@@ -1091,7 +1091,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
|
|||||||
if (r == req) {
|
if (r == req) {
|
||||||
/* wait until it is processed */
|
/* wait until it is processed */
|
||||||
dwc3_stop_active_transfer(dwc, dep->number);
|
dwc3_stop_active_transfer(dwc, dep->number);
|
||||||
goto out0;
|
goto out1;
|
||||||
}
|
}
|
||||||
dev_err(dwc->dev, "request %p was not queued to %s\n",
|
dev_err(dwc->dev, "request %p was not queued to %s\n",
|
||||||
request, ep->name);
|
request, ep->name);
|
||||||
@@ -1099,6 +1099,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
|
|||||||
goto out0;
|
goto out0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out1:
|
||||||
/* giveback the request */
|
/* giveback the request */
|
||||||
dwc3_gadget_giveback(dep, req, -ECONNRESET);
|
dwc3_gadget_giveback(dep, req, -ECONNRESET);
|
||||||
|
|
||||||
|
@@ -153,10 +153,10 @@ struct usb_ep_para{
|
|||||||
#define USB_BUSMODE_DTB 0x02
|
#define USB_BUSMODE_DTB 0x02
|
||||||
|
|
||||||
/* Endpoint basic handle */
|
/* 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_maxpacket(EP) ((EP)->ep.maxpacket)
|
||||||
#define ep_is_in(EP) ((ep_index(EP) == 0) ? (EP->udc->ep0_dir == \
|
#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)
|
& USB_DIR_IN) == USB_DIR_IN)
|
||||||
|
|
||||||
/* ep0 transfer state */
|
/* ep0 transfer state */
|
||||||
|
@@ -61,6 +61,7 @@
|
|||||||
#include <mach/irqs.h>
|
#include <mach/irqs.h>
|
||||||
#include <mach/board.h>
|
#include <mach/board.h>
|
||||||
#ifdef CONFIG_USB_GADGET_DEBUG_FILES
|
#ifdef CONFIG_USB_GADGET_DEBUG_FILES
|
||||||
|
#include <linux/debugfs.h>
|
||||||
#include <linux/seq_file.h>
|
#include <linux/seq_file.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -375,11 +375,21 @@ static void musb_advance_schedule(struct musb *musb, struct urb *urb,
|
|||||||
*/
|
*/
|
||||||
if (list_empty(&qh->hep->urb_list)) {
|
if (list_empty(&qh->hep->urb_list)) {
|
||||||
struct list_head *head;
|
struct list_head *head;
|
||||||
|
struct dma_controller *dma = musb->dma_controller;
|
||||||
|
|
||||||
if (is_in)
|
if (is_in) {
|
||||||
ep->rx_reinit = 1;
|
ep->rx_reinit = 1;
|
||||||
else
|
if (ep->rx_channel) {
|
||||||
|
dma->channel_release(ep->rx_channel);
|
||||||
|
ep->rx_channel = NULL;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
ep->tx_reinit = 1;
|
ep->tx_reinit = 1;
|
||||||
|
if (ep->tx_channel) {
|
||||||
|
dma->channel_release(ep->tx_channel);
|
||||||
|
ep->tx_channel = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Clobber old pointers to this qh */
|
/* Clobber old pointers to this qh */
|
||||||
musb_ep_set_qh(ep, is_in, NULL);
|
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);
|
regulator_enable(twl->usb3v3);
|
||||||
twl->asleep = 1;
|
twl->asleep = 1;
|
||||||
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_CLR, 0x1);
|
twl6030_writeb(twl, TWL_MODULE_USB, 0x1, USB_ID_INT_EN_HI_CLR);
|
||||||
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_SET,
|
twl6030_writeb(twl, TWL_MODULE_USB, 0x10, USB_ID_INT_EN_HI_SET);
|
||||||
0x10);
|
|
||||||
status = USB_EVENT_ID;
|
status = USB_EVENT_ID;
|
||||||
otg->default_a = true;
|
otg->default_a = true;
|
||||||
twl->phy.state = OTG_STATE_A_IDLE;
|
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,
|
atomic_notifier_call_chain(&twl->phy.notifier, status,
|
||||||
otg->gadget);
|
otg->gadget);
|
||||||
} else {
|
} else {
|
||||||
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_CLR,
|
twl6030_writeb(twl, TWL_MODULE_USB, 0x10, USB_ID_INT_EN_HI_CLR);
|
||||||
0x10);
|
twl6030_writeb(twl, TWL_MODULE_USB, 0x1, USB_ID_INT_EN_HI_SET);
|
||||||
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_SET,
|
|
||||||
0x1);
|
|
||||||
}
|
}
|
||||||
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;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
@@ -343,7 +340,7 @@ static int twl6030_enable_irq(struct usb_phy *x)
|
|||||||
{
|
{
|
||||||
struct twl6030_usb *twl = phy_to_twl(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_LINE_C);
|
||||||
twl6030_interrupt_unmask(0x05, REG_INT_MSK_STS_C);
|
twl6030_interrupt_unmask(0x05, REG_INT_MSK_STS_C);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user