linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Trevor Woerner <twoerner@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBI issues with lpc32xx  Was: UBI issues with 5.11.11
Date: Tue, 13 Apr 2021 12:00:34 +0200	[thread overview]
Message-ID: <20210413120034.50dbe7d0@xps13> (raw)
In-Reply-To: <20210412180531.GA27730@localhost>

Hi Trevor,

Trevor Woerner <twoerner@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@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

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2021-04-13 10:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 19:03 UBI issues with linux-stable 5.11.11 Trevor Woerner
2021-04-07 20:23 ` Trevor Woerner
2021-04-08  4:56   ` Alexander Dahl
2021-04-12  2:29   ` UBI issues with lpc32xx Was: UBI issues with 5.11.11 Trevor Woerner
2021-04-12 16:02     ` Miquel Raynal
2021-04-12 18:05       ` Trevor Woerner
2021-04-13 10:00         ` Miquel Raynal [this message]
2021-04-13 12:48           ` Trevor Woerner
2021-04-13 14:36             ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210413120034.50dbe7d0@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=twoerner@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).