summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorWeibin Liu <liuwb@xiaopeng.com>2026-10-13 13:43:39 +0800
committerMark Brown <broonie@kernel.org>2026-10-18 13:14:34 +0100
commit84182c48999f856c3865e4a537c244f9569c9f6c (patch)
tree816bf1edd5218c0c16afad8bf8729b3b0585eae4 /tools/perf/scripts/python
parent6c59290d62e7dac745a2cbf6a40d2e1f8dedb73f (diff)
spi: ch341: handle transfers without a TX or RX buffer
ch341_transfer_one() unconditionally copies from trans->tx_buf into the TX packet and hands trans->rx_buf to usb_bulk_msg() for the readback. The SPI core allows half-duplex transfers where either of the buffers is NULL, so a transfer without TX data crashes the kernel on the memcpy and a transfer without RX data makes usb_bulk_msg() store the received data at address 0. The CH341A clocks data in both directions on every transfer; there is no mode to disable a direction. Set SPI_CONTROLLER_MUST_TX and SPI_CONTROLLER_MUST_RX so the SPI core fills in dummy buffers for half-duplex transfers. Fixes: 8846739f52af ("spi: add ch341a usb2spi driver") Cc: stable@vger.kernel.org # 6.11+ Signed-off-by: Weibin Liu <liuwb@xiaopeng.com> Link: https://patch.msgid.link/20261013054339.77477-1-liuwb@xiaopeng.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions