Bug 9829 - MTD startup lock when using multiple nor flash chips
Summary: MTD startup lock when using multiple nor flash chips
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Flash/Memory Technology Devices (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: David Woodhouse
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-26 23:33 UTC by Rizzo Davide
Modified: 2008-06-02 14:51 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.24
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Patch to solve the problem at drivers/mtd/chips/gen_probe.c (490 bytes, patch)
2008-01-26 23:47 UTC, Rizzo Davide
Details | Diff

Description Rizzo Davide 2008-01-26 23:33:24 UTC
Latest working kernel version: 2.6.17 (not sure)
Earliest failing kernel version: 2.6.18 (not sure)
Distribution: kernel only in embedded system
Hardware Environment: arm9 booting from 2 contiguous flash nor chip (4MB+4MB)
Software Environment: kernel startup
Problem Description: startup locks. I found and solved the problem, at line 115 of drivers/mtd/chips/gen_probe.c (kernel 2.6.24): mapsize value must be calculated in bytes, not in long.
I replaced line 115 from:
mapsize = (max_chips + BITS_PER_LONG-1) / BITS_PER_LONG;
to:
mapsize = sizeof(long) * ( (max_chips + BITS_PER_LONG-1) / BITS_PER_LONG );
And all worked OK
Steps to reproduce: boot up the kernel
Comment 1 Rizzo Davide 2008-01-26 23:47:11 UTC
Created attachment 14594 [details]
Patch to solve the problem at drivers/mtd/chips/gen_probe.c

Tested OK on my ARM system with 2 4MB flash nor chips
My system is based on Samsung S3C2410 SoC
Comment 2 Anonymous Emailer 2008-01-27 02:06:11 UTC
Reply-To: akpm@linux-foundation.org

> On Sat, 26 Jan 2008 23:33:25 -0800 (PST) bugme-daemon@bugzilla.kernel.org
> wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=9829
> 
>            Summary: MTD startup lock when using multiple nor flash chips
>            Product: IO/Storage
>            Version: 2.5
>      KernelVersion: 2.6.24
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: blocking
>           Priority: P1
>          Component: Other
>         AssignedTo: io_other@kernel-bugs.osdl.org
>         ReportedBy: davide@elpa.it
> 
> 
> Latest working kernel version: 2.6.17 (not sure)
> Earliest failing kernel version: 2.6.18 (not sure)
> Distribution: kernel only in embedded system
> Hardware Environment: arm9 booting from 2 contiguous flash nor chip (4MB+4MB)
> Software Environment: kernel startup
> Problem Description: startup locks. I found and solved the problem, at line
> 115
> of drivers/mtd/chips/gen_probe.c (kernel 2.6.24): mapsize value must be
> calculated in bytes, not in long.
> I replaced line 115 from:
> mapsize = (max_chips + BITS_PER_LONG-1) / BITS_PER_LONG;
> to:
> mapsize = sizeof(long) * ( (max_chips + BITS_PER_LONG-1) / BITS_PER_LONG );
> And all worked OK
> Steps to reproduce: boot up the kernel

Thanks.  But we very much prefer patches via email.  Please send the patch
to all the recipients of this email as per
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
Comment 3 Natalie Protasevich 2008-06-02 14:51:31 UTC
Commit 484b8e64c848185af0d3671fafba4dd66ca412d2, closing the bug.

Note You need to log in before you can comment on or make changes to this bug.