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

Commit f69953c6 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: pd: Make sure USB host is completed before starting VDMs"

parents c7aa41f5 64e88d02
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4184,7 +4184,7 @@ static int dwc3_usb_blocking_sync(struct notifier_block *nb,

	dbg_event(0xFF, "fw_blocksync", 0);
	flush_work(&mdwc->resume_work);
	flush_delayed_work(&mdwc->sm_work);
	drain_workqueue(mdwc->sm_usb_wq);

	if (!mdwc->in_host_mode && !mdwc->in_device_mode) {
		dbg_event(0xFF, "lpm_state", atomic_read(&dwc->in_lpm));
+3 −0
Original line number Diff line number Diff line
@@ -2001,6 +2001,9 @@ static void dr_swap(struct usbpd *pd)
			start_usb_host(pd, true);
		pd->current_dr = DR_DFP;

		/* ensure host is started before allowing DP */
		extcon_blocking_sync(pd->extcon, EXTCON_USB_HOST, 0);

		usbpd_send_svdm(pd, USBPD_SID, USBPD_SVDM_DISCOVER_IDENTITY,
				SVDM_CMD_TYPE_INITIATOR, 0, NULL, 0);
	}