usb: pd: Keep separate counters for tx/rx msgid
Now that SOP' communication is supported for cable discovery,
this can cause an error when connected to a PD sink via an
e-marked cable. First the SOP' VDM response would be received
and whose msg_id would be cached. Then when the sink sends its
Request message its msg_id would likely also be initially 0
which is treated as a false duplicate and get discarded.
According to USB PD 3.0 Spec Section 6.7.1 MessageID Counter,
"A Port which communicates using SOP* Packets Shall maintain
copies of the last MessageID for each type of SOP* it uses."
Thus, keep the counters separated per SOP type. Though SOP'' is
not currently used, reserve the entry for future use.
Change-Id: I6dd50371bfc20f92af2709b78a00adbeeb954cc5
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment