Skip to content

Commit 971fe65

Browse files
Mian Yousaf KaukabFelipe Balbi
authored andcommitted
usb: gadget: net2280: physically disable endpoint on disable operation
Reset configuration in ep_cfg on disable to physically disable the endpoint. 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>
1 parent e9ab4d0 commit 971fe65

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/usb/gadget/udc/net2280.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,13 @@ static void ep_reset_338x(struct net2280_regs __iomem *regs,
461461
BIT(DATA_PACKET_TRANSMITTED_INTERRUPT) |
462462
BIT(DATA_OUT_PING_TOKEN_INTERRUPT) |
463463
BIT(DATA_IN_TOKEN_INTERRUPT), &ep->regs->ep_stat);
464+
465+
tmp = readl(&ep->cfg->ep_cfg);
466+
if (ep->is_in)
467+
tmp &= ~USB3380_EP_CFG_MASK_IN;
468+
else
469+
tmp &= ~USB3380_EP_CFG_MASK_OUT;
470+
writel(tmp, &ep->cfg->ep_cfg);
464471
}
465472

466473
static void nuke(struct net2280_ep *);

0 commit comments

Comments
 (0)