UBI issues with lpc32xx Was: UBI issues with 5.11.11
Miquel Raynal
miquel.raynal at bootlin.com
Tue Apr 13 11:00:34 BST 2021
Hi Trevor,
Trevor Woerner <twoerner at gmail.com> wrote on Mon, 12 Apr 2021 14:05:31
-0400:
> Hi Miquel,
>
> On Mon 2021-04-12 @ 06:02:33 PM, Miquel Raynal wrote:
> > I assumed I understood this trace well enough to write a patch. Can you
> > please give this change a try?
> >
> > If it does not fix your issue, would you mind tracing down the issue to
> > the root dereference that produces this panic?
>
> It looks, to me, that your patch solves the NULL dereference problem. But it
> reveals a new one "Driver must set ecc.strength when using hardware ECC". Is
> that something I should be setting in my device tree, or is that a driver
> issue too?
>
> > Also please share your entire boot log in case there is anything else
> > interesting (and perhaps your NAND DT node as well).
>
> New boot log:
> Booting Linux on physical CPU 0x0
> Linux version 5.10.0-rc6-yocto-standard (oe-user at oe-host) (arm-oe-linux-gnueabi-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.36.1.20210209) #1 PREEMPT Mon Apr 12 17:49:12 UTC 2021
> CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=0005317f
> CPU: VIVT data cache, VIVT instruction cache
> OF: fdt: Machine model: NAUTEL nape83 board based on NXP LPC3240
> Memory policy: Data cache writeback
> Zone ranges:
> Normal [mem 0x0000000080000000-0x0000000083ffffff]
> Movable zone start for each node
> Early memory node ranges
> node 0: [mem 0x0000000080000000-0x0000000083ffffff]
> Initmem setup node 0 [mem 0x0000000080000000-0x0000000083ffffff]
> Built 1 zonelists, mobility grouping on. Total pages: 16240
> Kernel command line: ubi.mtd=7,512 rootfstype=ubifs root=ubi0 rootwait rw console=ttyS0,115200n81
> Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
> Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
> mem auto-init: stack:off, heap alloc:off, heap free:off
> Memory: 57312K/65536K available (5341K kernel code, 432K rwdata, 1108K rodata, 196K init, 206K bss, 8224K reserved, 0K cma-reserved)
> rcu: Preemptible hierarchical RCU implementation.
> Trampoline variant of Tasks RCU enabled.
> rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
> NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
> random: get_random_bytes called from start_kernel+0x2bc/0x4d4 with crng_init=0
> clk_pll_recalc_rate: hclk_pll: PLL clocks are not in valid ranges: 0/0/0
> clocksource: lpc3220 timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 147020034397 ns
> Switching to timer-based delay loop, resolution 76ns
> sched_clock: 32 bits at 13MHz, resolution 76ns, wraps every 165191050201ns
> Console: colour dummy device 80x30
> Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
> pid_max: default: 32768 minimum: 301
> Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
> Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
> CPU: Testing write buffer coherency: ok
> Setting up static identity map for 0x80008400 - 0x8000843c
> rcu: Hierarchical SRCU implementation.
> devtmpfs: initialized
> VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 1
> clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
> futex hash table entries: 256 (order: -1, 3072 bytes, linear)
> NET: Registered protocol family 16
> DMA: preallocated 256 KiB pool for atomic coherent allocations
> cpuidle: using governor menu
> LPC32XX unique ID: 5565d99a09d8905d38df4d6190bb7480
> pl08xdmac pl08xdmac: initialized 8 virtual memcpy channels
> pl08xdmac pl08xdmac: initialized 2 virtual slave channels
> pl08xdmac pl08xdmac: DMA: PL080 rev0 at 0x31000000 irq 21
> SCSI subsystem initialized
> usbcore: registered new interface driver usbfs
> usbcore: registered new interface driver hub
> usbcore: registered new device driver usb
> Advanced Linux Sound Architecture Driver Initialized.
> clocksource: Switched to clocksource lpc3220 timer
> NET: Registered protocol family 2
> tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
> TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
> TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
> TCP: Hash tables configured (established 1024 bind 1024)
> UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
> UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
> NET: Registered protocol family 1
> RPC: Registered named UNIX socket transport module.
> RPC: Registered udp transport module.
> RPC: Registered tcp transport module.
> RPC: Registered tcp NFSv4.1 backchannel transport module.
> workingset: timestamp_bits=14 max_order=14 bucket_order=0
> NET: Registered protocol family 38
> io scheduler mq-deadline registered
> io scheduler kyber registered
> Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
> printk: console [ttyS0] disabled
> 40090000.serial: ttyS0 at MMIO 0x40090000 (irq = 24, base_baud = 812500) is a LPC3220
> printk: console [ttyS0] enabled
> 40080000.serial: ttyS1 at MMIO 0x40080000 (irq = 25, base_baud = 812500) is a LPC3220
> 40088000.serial: ttyS2 at MMIO 0x40088000 (irq = 26, base_baud = 812500) is a LPC3220
> 40098000.serial: ttyS3 at MMIO 0x40098000 (irq = 27, base_baud = 812500) is a LPC3220
> 40014000.serial: ttyTX0 at MMIO 0x40014000 (irq = 30, base_baud = 812500) is a lpc32xx_hsuart
> 40018000.serial: ttyTX1 at MMIO 0x40018000 (irq = 31, base_baud = 812500) is a lpc32xx_hsuart
> 4001c000.serial: ttyTX2 at MMIO 0x4001c000 (irq = 32, base_baud = 812500) is a lpc32xx_hsuart
> brd: module loaded
> loop: module loaded
> nand: device found, Manufacturer ID: 0x01, Chip ID: 0xdc
> nand: AMD/Spansion S34ML04G1
> nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 1 at drivers/mtd/nand/raw/nand_base.c:5781 nand_scan_with_ids+0xbf8/0x136c
> Driver must set ecc.strength when using hardware ECC
I tried another version of the patch, please tell me if it works
better for you. If yes, I will have to copy this fix for 4 other
drivers in the same situation.
Thanks,
Miquèl
More information about the linux-mtd
mailing list