mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
usb: dwc3: gadget: Rate limit ep_queue() error message
In case of a soft disconnect the controller will be halted via dwc3_gadget_run_stop(). However, a function driver might be unaware of this and could still be continuing to call usb_ep_queue() in a different process. Since pullups_connected is false, this results in a dev_err() to be printed and could happen quite frequently before the function's disconnect or unbind callbacks are finally notified. Rate limit this error message to avoid flooding the kernel log. Change-Id: If5299cdfd7eee13bb51a8cf29917d9674d0a7c9b Signed-off-by: Jack Pham <jackp@codeaurora.org>
This commit is contained in:
parent
08a7059080
commit
ad718dac47
2 changed files with 2 additions and 2 deletions
|
|
@ -199,7 +199,7 @@ int dwc3_gadget_ep0_queue(struct usb_ep *ep, struct usb_request *request,
|
|||
spin_lock_irqsave(&dwc->lock, flags);
|
||||
if (!dep->endpoint.desc || !dwc->pullups_connected ||
|
||||
!dwc->vbus_active) {
|
||||
dev_err(dwc->dev, "%s: can't queue to disabled endpoint\n",
|
||||
dev_err_ratelimited(dwc->dev, "%s: can't queue to disabled endpoint\n",
|
||||
dep->name);
|
||||
ret = -ESHUTDOWN;
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -1554,7 +1554,7 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
|
|||
struct dwc3 *dwc = dep->dwc;
|
||||
|
||||
if (!dep->endpoint.desc || !dwc->pullups_connected) {
|
||||
dev_err(dwc->dev, "%s: can't queue to disabled endpoint\n",
|
||||
dev_err_ratelimited(dwc->dev, "%s: can't queue to disabled endpoint\n",
|
||||
dep->name);
|
||||
return -ESHUTDOWN;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue