]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: fix Samsung SLC detection regression
authorBrian Norris <computersforpeace@gmail.com>
Thu, 15 Nov 2012 05:46:30 +0000 (21:46 -0800)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thu, 15 Nov 2012 13:37:43 +0000 (15:37 +0200)
commit056cffdceeb101af8aa7ddcafb5170669b010bf4
tree657dcfef2b4691610a44ac7c4e821b6e6048e5fb
parent0d3de8487871218ceed3604987451a8c823d46c3
mtd: nand: fix Samsung SLC detection regression

This patch fixes errors seen in identifying old Samsung SLC, due to the
following commits:

    commit c8e5ca94a77377968f7b5f263a052e8bf5219e64
    mtd: nand: detect Samsung K9GBG08U0A, K9GAG08U0F ID

    commit f488c1367bb3d857fbcb54c31002d95c82871bc2
    mtd: nand: add generic READ ID length calculation functions

Some Samsung NAND with "5-byte" ID really appear to have 6-byte IDs, with
wraparound like:

  Samsung K9K8G08U0D
  ec d3 51 95 58 ec ec d3

  Samsung K9F1G08U0C
  ec f1 00 95 40 ec ec f1

  Samsung K9F2G08U0B
  ec da 10 95 44 00 ec da

This bad wraparound makes it hard to reliably detect the difference
between Samsung SLC with 5-byte ID and Samsung SLC with 6-byte ID.

The fix is to, for now, only use the new Samsung table for MLC. We
cannot support the new SLC (K9FAG08U0M) until Samsung gives better ID
decode information.

Note that this applies in addition to the previous regression fix:

    commit 3b3471b69b43eb7a99b68292a10209b84dc622f5
    mtd: nand: fix Samsung SLC NAND identification regression

Together, these patches completely restore the previous detection
behavior so that we cannot see any more regressions in Samsung SLC NAND
(finger crossed). With luck, I can get a hold of a Samsung
representative and stop having to cross my fingers eventually.

Reported-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/nand/nand_base.c