Message ID | 1453790537-20566-1-git-send-email-boris.brezillon@free-electrons.com |
---|---|
State | Not Applicable |
Headers | show |
On Tue, Jan 26, 2016 at 07:42:16AM +0100, Boris Brezillon wrote: > From: Boris BREZILLON <boris.brezillon@free-electrons.com> > > This remove OOB info retrieval, which is not used anywhere else in the code > and can generate errors when called on newer NAND that have more than 32 > bytes of ECC or 16 bytes available for user usage in the OOB area. > > Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> > --- > src/mtd.c | 8 -------- > src/mtd.h | 1 - > 2 files changed, 9 deletions(-) What source are you trying to patch? Doesn't look like Linux or mtd-utils.
No, it's a user-space tool named kobs-ng. On Tue, Jan 26, 2016 at 1:59 PM, Brian Norris <computersforpeace@gmail.com> wrote: > On Tue, Jan 26, 2016 at 07:42:16AM +0100, Boris Brezillon wrote: >> From: Boris BREZILLON <boris.brezillon@free-electrons.com> >> >> This remove OOB info retrieval, which is not used anywhere else in the code >> and can generate errors when called on newer NAND that have more than 32 >> bytes of ECC or 16 bytes available for user usage in the OOB area. >> >> Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> >> --- >> src/mtd.c | 8 -------- >> src/mtd.h | 1 - >> 2 files changed, 9 deletions(-) > > What source are you trying to patch? Doesn't look like Linux or > mtd-utils.
On Tue, 26 Jan 2016 11:59:41 -0800 Brian Norris <computersforpeace@gmail.com> wrote: > On Tue, Jan 26, 2016 at 07:42:16AM +0100, Boris Brezillon wrote: > > From: Boris BREZILLON <boris.brezillon@free-electrons.com> > > > > This remove OOB info retrieval, which is not used anywhere else in the code > > and can generate errors when called on newer NAND that have more than 32 > > bytes of ECC or 16 bytes available for user usage in the OOB area. > > > > Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> > > --- > > src/mtd.c | 8 -------- > > src/mtd.h | 1 - > > 2 files changed, 9 deletions(-) > > What source are you trying to patch? Doesn't look like Linux or > mtd-utils. Nope, those patches apply on the kobs-ng project (BTW, didn't find any git repo hosting this project). I realize I shouldn't send those patches to the MTD ML (I just kept the @ Han Xu sent his request to, including the ML). Sorry for the inconvenience.
diff --git a/src/mtd.c b/src/mtd.c index 02af33b..cf8428a 100644 --- a/src/mtd.c +++ b/src/mtd.c @@ -700,14 +700,6 @@ struct mtd_data *mtd_open(const struct mtd_config *cfg, int flags) goto out; } - /* keep original oobinfo */ - r = ioctl(mp->fd, MEMGETOOBSEL, &mp->old_oobinfo); - if (r != 0) { - fprintf(stderr, "mtd: device %s can't ioctl MEMGETOOBSEL: %d\n", - mp->name, r); - goto out; - } - /* get info about the mtd device (partition) */ r = ioctl(mp->fd, MEMGETINFO, miu); if (r != 0) { diff --git a/src/mtd.h b/src/mtd.h index 99d7887..946a49c 100644 --- a/src/mtd.h +++ b/src/mtd.h @@ -112,7 +112,6 @@ struct mtd_part { int nrbad; int oobinfochanged; - struct nand_oobinfo old_oobinfo; int ecc; };