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

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

Merge "Revert "usb: pd: Don't retry sending Source Capabilities if PD capable""

parents 3113856b 59056eba
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -2625,16 +2625,6 @@ static void usbpd_sm(struct work_struct *w)
		ret = pd_send_msg(pd, MSG_SOURCE_CAPABILITIES, default_src_caps,
				ARRAY_SIZE(default_src_caps), SOP_MSG);
		if (ret) {
			if (pd->pd_connected) {
				usbpd_set_state(pd, PE_SEND_SOFT_RESET);
				break;
			}

			/*
			 * Technically this is PE_SRC_Discovery, but we can
			 * handle it by setting a timer to come back to the
			 * same state for the next retry.
			 */
			pd->caps_count++;
			if (pd->caps_count >= PD_CAPS_COUNT) {
				usbpd_dbg(&pd->dev, "Src CapsCounter exceeded, disabling PD\n");