aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/function/u_audio.c
diff options
context:
space:
mode:
authorKyle Tso <kyletso@google.com>2021-08-26 20:42:01 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-26 14:59:04 +0200
commitef52b4a9fcc24e17e81cc60357e6107ae4e9c48e (patch)
treeb285f7c32c53726b6d033b2d8a3e81b6a006358e /drivers/usb/gadget/function/u_audio.c
parentusb: renesas-xhci: Prefer firmware loading on unknown ROM state (diff)
downloadlinux-dev-ef52b4a9fcc24e17e81cc60357e6107ae4e9c48e.tar.xz
linux-dev-ef52b4a9fcc24e17e81cc60357e6107ae4e9c48e.zip
usb: typec: tcpm: Raise vdm_sm_running flag only when VDM SM is running
If the port is going to send Discover_Identity Message, vdm_sm_running flag was intentionally set before entering Ready States in order to avoid the conflict because the port and the port partner might start AMS at almost the same time after entering Ready States. However, the original design has a problem. When the port is doing DR_SWAP from Device to Host, it raises the flag. Later in the tcpm_send_discover_work, the flag blocks the procedure of sending the Discover_Identity and it might never be cleared until disconnection. Since there exists another flag send_discover representing that the port is going to send Discover_Identity or not, it is enough to use that flag to prevent the conflict. Also change the timing of the set/clear of vdm_sm_running to indicate whether the VDM SM is actually running or not. Fixes: c34e85fa69b9 ("usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work") Cc: stable <stable@vger.kernel.org> Cc: Badhri Jagan Sridharan <badhri@google.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Kyle Tso <kyletso@google.com> Link: https://lore.kernel.org/r/20210826124201.1562502-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/function/u_audio.c')
0 files changed, 0 insertions, 0 deletions