CMD002: use writesize
PATCH 1/1 CMD002: use writesize
Hi,
the writev() in cmd002 implementation uses mtd->eccsize but it seems to really mean mtd->writesize (minimal write unit). Fix this.
P.S.: I actually do not really understand what mtd->eccsize mean. Nobody initializes it at all and it is 0, so the function should anyway be broken (?).
The patch is attached.
Signature · 2 lines
Best regards, Artem Bityutskiy (Битюцкий Артём)
Quoted 1 line
From
9dc396cd4e7dbb5e481e522b3e586f1f6ddbeb9eMon Sep 17 00:00:00 2001
From: Artem Bityutskiy <[email protected]>
Date: Mon, 29 Jan 2007 12:05:03 +0200
Subject: [PATCH] [MTD] CMD002: use writesize
The cfi_staa_write_buffers() uses mtd->eccsize but means mtd->writesize.
Signed-off-by Artem Bityutskiy <[email protected]>
--- drivers/mtd/chips/cfi_cmdset_0020.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/chips/cfi_cmdset_0020.c +1 -1
@@ -662,7 +662,7 @@ static int cfi_staa_write_buffers (struct mtd_info *mtd, loff_t to,* a small buffer for this. * XXX: If the buffer size is not a multiple of 2, this will break */ -#define ECCBUF_SIZE (mtd->eccsize) +#define ECCBUF_SIZE (mtd->writesize)#define ECCBUF_DIV (x) ((x) & ~(ECCBUF_SIZE - 1))#define ECCBUF_MOD (x) ((x) & (ECCBUF_SIZE - 1)) static int
Signature · 1 line
1.4.4.2