mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 22:02:28 +00:00
658027afea
When pmc_usb_mux_set() is invoked when a device is disconnected, a valid
scenario is for state->alt == NULL and state->mode == TYPEC_STATE_USB.
In such cases, if a pmc_usb_disconnect() has already been issued (from
either pmc_usb_set_orientation() when orientation ==
TYPEC_ORIENTATION_NONE, or pmc_usb_set_role() when role ==
USB_ROLE_NONE), a pmc_usb_connect() will be issued despite no peripheral
being present.
This confuses the PMC and leads to all subsequent PMC IPC requests
returning errors due to timeout.
To prevent this, return early if the port orientation or role is already
set to none.
Cc: Benson Leung <bleung@chromium.org>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Rajmohan Mani <rajmohan.mani@intel.com>
Fixes:
|
||
---|---|---|
.. | ||
altmodes | ||
mux | ||
tcpm | ||
ucsi | ||
bus.c | ||
bus.h | ||
class.c | ||
hd3ss3220.c | ||
Kconfig | ||
Makefile | ||
mux.c | ||
tps6598x.c |