Re: [PATCH] spi: spi-bcm2835.c: Fix 3-wire mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 01, 2019 at 02:21:21PM +0000, Sa, Nuno wrote:
> On Mon, 2019-07-01 at 13:55 +0200, Lukas Wunner wrote:
> > I see.  In that case, try:
> > 
> >  	/* handle all the 3-wire mode */
> > -	if ((spi->mode & SPI_3WIRE) && (tfr->rx_buf))
> > +	if ((spi->mode & SPI_3WIRE) && (tfr->rx_buf != ctlr->dummy_rx))
> >  		cs |= BCM2835_SPI_CS_REN;
> >  	else
> >  		cs &= ~BCM2835_SPI_CS_REN;
> 
> This worked fine. Also, I did a quick backport of the state of your
> driver's (both spi-bcm2835 and bcm2835-dma) in revpi_staging and it
> also worked fine with my device.
> So, as far as I understand, the above suggestion (or my patch) is not
> intended to be upstreamed, right? It is just a temporary fix that I can
> use while your patchset gets upstream.

Thanks for testing.  I've just submitted the above as a fix for 5.3.
(Actually with a small change, the check for (tfr->rx_buf) needs to
be preserved in case DMA is disabled.)

The patch can be backported to 5.2 and older stable kernels if "ctlr"
is replaced by "master", we can inform Greg about that once the patch
lands in Linus' tree.  And I've amended my patch set to revert this
patch when dropping MUST_RX.

Thanks,

Lukas



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux