Patchwork [oselas] Mini2440 boot failure on kernel 3.7-rc1

login
register
mail settings
Submitter Brian Norris
Date Nov. 14, 2012, 8:26 a.m.
Message ID <50A355D2.6080406@gmail.com>
Download mbox | patch
Permalink /patch/198833/
State Accepted
Commit 6924d99fcdf1a688538a3cdebd1f135c22eec191
Headers show

Comments

Brian Norris - Nov. 14, 2012, 8:26 a.m.
On 11/13/2012 01:29 PM, Sylwester Nawrocki wrote:
> On 11/13/2012 08:54 AM, Brian Norris wrote:
>> On Mon, Nov 12, 2012 at 3:18 PM, Sylwester Nawrocki
>> Can you please list a full 8-byte string of id_data[]? This will be
>> very helpful. I know of at least one solution that will fix your
>> problem, but I need to know your full ID to help lay this issue to
>> rest for good.
> 
> Indeed, I wish there was good hardware documentation, still it seems
> an exception rather than a rule for some hardware vendors...
> 
> Here is my id_data[] dump:
> 
> ec, f1, 00, 95, 40, ec, ec, f1
> 
> Looks a bit strange, I hope you know how to handle this. :)

Well, sort of. I could add yet another quirk: that some "5-byte" IDs
have the manufacturer ID repeated twice (0xEC 0xEC). In fact, I just got
another report of a similar (stupid) ID.

But I have a more reasonable change. It's disappointing, but I'll have to
do a partial revert of my previous commits, dropping support for some of
the newest SLC in favor of not breaking the old. I'll have to try to get
in contact with Samsung if I'm ever going to support the newest stuff.

Please try my diff (below), on top of the patch from:

http://lists.infradead.org/pipermail/linux-mtd/2012-October/044356.html

> OK. BTW, is this comment in drivers/mtd/nand_base.c
> 
> /*
>   * nand_id_has_period - Check if an ID string has a given wraparound 
> period
>   ...
>   * specific repetition interval period (e.g., {0x20,0x01,0x7F,0x20} has a
>   * period of 2). This is a helper function for nand_id_len(). Returns 
> non-zero
>   ...
> 
> correct ? Shouldn't it be "has a period of 3" ? Since there are 3 different
> values and then it repeats starting with 0x20 ?

Yes, good eye. I also noticed my typo when re-reviewing this code just now. I'll fix this for the 3.8 cycle.

Brian

---
 drivers/mtd/nand/nand_base.c |    1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index d5ece6e..1a03b7f 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2990,6 +2990,7 @@  static void nand_decode_ext_id(struct mtd_info *mtd, struct nand_chip *chip,
 	 * ID to decide what to do.
 	 */
 	if (id_len == 6 && id_data[0] == NAND_MFR_SAMSUNG &&
+			(chip->cellinfo & NAND_CI_CELLTYPE_MSK) &&
 			id_data[5] != 0x00) {
 		/* Calc pagesize */
 		mtd->writesize = 2048 << (extid & 0x03);