Re: [PATCH] mtd: spi-nor: fix DMA unsafe buffer issue in spi_nor_read_sfdp()

2017-09-19 Thread Boris Brezillon
On Wed, 6 Sep 2017 23:45:02 +0200 Cyrille Pitchen wrote: > spi_nor_read_sfdp() calls nor->read() to read the SFDP data. > When the m25p80 driver is used (pretty common case), nor->read() is then > implemented by the m25p80_read() function, which is likely to initialize a > 'struct spi_transfer'

Re: [PATCH] mtd: spi-nor: fix DMA unsafe buffer issue in spi_nor_read_sfdp()

2017-09-10 Thread Boris Brezillon
On Thu, 7 Sep 2017 10:00:50 +0200 Geert Uytterhoeven wrote: > Hi Cyrille, > > On Wed, Sep 6, 2017 at 11:45 PM, Cyrille Pitchen > wrote: > > spi_nor_read_sfdp() calls nor->read() to read the SFDP data. > > When the m25p80 driver is used (pretty common case), nor->read() is then > > implemented b

Re: [PATCH] mtd: spi-nor: fix DMA unsafe buffer issue in spi_nor_read_sfdp()

2017-09-07 Thread Geert Uytterhoeven
Hi Boris, On Thu, Sep 7, 2017 at 1:37 PM, Boris Brezillon wrote: > On Thu, 7 Sep 2017 10:00:50 +0200 > Geert Uytterhoeven wrote: >> Instead of having buffers on the stack, passing them around through multiple >> call levels, and then kmalloc()ing a buffer, what about using the helpers in >> ins

Re: [PATCH] mtd: spi-nor: fix DMA unsafe buffer issue in spi_nor_read_sfdp()

2017-09-07 Thread Boris Brezillon
On Thu, 7 Sep 2017 10:00:50 +0200 Geert Uytterhoeven wrote: > Hi Cyrille, > > On Wed, Sep 6, 2017 at 11:45 PM, Cyrille Pitchen > wrote: > > spi_nor_read_sfdp() calls nor->read() to read the SFDP data. > > When the m25p80 driver is used (pretty common case), nor->read() is then > > implemented b

Re: [PATCH] mtd: spi-nor: fix DMA unsafe buffer issue in spi_nor_read_sfdp()

2017-09-07 Thread Geert Uytterhoeven
Hi Cyrille, On Wed, Sep 6, 2017 at 11:45 PM, Cyrille Pitchen wrote: > spi_nor_read_sfdp() calls nor->read() to read the SFDP data. > When the m25p80 driver is used (pretty common case), nor->read() is then > implemented by the m25p80_read() function, which is likely to initialize a > 'struct spi_

Re: [PATCH] mtd: spi-nor: fix DMA unsafe buffer issue in spi_nor_read_sfdp()

2017-09-07 Thread Boris Brezillon
On Thu, 7 Sep 2017 00:50:12 +0200 Cyrille Pitchen wrote: > Le 06/09/2017 à 23:45, Cyrille Pitchen a écrit : > > spi_nor_read_sfdp() calls nor->read() to read the SFDP data. > > When the m25p80 driver is used (pretty common case), nor->read() is then > > implemented by the m25p80_read() function,

Re: [PATCH] mtd: spi-nor: fix DMA unsafe buffer issue in spi_nor_read_sfdp()

2017-09-07 Thread Boris Brezillon
On Wed, 6 Sep 2017 23:45:02 +0200 Cyrille Pitchen wrote: > spi_nor_read_sfdp() calls nor->read() to read the SFDP data. > When the m25p80 driver is used (pretty common case), nor->read() is then > implemented by the m25p80_read() function, which is likely to initialize a > 'struct spi_transfer'

[PATCH] mtd: spi-nor: fix DMA unsafe buffer issue in spi_nor_read_sfdp()

2017-09-06 Thread Cyrille Pitchen
spi_nor_read_sfdp() calls nor->read() to read the SFDP data. When the m25p80 driver is used (pretty common case), nor->read() is then implemented by the m25p80_read() function, which is likely to initialize a 'struct spi_transfer' from its buf argument before appending this structure inside the 'st

Re: [PATCH] mtd: spi-nor: fix DMA unsafe buffer issue in spi_nor_read_sfdp()

2017-09-06 Thread Cyrille Pitchen
Le 06/09/2017 à 23:45, Cyrille Pitchen a écrit : > spi_nor_read_sfdp() calls nor->read() to read the SFDP data. > When the m25p80 driver is used (pretty common case), nor->read() is then > implemented by the m25p80_read() function, which is likely to initialize a > 'struct spi_transfer' from its bu