linux_dsm_epyc7002/drivers/usb
Prashant Malani 658027afea usb: typec: intel_pmc_mux: Avoid connect request on disconnect
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: f3c1c41ebc ("usb: typec: intel_pmc_mux: Add support for USB4")
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Link: https://lore.kernel.org/r/20200709002441.1309189-1-pmalani@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21 13:38:21 +02:00
..
atm usb: Use fallthrough pseudo-keyword 2020-07-10 08:55:17 +02:00
c67x00 Linux 5.8-rc6 2020-07-20 09:41:30 +02:00
cdns3 Linux 5.8-rc6 2020-07-20 09:41:30 +02:00
chipidea Linux 5.8-rc6 2020-07-20 09:41:30 +02:00
class usb: class: cdc-wdm: Provide description for usb_cdc_wdm_register()'s manage_power arg 2020-07-15 17:25:57 +02:00
common usb: common: ulpi: Fix a few kerneldoc related issues 2020-07-03 09:34:11 +02:00
core usb: core: fix quirks_param_set() writing to a const pointer 2020-07-21 13:38:21 +02:00
dwc2 Linux 5.8-rc6 2020-07-20 09:41:30 +02:00
dwc3 Linux 5.8-rc6 2020-07-20 09:41:30 +02:00
early usb: early: xhci-dbc: File headers are not good candidates for kerneldoc 2020-07-09 17:19:59 +02:00
gadget Linux 5.8-rc6 2020-07-20 09:41:30 +02:00
host USB: Remove pci-dma-compat wrapper APIs. 2020-07-15 16:48:10 +02:00
image usb: Use fallthrough pseudo-keyword 2020-07-10 08:55:17 +02:00
isp1760 usb: Use fallthrough pseudo-keyword 2020-07-10 08:55:17 +02:00
misc usb: misc: sisusbvga: Move static const tables out to different include file 2020-07-15 17:25:57 +02:00
mon USB: mon: Use scnprintf() for avoiding potential buffer overflow 2020-03-12 09:49:28 +01:00
mtu3 usb: mtu3: mtu3_trace: Supply missing mtu3_debug.h include file 2020-07-15 17:25:57 +02:00
musb USB: musb: Remove unused inline function 2020-07-15 16:48:10 +02:00
phy usb: phy: Replace HTTP links with HTTPS ones 2020-07-15 16:33:51 +02:00
renesas_usbhs usb: Use fallthrough pseudo-keyword 2020-07-10 08:55:17 +02:00
roles usb: roles: Switch on role-switch uevent reporting 2020-05-13 14:20:49 +02:00
serial Linux 5.8-rc6 2020-07-20 09:41:30 +02:00
storage USB: storage: replace HTTP links with HTTPS ones 2020-07-09 18:06:12 +02:00
typec usb: typec: intel_pmc_mux: Avoid connect request on disconnect 2020-07-21 13:38:21 +02:00
usbip usbip: Use fallthrough pseudo-keyword 2020-07-09 18:06:35 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile USB: Changes for v5.4 merge window 2019-09-02 19:20:57 +02:00
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00