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

Commit ede2845d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: restart usb upon endpoint cmd timeout"

parents 41f842e5 629cc650
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -975,6 +975,7 @@ struct dwc3 {
	int			irq;
	struct tasklet_struct	bh;
	unsigned long		irq_cnt;
	unsigned long		ep_cmd_timeout_cnt;
	unsigned                bh_completion_time[MAX_INTR_STATS];
	unsigned                bh_handled_evt_cnt[MAX_INTR_STATS];
	unsigned                bh_dbg_index;
+1 −1
Original line number Diff line number Diff line
@@ -1799,7 +1799,7 @@ static void dwc3_msm_notify_event(struct dwc3 *dwc, unsigned event,
		break;
	case DWC3_CONTROLLER_RESTART_USB_SESSION:
		dev_dbg(mdwc->dev, "DWC3_CONTROLLER_RESTART_USB_SESSION received\n");
		dwc3_restart_usb_work(&mdwc->restart_usb_work);
		schedule_work(&mdwc->restart_usb_work);
		break;
	case DWC3_CONTROLLER_NOTIFY_DISABLE_UPDXFER:
		dwc3_msm_dbm_disable_updxfer(dwc, value);
+6 −1
Original line number Diff line number Diff line
@@ -345,7 +345,7 @@ int dwc3_send_gadget_ep_cmd(struct dwc3 *dwc, unsigned ep,
		unsigned cmd, struct dwc3_gadget_ep_cmd_params *params)
{
	struct dwc3_ep		*dep = dwc->eps[ep];
	u32			timeout = 1500;
	u32			timeout = 3000;
	u32			reg;

	trace_dwc3_gadget_ep_cmd(dep, cmd, params);
@@ -382,6 +382,11 @@ int dwc3_send_gadget_ep_cmd(struct dwc3 *dwc, unsigned ep,
		if (!timeout) {
			dev_err(dwc->dev, "%s command timeout for %s\n",
				dwc3_gadget_ep_cmd_string(cmd), dep->name);
			if (!(cmd & DWC3_DEPCMD_ENDTRANSFER)) {
				dwc->ep_cmd_timeout_cnt++;
				dwc3_notify_event(dwc,
					DWC3_CONTROLLER_RESTART_USB_SESSION, 0);
			}
			return -ETIMEDOUT;
		}