lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun,  8 Jul 2018 14:29:24 +0300
From:   Sergey Larin <cerg2010cerg2010@...l.ru>
To:     unlisted-recipients:; (no To-header on input)
Cc:     boris.brezillon@...tlin.com, miquel.raynal@...tlin.com,
        richard@....at, dwmw2@...radead.org, computersforpeace@...il.com,
        marek.vasut@...il.com, linux-mtd@...ts.infradead.org,
        linux-kernel@...r.kernel.org,
        Sergey Larin <cerg2010cerg2010@...l.ru>
Subject: [PATCH 2/2] mtd: rawnand: docg4: specify bits_per_cell

This fixes WARN() in nand_is_slc().

DoC G4 is 2-bit MLC, so set bits_per_cell value according to this.

Signed-off-by: Sergey Larin <cerg2010cerg2010@...l.ru>
---
 drivers/mtd/nand/raw/docg4.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/raw/docg4.c b/drivers/mtd/nand/raw/docg4.c
index bbed8ea7858c..82d97a16e246 100644
--- a/drivers/mtd/nand/raw/docg4.c
+++ b/drivers/mtd/nand/raw/docg4.c
@@ -1250,6 +1250,7 @@ static void __init init_mtd_structs(struct mtd_info *mtd)
 	nand->pagemask = 0x3ffff;
 	nand->badblockpos = NAND_LARGE_BADBLOCK_POS;
 	nand->badblockbits = 8;
+	nand->bits_per_cell = 2;
 	nand->ecc.mode = NAND_ECC_HW_SYNDROME;
 	nand->ecc.size = DOCG4_PAGE_SIZE;
 	nand->ecc.prepad = 8;
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ