* [GIT PULL] urgent onenand file system corruption fix for n900
@ 2016-01-08 16:32 Tony Lindgren
2016-01-08 16:49 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Tony Lindgren @ 2016-01-08 16:32 UTC (permalink / raw)
To: linux-arm-kernel
The following changes since commit 0b4d6972d7b052b23d33ff9bdbb52958664fbb26:
ARM: dts: Fix UART wakeirq for omap4 duovero parlor (2015-12-18 16:43:22 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v4.4/onenand-corruption
for you to fetch changes up to e7b11dc7b77bfce0a351230a5feeadc1d0bba997:
ARM: OMAP2+: Fix onenand rate detection to avoid filesystem corruption (2016-01-06 09:21:09 -0800)
----------------------------------------------------------------
Last minute urgent pull request to prevent file system corruption
on Nokia N900.
Looks like we have a GPMC bus timing bug that has gone unnoticed
because of bootloader configured registers until few days ago. We
are not detecting the onenand clock rate properly unless we have
CONFIG_OMAP_GPMC_DEBUG set and this causes onenand corruption
that can be easily be reproduced.
There seems to be also an additional bug still lurking around for
onenand corruption. But that is still being investigated and
it does not seem to be GPMC timings related.
Meanwhile, it would be good to get this fix into v4.4 to prevent
wrong timings from corrupting onenand.
----------------------------------------------------------------
Tony Lindgren (1):
ARM: OMAP2+: Fix onenand rate detection to avoid filesystem corruption
arch/arm/mach-omap2/gpmc-onenand.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -149,8 +149,8 @@ static int omap2_onenand_get_freq(struct omap_onenand_platform_data *cfg,
freq = 104;
break;
default:
- freq = 54;
- break;
+ pr_err("onenand rate not detected, bad GPMC async timings?\n");
+ freq = 0;
}
return freq;
@@ -271,6 +271,11 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base)
struct gpmc_timings t;
int ret;
+ /*
+ * Note that we need to keep sync_write set for the call to
+ * omap2_onenand_set_async_mode() to work to detect the onenand
+ * supported clock rate for the sync timings.
+ */
if (gpmc_onenand_data->of_node) {
gpmc_read_settings_dt(gpmc_onenand_data->of_node,
&onenand_async);
@@ -281,12 +286,9 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base)
else
gpmc_onenand_data->flags |= ONENAND_SYNC_READ;
onenand_async.sync_read = false;
- onenand_async.sync_write = false;
}
}
- omap2_onenand_set_async_mode(onenand_base);
-
omap2_onenand_calc_async_timings(&t);
ret = gpmc_cs_program_settings(gpmc_onenand_data->cs, &onenand_async);
@@ -310,6 +312,8 @@ static int omap2_onenand_setup_sync(void __iomem *onenand_base, int *freq_ptr)
if (!freq) {
/* Very first call freq is not known */
freq = omap2_onenand_get_freq(gpmc_onenand_data, onenand_base);
+ if (!freq)
+ return -ENODEV;
set_onenand_cfg(onenand_base);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [GIT PULL] urgent onenand file system corruption fix for n900
2016-01-08 16:32 [GIT PULL] urgent onenand file system corruption fix for n900 Tony Lindgren
@ 2016-01-08 16:49 ` Arnd Bergmann
2016-01-08 17:01 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2016-01-08 16:49 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 08 January 2016 08:32:50 Tony Lindgren wrote:
> Last minute urgent pull request to prevent file system corruption
> on Nokia N900.
>
> Looks like we have a GPMC bus timing bug that has gone unnoticed
> because of bootloader configured registers until few days ago. We
> are not detecting the onenand clock rate properly unless we have
> CONFIG_OMAP_GPMC_DEBUG set and this causes onenand corruption
> that can be easily be reproduced.
>
> There seems to be also an additional bug still lurking around for
> onenand corruption. But that is still being investigated and
> it does not seem to be GPMC timings related.
>
> Meanwhile, it would be good to get this fix into v4.4 to prevent
> wrong timings from corrupting onenand.
>
Pulled into fixes, thanks.
I'll try to get the fixes pull request out tonight, there are a
small number of other fixes.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
* [GIT PULL] urgent onenand file system corruption fix for n900
2016-01-08 16:49 ` Arnd Bergmann
@ 2016-01-08 17:01 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2016-01-08 17:01 UTC (permalink / raw)
To: linux-arm-kernel
* Arnd Bergmann <arnd@arndb.de> [160108 08:50]:
> On Friday 08 January 2016 08:32:50 Tony Lindgren wrote:
> > Last minute urgent pull request to prevent file system corruption
> > on Nokia N900.
> >
> > Looks like we have a GPMC bus timing bug that has gone unnoticed
> > because of bootloader configured registers until few days ago. We
> > are not detecting the onenand clock rate properly unless we have
> > CONFIG_OMAP_GPMC_DEBUG set and this causes onenand corruption
> > that can be easily be reproduced.
> >
> > There seems to be also an additional bug still lurking around for
> > onenand corruption. But that is still being investigated and
> > it does not seem to be GPMC timings related.
> >
> > Meanwhile, it would be good to get this fix into v4.4 to prevent
> > wrong timings from corrupting onenand.
> >
>
> Pulled into fixes, thanks.
>
> I'll try to get the fixes pull request out tonight, there are a
> small number of other fixes.
Great thanks!
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-08 17:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-08 16:32 [GIT PULL] urgent onenand file system corruption fix for n900 Tony Lindgren
2016-01-08 16:49 ` Arnd Bergmann
2016-01-08 17:01 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).