aboutsummaryrefslogtreecommitdiff
path: root/scripts/const_structs.checkpatch
diff options
context:
space:
mode:
authorPrashant Malani <[email protected]>2020-07-08 17:24:41 -0700
committerGreg Kroah-Hartman <[email protected]>2020-07-21 13:38:21 +0200
commit658027afeab3070681bda5152eb9681c7731bcc8 (patch)
tree0bf1a9e3bdda212a4b80b11667b3fd8526d4a5d4 /scripts/const_structs.checkpatch
parentb1b6bed3b5036509b449b5965285d5057ba42527 (diff)
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 <[email protected]> Cc: Heikki Krogerus <[email protected]> Cc: Rajmohan Mani <[email protected]> Fixes: f3c1c41ebc67 ("usb: typec: intel_pmc_mux: Add support for USB4") Signed-off-by: Prashant Malani <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions