summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormatt <matt@NetBSD.org>2012-07-12 03:05:01 +0000
committermatt <matt@NetBSD.org>2012-07-12 03:05:01 +0000
commitd5e682e5d272ccb7bd4b02f1ce7f31475ccaf37a (patch)
tree4276212023b4eed7d5fa346e600b437d1a410c55 /sys/dev
parent943e7b71cf9cc1e06e874b156f562d593f937e9f (diff)
Deal with a spare size of 32. XXX necc_offset is only a guess.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/nand/nand.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/nand/nand.c b/sys/dev/nand/nand.c
index 9175024d6f1..e13b49b655a 100644
--- a/sys/dev/nand/nand.c
+++ b/sys/dev/nand/nand.c
@@ -1,4 +1,4 @@
-/* $NetBSD: nand.c,v 1.16 2011/08/28 20:49:30 martin Exp $ */
+/* $NetBSD: nand.c,v 1.17 2012/07/12 03:05:01 matt Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@@ -34,7 +34,7 @@
/* Common driver for NAND chips implementing the ONFI 2.2 specification */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nand.c,v 1.16 2011/08/28 20:49:30 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nand.c,v 1.17 2012/07/12 03:05:01 matt Exp $");
#include "locators.h"
@@ -429,6 +429,9 @@ nand_scan_media(device_t self, struct nand_chip *chip)
case 16:
ecc->necc_offset = 0;
break;
+ case 32:
+ ecc->necc_offset = 0;
+ break;
case 64:
ecc->necc_offset = 40;
break;
@@ -436,7 +439,7 @@ nand_scan_media(device_t self, struct nand_chip *chip)
ecc->necc_offset = 80;
break;
default:
- panic("OOB size is unexpected");
+ panic("OOB size %zu is unexpected", chip->nc_spare_size);
}
ecc->necc_steps = chip->nc_page_size / ecc->necc_block_size;