Skip to content

Commit dfeae10

Browse files
tokunoriBoris Brezillon
authored andcommitted
mtd: cfi_cmdset_0002: Change write buffer to check correct value
For the word write it is checked if the chip has the correct value. But it is not checked for the write buffer as only checked if ready. To make sure for the write buffer change to check the value. It is enough as this patch is only checking the last written word. Since it is described by data sheets to check the operation status. Signed-off-by: Tokunori Ikegami <ikegami@allied-telesis.co.jp> Reviewed-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz> Cc: Brian Norris <computersforpeace@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Richard Weinberger <richard@nod.at> Cc: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr> Cc: linux-mtd@lists.infradead.org Cc: stable@vger.kernel.org Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
1 parent 34c8190 commit dfeae10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/chips/cfi_cmdset_0002.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1879,7 +1879,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
18791879
if (time_after(jiffies, timeo) && !chip_ready(map, adr))
18801880
break;
18811881

1882-
if (chip_ready(map, adr)) {
1882+
if (chip_good(map, adr, datum)) {
18831883
xip_enable(map, chip, adr);
18841884
goto op_done;
18851885
}

0 commit comments

Comments
 (0)