diff options
author | Mian Yousaf Kaukab <yousaf.kaukab@intel.com> | 2015-05-16 22:33:31 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-05-26 10:39:52 -0500 |
commit | e6ac4bb0590d6482f48a86a10884a9f2eb66c111 (patch) | |
tree | eb8365d5243c888ae1b75e60da79a6832114fe91 /drivers/usb | |
parent | 25d40ee8189531d9df3ff10e25ddb92b5f075343 (diff) | |
download | linux-e6ac4bb0590d6482f48a86a10884a9f2eb66c111.tar.bz2 |
usb: gadget: net2280: reset sequence number on ep enable
Sequence number can be out of sync if endpoint is disabled after some
data transfers and enabled again. Reset it to stay in sync with host.
Tested-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/udc/net2280.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c index 62bc15742e10..a91da3640ded 100644 --- a/drivers/usb/gadget/udc/net2280.c +++ b/drivers/usb/gadget/udc/net2280.c @@ -123,6 +123,8 @@ static char *type_string(u8 bmAttributes) #define valid_bit cpu_to_le32(BIT(VALID_BIT)) #define dma_done_ie cpu_to_le32(BIT(DMA_DONE_INTERRUPT_ENABLE)) +static void ep_clear_seqnum(struct net2280_ep *ep); + /*-------------------------------------------------------------------------*/ static inline void enable_pciirqenb(struct net2280_ep *ep) { @@ -256,6 +258,8 @@ net2280_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) BIT(CLEAR_NAK_OUT_PACKETS_MODE), &ep->regs->ep_rsp); } + if (dev->quirks & PLX_SUPERSPEED) + ep_clear_seqnum(ep); writel(tmp, &ep->cfg->ep_cfg); /* enable irqs */ |