RE: [PATCH] mtd: spi-nor: honour max_data_size for spi-nor writes

2018-06-12 Thread Yogesh Narayan Gaur
Wolfe ; Han Xu ; feste...@gmail.com; marek.va...@gmail.com; Prabhakar Kushwaha ; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; NeilBrown Subject: Re: [PATCH] mtd: spi-nor: honour max_data_size for spi-nor writes Hi Yogesh, Unrelated note: no need to send your patches to both

Re: [PATCH] mtd: spi-nor: honour max_data_size for spi-nor writes

2018-06-12 Thread Boris Brezillon
On Wed, 13 Jun 2018 08:24:26 +1000 NeilBrown wrote: > On Tue, Jun 12 2018, Boris Brezillon wrote: > > > > > Just because you managed to solve the problem in one driver does not > > mean the problem does not exist for others. I read this datasheet [1] > > several times and couldn't find a way to

Re: [PATCH] mtd: spi-nor: honour max_data_size for spi-nor writes

2018-06-12 Thread NeilBrown
On Tue, Jun 12 2018, Boris Brezillon wrote: > > Just because you managed to solve the problem in one driver does not > mean the problem does not exist for others. I read this datasheet [1] > several times and couldn't find a way to say 'I want to keep the CS > asserted between 2 transactions', so

Re: [PATCH] mtd: spi-nor: honour max_data_size for spi-nor writes

2018-06-12 Thread Boris Brezillon
Hi Neil, On Tue, 12 Jun 2018 08:05:13 +1000 NeilBrown wrote: > On Mon, Jun 11 2018, Boris Brezillon wrote: > > > > Also, I'd prefer to have this patch split in 2: > > 1/ one patch removing the check in spi_nor_write() > > 2/ and the second patch removing the while() loop in m25p80_write() > > >

Re: [PATCH] mtd: spi-nor: honour max_data_size for spi-nor writes

2018-06-11 Thread NeilBrown
On Mon, Jun 11 2018, Boris Brezillon wrote: > > Also, I'd prefer to have this patch split in 2: > 1/ one patch removing the check in spi_nor_write() > 2/ and the second patch removing the while() loop in m25p80_write() > > How about the following commit messages for those 2 patches: > > 1: > " > mt

Re: [PATCH] mtd: spi-nor: honour max_data_size for spi-nor writes

2018-06-11 Thread Boris Brezillon
Hi Yogesh, Unrelated note: no need to send your patches to both boris.brezi...@free-electrons.com and boris.brezi...@bootlin.com, just use the latter. On Mon, 11 Jun 2018 14:48:14 +0530 Yogesh Gaur wrote: > Honour max_data_size for spi-nor writes ^ This is no longer relevant. > In new spi-mem

[PATCH] mtd: spi-nor: honour max_data_size for spi-nor writes

2018-06-11 Thread Yogesh Gaur
Honour max_data_size for spi-nor writes In new spi-mem framework, data size to be written is being calculated using spi_mem_adjust_op_size(). This can return value less than nor->page_size. Add check value of data size return from API spi_mem_adjust_op_size() with the actual requested data size an

[PATCH] mtd: spi-nor: honour max_data_size for spi-nor writes

2018-06-11 Thread Yogesh Gaur
Honour max_data_size for spi-nor writes In new spi-mem framework, data size to be written is being calculated using spi_mem_adjust_op_size(). This can return value less than nor->page_size. Add check value of data size return from API spi_mem_adjust_op_size() with the actual requested data size an