[kernel] r13459 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Martin Michlmayr
tbm at alioth.debian.org
Mon Apr 20 19:11:01 UTC 2009
Author: tbm
Date: Mon Apr 20 19:10:59 2009
New Revision: 13459
Log:
Extend erase timeout in M25P80 SPI Flash driver
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/extend-erase-timeout-spi-flash.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/4
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Mon Apr 20 17:21:54 2009 (r13458)
+++ dists/sid/linux-2.6/debian/changelog Mon Apr 20 19:10:59 2009 (r13459)
@@ -1,8 +1,12 @@
linux-2.6 (2.6.29-4) UNRELEASED; urgency=low
+ [ maximilian attems ]
* drm/i915: allow tiled front buffers on 965+.
* [parisc] Disable BTRFS.
+ [ Martin Michlmayr ]
+ * Extend erase timeout in M25P80 SPI Flash driver (Peter Horton).
+
-- maximilian attems <maks at debian.org> Fri, 17 Apr 2009 11:30:55 +0200
linux-2.6 (2.6.29-3) unstable; urgency=low
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/extend-erase-timeout-spi-flash.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/extend-erase-timeout-spi-flash.patch Mon Apr 20 19:10:59 2009 (r13459)
@@ -0,0 +1,54 @@
+Extend erase timeout in M25P80 SPI Flash driver.
+
+The M25P80 drivers fails erasing sectors on a M25P128 because the ready
+wait timeout is too short. Change the timeout from a simple loop count to a
+suitable number of seconds.
+
+Signed-off-by: Peter Horton <zero at colonel-panic.org>
+---
+Index: linux-2.6.29-git12/drivers/mtd/devices/m25p80.c
+===================================================================
+--- linux-2.6.29-git12.orig/drivers/mtd/devices/m25p80.c 2009-04-12 21:41:16.000000000 +0000
++++ linux-2.6.29-git12/drivers/mtd/devices/m25p80.c 2009-04-12 21:43:01.000000000 +0000
+@@ -54,7 +54,7 @@
+ #define SR_SRWD 0x80 /* SR write protect */
+
+ /* Define max times to check status register before we give up. */
+-#define MAX_READY_WAIT_COUNT 100000
++#define MAX_READY_WAIT_JIFFIES (10 * HZ) /* eg. M25P128 specs 6s max sector erase */
+ #define CMD_SIZE 4
+
+ #ifdef CONFIG_M25PXX_USE_FAST_READ
+@@ -145,20 +145,20 @@
+ */
+ static int wait_till_ready(struct m25p *flash)
+ {
+- int count;
++ unsigned long deadline;
+ int sr;
+
+- /* one chip guarantees max 5 msec wait here after page writes,
+- * but potentially three seconds (!) after page erase.
+- */
+- for (count = 0; count < MAX_READY_WAIT_COUNT; count++) {
++ deadline = jiffies + MAX_READY_WAIT_JIFFIES;
++
++ do {
+ if ((sr = read_sr(flash)) < 0)
+ break;
+ else if (!(sr & SR_WIP))
+ return 0;
+
+- /* REVISIT sometimes sleeping would be best */
+- }
++ cond_resched();
++
++ } while (!time_after_eq(jiffies, deadline));
+
+ return 1;
+ }
+--
+To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
+the body of a message to majordomo at vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
+Please read the FAQ at http://www.tux.org/lkml/
Modified: dists/sid/linux-2.6/debian/patches/series/4
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/4 Mon Apr 20 17:21:54 2009 (r13458)
+++ dists/sid/linux-2.6/debian/patches/series/4 Mon Apr 20 19:10:59 2009 (r13459)
@@ -1 +1,2 @@
+ bugfix/all/drm-intel.git-f544847fbaf099278343f875987a983f2b913134.patch
++ bugfix/all/extend-erase-timeout-spi-flash.patch
More information about the Kernel-svn-changes
mailing list