diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index de7bdc7a9448..834f286cf79d 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -313,6 +313,7 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, spin_lock(&dwc->lock); } +#define DWC_CMD_TIMEOUT 3000 /** * dwc3_send_gadget_generic_command - issue a generic command for the controller * @dwc: pointer to the controller context @@ -324,7 +325,7 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, */ int dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned cmd, u32 param) { - u32 timeout = 500; + u32 timeout = DWC_CMD_TIMEOUT; int status = 0; int ret = 0; u32 reg; @@ -366,7 +367,7 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd, { const struct usb_endpoint_descriptor *desc = dep->endpoint.desc; struct dwc3 *dwc = dep->dwc; - u32 timeout = 3000; + u32 timeout = DWC_CMD_TIMEOUT; u32 saved_config = 0; u32 reg;