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

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

Merge "usb: pd: Call reset_vdm_state() before stopping USB host mode"

parents 9a5630d4 86cb2029
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1588,6 +1588,7 @@ static void usbpd_sm(struct work_struct *w)
			pd->vconn_enabled = false;
		}

		reset_vdm_state(pd);
		if (pd->current_dr == DR_UFP)
			stop_usb_peripheral(pd);
		else if (pd->current_dr == DR_DFP)
@@ -1596,8 +1597,6 @@ static void usbpd_sm(struct work_struct *w)
		pd->current_pr = PR_NONE;
		pd->current_dr = DR_NONE;

		reset_vdm_state(pd);

		if (pd->current_state == PE_ERROR_RECOVERY)
			/* forced disconnect, wait before resetting to DRP */
			usleep_range(ERROR_RECOVERY_TIME * USEC_PER_MSEC,