[PATCH] mtd: devices: fix mchp23k256 read and write

Miquel Raynal miquel.raynal at bootlin.com
Tue Nov 5 15:39:10 PST 2019


Hi Andrew,

Andrew Lunn <andrew at lunn.ch> wrote on Wed, 6 Nov 2019 00:17:09 +0100:

> On Tue, Nov 05, 2019 at 07:41:22PM +0100, Miquel Raynal wrote:
> > Hi Angelo,
> > 
> > + Andrew
> > 
> > Angelo Dureghello <angelo.dureghello at timesys.com> wrote on Wed, 30 Oct
> > 2019 12:39:57 +0100:
> > 
> > > Due to the use of sizeof(), command size set for the spi transfer
> > > was wrong. Driver was sending and receiving always 1 byte less
> > > and especially on write, it was hanging.
> > > 
> > > echo -n -e "\\x1\\x2\\x3\\x4" > /dev/mtd1
> > > 
> > > And read part too now works as expected.
> > > 
> > > hexdump -C -n16 /dev/mtd1
> > > 00000000  01 02 03 04 ab f3 ad c2  ab e3 f4 36 dd 38 04 15
> > > 00000010
> > > 
> > 
> > Looks fine by me, just added Andrew in case he wants to review the
> > patch as he was the original committer.
> > 
> > Anyway you're missing a Cc: stable and Fixes tag on
> > 5dc17fa6fb70 ("mtd: mchp23k256: Add driver for this SPI SRAM device")
> 
> Hi Miquèl
> 
> This is the wrong fixes tag. The correct one is
> 
> Fixes: 4379075a870b ("mtd: mchp23k256: Add support for mchp23lcv1024")

Oh crap, you're right, thanks for the correction!

> 
> Reviewed-by: Andrew Lunn <andrew at lunn.ch>
> 
>     Andrew

Thanks,
Miquèl



More information about the linux-mtd mailing list