From 29ff169fdb326ff11dba29364b1cd7b6d2530c89 Mon Sep 17 00:00:00 2001 From: Chaitanya Vadrevu Date: Mon, 24 Mar 2025 10:47:55 -0500 Subject: [PATCH] usb: dwc3: Remove mdelay to fix USBLAN issue cRIO-9041, cRIO-9034 and possibly other devices' USBLAN does not work with this mdelay in place when connected to Windows host. Signed-off-by: Chaitanya Vadrevu --- drivers/usb/dwc3/gadget.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 86b4b705cc014..f902fbdc88684 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -438,9 +438,17 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned int cmd, dwc3_gadget_ep_get_transfer_index(dep); } + /* + * mdelay below breaks USBLAN in cRIO-9041 and other devices. Commenting + * out instead of removing so git doesn't drop this silently during + * upstream merges if upstream moves this to a different place in + * future. + * + * AB#2419039 + */ if (DWC3_DEPCMD_CMD(cmd) == DWC3_DEPCMD_ENDTRANSFER && !(cmd & DWC3_DEPCMD_CMDIOC)) - mdelay(1); + ; /* mdelay(1); */ if (saved_config) { reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));