Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 971fe656 authored by Mian Yousaf Kaukab's avatar Mian Yousaf Kaukab Committed by Felipe Balbi
Browse files

usb: gadget: net2280: physically disable endpoint on disable operation



Reset configuration in ep_cfg on disable to physically disable the
endpoint.

Tested-by: default avatarRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: default avatarMian Yousaf Kaukab <yousaf.kaukab@intel.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent e9ab4d0a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -461,6 +461,13 @@ static void ep_reset_338x(struct net2280_regs __iomem *regs,
	       BIT(DATA_PACKET_TRANSMITTED_INTERRUPT) |
	       BIT(DATA_OUT_PING_TOKEN_INTERRUPT) |
	       BIT(DATA_IN_TOKEN_INTERRUPT), &ep->regs->ep_stat);

	tmp = readl(&ep->cfg->ep_cfg);
	if (ep->is_in)
		tmp &= ~USB3380_EP_CFG_MASK_IN;
	else
		tmp &= ~USB3380_EP_CFG_MASK_OUT;
	writel(tmp, &ep->cfg->ep_cfg);
}

static void nuke(struct net2280_ep *);