mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
If a partner port sends a packet at approximately the same time as we send a packet, we may end up with the initial packet followed by the GOOD_CRC reply in our HW FIFO. Don't automatically discard the first packet in the FIFO. Instead, discard the packet only if it's a GOOD_CRC packet. And, modify our get_message function to automatically discard GOOD_CRC in search of a meaningful packet. In addition, due to interrupt latency, we can't rely on receiving one interrupt per incoming packet. If our Rx FIFO is non-empty, assume that it contains at least one packet. BUG=chrome-os-partner:60242 BRANCH=gru TEST=Manual on kevin, attach Apple dongle with no inputs. Attach zinger, verify we negotiate to ~20V. Repeat 10x and verify negotiation is successful each time. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: I7e4430fc2b7ed44b1aa4b561d72c8e1e964b245a Reviewed-on: https://chromium-review.googlesource.com/414927 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> (cherry picked from commit 373f5dfd75e8ea5074d26fc6392eafe83de4f905) Reviewed-on: https://chromium-review.googlesource.com/419186 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>