]> git.baikalelectronics.ru Git - kernel.git/commit
usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work
authorKyle Tso <kyletso@google.com>
Fri, 7 May 2021 06:22:59 +0000 (14:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 May 2021 13:52:06 +0000 (15:52 +0200)
commit5b628c607c25bed1b0d8df89f6e83e50ad79959f
tree525016440edfb9a52f45e58e4427d400984fda16
parentb7f07717d1a8fcb167834f6af54d71b595fa06ea
usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work

In current design, DISCOVER_IDENTITY is queued to VDM state machine
immediately in Ready states and never retries if it fails in the AMS.
Move the process to a delayed work so that when it fails for some
reasons (e.g. Sink Tx No Go), it can be retried by queueing the work
again. Also fix a problem that the vdm_state is not set to a proper
state if it is blocked by Collision Avoidance mechanism.

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/20210507062300.1945009-2-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c