Module Name:    src
Committed By:   matt
Date:           Thu Jul 12 03:05:01 UTC 2012

Modified Files:
        src/sys/dev/nand: nand.c

Log Message:
Deal with a spare size of 32.  XXX necc_offset is only a guess.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/nand/nand.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/nand/nand.c
diff -u src/sys/dev/nand/nand.c:1.16 src/sys/dev/nand/nand.c:1.17
--- src/sys/dev/nand/nand.c:1.16	Sun Aug 28 20:49:30 2011
+++ src/sys/dev/nand/nand.c	Thu Jul 12 03:05:01 2012
@@ -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 na
 	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 na
 		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;

Reply via email to