Re: [PATCH] can: mcp251x: convert to half-duplex SPI

From: Tim Harvey
Date: Tue Feb 25 2020 - 17:25:54 EST


On Tue, Feb 25, 2020 at 1:43 PM Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote:
>
> On 2/25/20 7:35 PM, Tim Harvey wrote:
> > Some SPI host controllers such as the Cavium Thunder do not support
> > full-duplex SPI. Using half-duplex transfers allows the driver to work
> > with those host controllers.
>
> There are several transfers left in the driver, where both rx_buf and
> tx_buf are set. How does your host controller driver know which one to
> handle?
>

Marc,

Your right... there is the mcp251x_hw_rx_frame() call that also uses
spi_rx_buf after a synchronous transfer (I didn't see any others).
I'll look at this again.

In general is it an ok approach to switch the driver to half-duplex
for this issue without the need of complicating things with a
module/dt param?

Regards,

Tim