Hi.
Booting from NAND flash (and using a UBI rootfs) and suspending to RAM (with the NAND flash power going down during suspend) - when waking up, we get the errors below* and the rootfs is switched to read-only mode.
This only happens with the i.MX6ULL SOC.
On the same board with an i.MX6UL SOC there is no such issue.
With the i.MX6ULL SOC it happens on all BSP versions:
imx-rel_imx_4.1.15_2.0.0_ga
imx_4.9.11_1.0.0_ga
imx_4.9.88_2.0.0_ga
imx_4.14.78_1.0.0_ga
imx_4.14.98_2.0.0_ga
imx_4.19.35_1.1.0
imx-5.4.3-1.0.0
Full logs from the boot start, with both i.MX6UL and i.MX6ULL SOCs are attached.
We would really appriciate your help with this issue.
Thanks.
*root@imx6ul-var-dart:~# echo mem > /sys/power/state
PM: suspend entry (deep)
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.003 seconds) done.
OOM killer disabled.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend devices took 0.070 seconds
Disabling non-boot CPUs ...
Turn off M/F mix!
imx-sdma 20ec000.sdma: loaded firmware 3.3
imx-i2c 21a4000.i2c: Unbalanced pm_runtime_enable!
gpmi-nand 1806000.gpmi-nand: mode:5 ,failed in set feature.
fec 20b4000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
fec 2188000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
PM: resume devices took 0.270 seconds
OOM killer enabled.
Restarting tasks ... done.
root@imx6ul-var-dart:~# PM: suspend exit
fec 20b4000.ethernet eth0: Link is Down
UBIFS error (ubi0:0 pid 518): ubifs_read_node: bad node type (255 but expected 2)
UBIFS error (ubi0:0 pid 518): ubifs_read_node: bad node at LEB 1966:27416, LEB mapping status 1
Not a node, first 24 bytes:
00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........................
CPU: 0 PID: 518 Comm: connmand Not tainted 4.14.78-mx6ul+ge692c30 #1
Hardware name: Freescale i.MX6 UltraLite (Device Tree)
[<8010f7b0>] (unwind_backtrace) from [<8010b2bc>] (show_stack+0x10/0x14)
[<8010b2bc>] (show_stack) from [<809ad85c>] (dump_stack+0x78/0x8c)
[<809ad85c>] (dump_stack) from [<8034fba0>] (ubifs_read_node+0x1c0/0x27c)
[<8034fba0>] (ubifs_read_node) from [<8036ae58>] (ubifs_tnc_read_node+0x48/0xcc)
[<8036ae58>] (ubifs_tnc_read_node) from [<80350b00>] (matches_name+0x94/0xd0)
[<80350b00>] (matches_name) from [<80350b74>] (resolve_collision+0x38/0x2d8)
[<80350b74>] (resolve_collision) from [<80353b68>] (ubifs_tnc_remove_nm+0x88/0x108)
[<80353b68>] (ubifs_tnc_remove_nm) from [<80343ac8>] (ubifs_jnl_rename+0x930/0xa18)
[<80343ac8>] (ubifs_jnl_rename) from [<80349054>] (do_rename+0x3d0/0x7cc)
[<80349054>] (do_rename) from [<80349504>] (ubifs_rename+0xb4/0x3b8)
[<80349504>] (ubifs_rename) from [<80230aec>] (vfs_rename+0x568/0x7f8)
[<80230aec>] (vfs_rename) from [<80233de8>] (SyS_renameat2+0x31c/0x4a4)
[<80233de8>] (SyS_renameat2) from [<80233fb0>] (SyS_rename+0x24/0x2c)
[<80233fb0>] (SyS_rename) from [<80107960>] (ret_fast_syscall+0x0/0x54)
fec 2188000.ethernet eth1: Link is Down
UBIFS warning (ubi0:0 pid 518): ubifs_ro_mode.part.0: switched to read-only mode, error -22
CPU: 0 PID: 518 Comm: connmand Not tainted 4.14.78-mx6ul+ge692c30 #1
Hardware name: Freescale i.MX6 UltraLite (Device Tree)
[<8010f7b0>] (unwind_backtrace) from [<8010b2bc>] (show_stack+0x10/0x14)
[<8010b2bc>] (show_stack) from [<809ad85c>] (dump_stack+0x78/0x8c)
[<809ad85c>] (dump_stack) from [<803437b4>] (ubifs_jnl_rename+0x61c/0xa18)
[<803437b4>] (ubifs_jnl_rename) from [<80349054>] (do_rename+0x3d0/0x7cc)
[<80349054>] (do_rename) from [<80349504>] (ubifs_rename+0xb4/0x3b8)
[<80349504>] (ubifs_rename) from [<80230aec>] (vfs_rename+0x568/0x7f8)
[<80230aec>] (vfs_rename) from [<80233de8>] (SyS_renameat2+0x31c/0x4a4)
[<80233de8>] (SyS_renameat2) from [<80233fb0>] (SyS_rename+0x24/0x2c)
[<80233fb0>] (SyS_rename) from [<80107960>] (ret_fast_syscall+0x0/0x54)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
fec 20b4000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
UBIFS error (ubi0:0 pid 706): make_reservation: cannot reserve 160 bytes in jhead 1, error -30
UBIFS error (ubi0:0 pid 706): ubifs_write_inode: can't write inode 20366, error -30
UBIFS error (ubi0:0 pid 706): make_reservation: cannot reserve 122 bytes in jhead 2, error -30
UBIFS error (ubi0:0 pid 706): do_writepage: cannot write page 0 of inode 20350, error -30
UBIFS error (ubi0:0 pid 706): make_reservation: cannot reserve 160 bytes in jhead 1, error -30
UBIFS error (ubi0:0 pid 706): ubifs_write_inode: can't write inode 20350, error -30
This topic is a bit old, but maybe you have a fix/detail to share?
I have a quite similar issue with imx6ull and a specific NAND chip when I unpower NAND chip during suspend (no issue with imx6ull and another NAND). I did not work on it yet but my first idea is that my new NAND requires to receive a RESET command after power up (clearly stated in datasheet), which appears not sent by gpmi-nand driver resume procedure (reading source code).
As a very first fix I suspended this power saving during suspend. Keeping NAND powered during suspend workarouds my issue.
It seems that first CMD sending is failed after resume and GPMI re-initialized. Suggest to check GPMI status in resume