linux/drivers/usb/typec
Adam Thomson ab69f61321 typec: tcpm: fusb302: Resolve out of order messaging events
The expectation in the FUSB302 driver is that a TX_SUCCESS event
should occur after a message has been sent, but before a GCRCSENT
event is raised to indicate successful receipt of a message from
the partner. However in some circumstances it is possible to see
the hardware raise a GCRCSENT event before a TX_SUCCESS event
is raised. The upshot of this is that the GCRCSENT handling portion
of code ends up reporting the GoodCRC message to TCPM because the
TX_SUCCESS event hasn't yet arrived to trigger a consumption of it.
When TX_SUCCESS is then raised by the chip it ends up consuming the
actual message that was meant for TCPM, and this incorrect sequence
results in a hard reset from TCPM.

To avoid this problem, this commit updates the message reading
code to check whether a GoodCRC message was received or not. Based
on this check it will either report that the previous transmission
has completed or it will pass the msg data to TCPM for futher
processing. This way the incorrect ordering of the events no longer
matters.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28 15:08:43 +01:00
..
fusb302 typec: tcpm: fusb302: Resolve out of order messaging events 2017-11-28 15:08:43 +01:00
ucsi USB/PHY patches for 4.15-rc1 2017-11-13 21:14:07 -08:00
Kconfig usb: typec: driver for TI TPS6598x USB Power Delivery controllers 2017-10-04 09:57:57 +02:00
Makefile USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
tcpm.c USB: typec: Remove remaining redundant license text 2017-11-07 15:53:48 +01:00
tps6598x.c USB: typec: Remove remaining redundant license text 2017-11-07 15:53:48 +01:00
typec_wcove.c USB: typec: Remove redundant license text 2017-11-07 15:45:01 +01:00
typec.c USB: typec: Remove redundant license text 2017-11-07 15:45:01 +01:00