Fix a bug in the Aspeed SPI driver to support full-duplex operations. - #603
Open
chander-nexthop wants to merge 1 commit into
Open
Fix a bug in the Aspeed SPI driver to support full-duplex operations.#603chander-nexthop wants to merge 1 commit into
chander-nexthop wants to merge 1 commit into
Conversation
tx_buf == rx_buf, and otherwise issued a separate post-transfer ioread8_rep burst that returns zeros. spidev always hands the driver distinct tx/rx bounce buffers, so userspace SPI_IOC_MESSAGE full-duplex reads (e.g. the FPGA register bridge) always read back zeros. Add patches-sonic/aspeed-spi-txrx-fix-full-duplex-capture.patch to capture RX during the TX loop whenever an rx buffer is present and restrict the separate read burst to pure reads, and register it in the series after aspeed-ast2700-support.patch. Behaviour is unchanged for write-only, read-only, and shared-buffer full-duplex (e.g. the TPM) transfers. Signed-off-by: Chandrasekaran Swaminathan <chander@nexthop.ai>
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The aspeed-txrx controller only latched MISO during its TX loop when tx_buf == rx_buf, and otherwise issued a separate post-transfer ioread8_rep burst that returns zeros. spidev always hands the driver distinct tx/rx bounce buffers, so userspace SPI_IOC_MESSAGE full-duplex reads (e.g. the FPGA register bridge) always read back zeros.
Add patches-sonic/aspeed-spi-txrx-fix-full-duplex-capture.patch to capture RX during the TX loop whenever an rx buffer is present and restrict the separate read burst to pure reads, and register it in the series after aspeed-ast2700-support.patch. Behaviour is unchanged for write-only, read-only, and shared-buffer full-duplex (e.g. the TPM) transfers.
We have given this patch to Aspeed too and they have agreed to take it in their repository in a future release. Till that happens we will need this patch.