usb: typec: tcpm: Correct the responses in SVDM Version 2.0 DFP
authorKyle Tso <kyletso@google.com>
Tue, 1 Jun 2021 12:31:48 +0000 (20:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Jun 2021 09:43:01 +0000 (11:43 +0200)
commitf41bfc7e9c7c1d721c8752f1853cde43e606ad43
tree5a8adf75ac7f59d0ebf86a4e9c5eb61a21a36dc8
parent8f11fe7e40683f8986aff8f1a46361ceca8f42ec
usb: typec: tcpm: Correct the responses in SVDM Version 2.0 DFP

In USB PD Spec Rev 3.1 Ver 1.0, section "6.12.5 Applicability of
Structured VDM Commands", DFP is allowed and recommended to respond to
Discovery Identity with ACK. And in section "6.4.4.2.5.1 Commands other
than Attention", NAK should be returned only when receiving Messages
with invalid fields, Messages in wrong situation, or unrecognize
Messages.

Still keep the original design for SVDM Version 1.0 for backward
compatibilities.

Fixes: 193a68011fdc ("staging: typec: tcpm: Respond to Discover Identity commands")
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Kyle Tso <kyletso@google.com>
Link: https://lore.kernel.org/r/20210601123151.3441914-2-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c