On Mon, 17 Sep 2018 10:18:51 +0200 Boris Brezillon <boris.brezillon@xxxxxxxxxxx> wrote: > On Mon, 17 Sep 2018 11:10:18 +0300 > Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx> wrote: > > > After commit 4120f8d158ef ("mtd: spi-nor: Use the spi_mem_xx() API") > > there is no allocation for DMA-safe buffer when transmitting data bytes > > over SPI bus in m25p80 driver. > > > > JEDEC ID reading in spi_nor_read_id() has the buffer in stack. This is > > not safe with the m25p80 driver anymore after commit 4120f8d158ef if > > underlying SPI controller is using DMA for transfers. > > > > Therefore allocate a temporary DMA-safe buffer for JEDEC ID reading. > > > > Signed-off-by: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx> > > Oh, I forgot to mention that you should have Cc and Fixes tag here, to > make sure the patch gets backported to 4.18: > > Fixes: 4120f8d158ef ("mtd: spi-nor: Use the spi_mem_xx() API") > Cc: <stable@xxxxxxxxxxxxxxx> > > No need to send a new version, I can add them when applying. Hm, I just had a look at all ->read/write_reg() call sites and it seems we have the same problem in other places. Maybe it's just better to fix the problem in m25p80 ->read/write_reg() implems for now and see how we can fix that generically afterwards. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/