Re: [PATCH] spi: ch341: handle transfers without a TX or RX buffer
From: Weibin Liu
Date: Tue Oct 13 2026 - 01:45:49 EST
Hi Mark,
Thanks for the review.
> Are you sure the actual hardware supports half duplex and the fix isn't
> to set _MUST_RX and _MUST_TX?
It doesn't. The CH341A clocks data in both directions on every
transfer and has no mode to disable a direction; the 4-wire mode has
separate DIN/DOUT pins. So v2 sets SPI_CONTROLLER_MUST_TX |
SPI_CONTROLLER_MUST_RX in probe and drops the driver-side NULL
handling:
ctrl->flags = SPI_CONTROLLER_MUST_TX | SPI_CONTROLLER_MUST_RX;
Re-ran the gadgetfs + dummy_hcd emulation on top of v2: probe, tx-only,
rx-only and full-duplex transfers all still pass, no splats.
No other changes.
Weibin