Skip to content
Commit 14f89e08 authored by Angelo Dureghello's avatar Angelo Dureghello Committed by Miquel Raynal
Browse files

mtd: devices: fix mchp23k256 read and write

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

Fixes: 4379075a

 ("mtd: mchp23k256: Add support for mchp23lcv1024")
Signed-off-by: default avatarAngelo Dureghello <angelo.dureghello@timesys.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent c2d73ba8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment