Re: [PATCH V2 08/12] spi/mxs: Fix race in setup method

2013-04-03 Thread Trent Piepho
On Tue, Apr 2, 2013 at 11:50 PM, Marek Vasut wrote: > Dear Trent Piepho, > >> On Apr 2, 2013 7:27 PM, "Marek Vasut" wrote: >> > > The only useful thing mxs_spi_setup_transfer() (which >> > > is no longer called) did in this instance was make that check. >> > > >> > > > btw. I was under the impres

Re: [PATCH V2 08/12] spi/mxs: Fix race in setup method

2013-04-02 Thread Marek Vasut
Dear Trent Piepho, > On Apr 2, 2013 7:27 PM, "Marek Vasut" wrote: > > > The only useful thing mxs_spi_setup_transfer() (which > > > is no longer called) did in this instance was make that check. > > > > > > > btw. I was under the impression the MXS SSP block can handle other > > > > word-widths

Re: [PATCH V2 08/12] spi/mxs: Fix race in setup method

2013-04-02 Thread Trent Piepho
On Apr 2, 2013 7:27 PM, "Marek Vasut" wrote: > > > The only useful thing mxs_spi_setup_transfer() (which > > is no longer called) did in this instance was make that check. > > > > > btw. I was under the impression the MXS SSP block can handle other > > > word-widths than 8 bit, no ? > > > > In the

Re: [PATCH V2 08/12] spi/mxs: Fix race in setup method

2013-04-02 Thread Marek Vasut
Dear Trent Piepho, > On Tue, Apr 2, 2013 at 4:31 PM, Marek Vasut wrote: > >> static int mxs_spi_setup(struct spi_device *dev) > >> { > >> > >> - int err = 0; > >> - > >> > >> if (!dev->bits_per_word) > >> > >> dev->bits_per_word = 8; > >> > >> if (d

Re: [PATCH V2 08/12] spi/mxs: Fix race in setup method

2013-04-02 Thread Trent Piepho
On Tue, Apr 2, 2013 at 4:31 PM, Marek Vasut wrote: >> static int mxs_spi_setup(struct spi_device *dev) >> { >> - int err = 0; >> - >> if (!dev->bits_per_word) >> dev->bits_per_word = 8; >> >> if (dev->mode & ~(SPI_CPOL | SPI_CPHA)) >> return -EINVAL; >

Re: [PATCH V2 08/12] spi/mxs: Fix race in setup method

2013-04-02 Thread Marek Vasut
Dear Trent Piepho, > Despite many warnings in the SPI documentation and code, the spi-mxs > driver sets shared chip registers in the ->setup method. This method can > be called when transfers are in progress on other slaves controlled by the > master. Setting registers or any other shared state

[PATCH V2 08/12] spi/mxs: Fix race in setup method

2013-04-02 Thread Trent Piepho
Despite many warnings in the SPI documentation and code, the spi-mxs driver sets shared chip registers in the ->setup method. This method can be called when transfers are in progress on other slaves controlled by the master. Setting registers or any other shared state will corrupt those transfers