M.2 NVMe Intel 512GB 660P Not reconized on Android 10

Hi All,
My intel 660p SSD cannot be detected on Rockpi4A with Android 10.
But it works properly on Android 9.

I found some strange code dump in Kernel logs.

    Starting kernel ...
....
[    1.543062] ALSA device list:
[    1.543090]   #0: rockchip,es8316-codec
[    1.543102]   #1: rockchiphdmi
[    1.611015] phy phy-ff770000.syscon:usb2-phy@e450.2: charger = USB_SDP_CHARGER
[   20.454083] INFO: task swapper/0:1 blocked for more than 10 seconds.
[   20.454131]       Not tainted 4.19.111 #22
[   20.454147] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[   20.454165] swapper/0       D    0     1      0 0x00000028
[   20.454188] Call trace:
[   20.454220]  __switch_to+0xe4/0x138
[   20.454243]  __schedule+0x2f4/0x930
[   20.454261]  schedule+0x38/0xa0
[   20.454282]  async_synchronize_cookie_domain+0xc4/0x110
[   20.454364]  async_synchronize_full+0x14/0x20
[   20.454388]  kernel_init_freeable+0x228/0x37c
[   20.454469]  kernel_init+0x10/0x108
[   20.454488]  ret_from_fork+0x10/0x18
[   20.454592] INFO: task kworker/u12:1:42 blocked for more than 10 seconds.
[   20.454624]       Not tainted 4.19.111 #22
[   20.454638] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[   20.454653] kworker/u12:1   D    0    42      2 0x00000028
[   20.454814] Workqueue: events_unbound async_run_entry_fn
[   20.454847] Call trace:
[   20.454868]  __switch_to+0xe4/0x138
[   20.454907]  __schedule+0x2f4/0x930
[   20.454924]  schedule+0x38/0xa0
[   20.454944]  schedule_timeout+0x1e0/0x430
[   20.454974]  wait_for_common+0x130/0x1e8
[   20.455068]  wait_for_completion+0x14/0x20
[   20.455103]  __flush_work+0xf8/0x230
[   20.455140]  flush_work+0x10/0x18
[   20.455165]  nvme_async_probe+0x18/0x38
[   20.455182]  async_run_entry_fn+0x44/0x120
[   20.455323]  process_one_work+0x1a0/0x418
[   20.455331]  worker_thread+0x4c/0x3e0
[   20.455339]  kthread+0x12c/0x158
[   20.455355]  ret_from_fork+0x10/0x18
[   30.694152] INFO: task swapper/0:1 blocked for more than 10 seconds.
[   30.694234]       Not tainted 4.19.111 #22
[   30.694251] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[   30.694270] swapper/0       D    0     1      0 0x00000028
[   30.694294] Call trace:
[   30.694327]  __switch_to+0xe4/0x138
[   30.694353]  __schedule+0x2f4/0x930
[   30.694375]  schedule+0x38/0xa0
[   30.694456]  async_synchronize_cookie_domain+0xc4/0x110
[   30.694500]  async_synchronize_full+0x14/0x20
[   30.694548]  kernel_init_freeable+0x228/0x37c
[   30.694591]  kernel_init+0x10/0x108
[   30.694639]  ret_from_fork+0x10/0x18
[   30.694801] INFO: task kworker/u12:1:42 blocked for more than 10 seconds.
[   30.694870]       Not tainted 4.19.111 #22
[   30.694912] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[   30.694949] kworker/u12:1   D    0    42      2 0x00000028
[   30.695007] Workqueue: events_unbound async_run_entry_fn
[   30.695047] Call trace:
[   30.695093]  __switch_to+0xe4/0x138
[   30.695118]  __schedule+0x2f4/0x930
[   30.695159]  schedule+0x38/0xa0
[   30.695203]  schedule_timeout+0x1e0/0x430
[   30.695246]  wait_for_common+0x130/0x1e8
[   30.695288]  wait_for_completion+0x14/0x20
[   30.695333]  __flush_work+0xf8/0x230
[   30.695358]  flush_work+0x10/0x18
[   30.695404]  nvme_async_probe+0x18/0x38
[   30.695468]  async_run_entry_fn+0x44/0x120
[   30.695513]  process_one_work+0x1a0/0x418
[   30.695557]  worker_thread+0x4c/0x3e0
[   30.695600]  kthread+0x12c/0x158
[   30.695623]  ret_from_fork+0x10/0x18
[   31.717983] vcc_otg_vbus: disabling
[   40.934052] INFO: task swapper/0:1 blocked for more than 10 seconds.
[   40.934125]       Not tainted 4.19.111 #22
[   40.934142] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[   40.934160] swapper/0       D    0     1      0 0x00000028
[   40.934184] Call trace:
[   40.934217]  __switch_to+0xe4/0x138
[   40.934245]  __schedule+0x2f4/0x930
[   40.934267]  schedule+0x38/0xa0
[   40.934352]  async_synchronize_cookie_domain+0xc4/0x110
[   40.934397]  async_synchronize_full+0x14/0x20
[   40.934445]  kernel_init_freeable+0x228/0x37c
[   40.934487]  kernel_init+0x10/0x108
[   40.934510]  ret_from_fork+0x10/0x18
[   40.934594] INFO: task kworker/u12:1:42 blocked for more than 10 seconds.
[   40.934632]       Not tainted 4.19.111 #22
[   40.934667] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[   40.934751] kworker/u12:1   D    0    42      2 0x00000028
[   40.934796] Workqueue: events_unbound async_run_entry_fn
[   40.934840] Call trace:
[   40.934908]  __switch_to+0xe4/0x138
[   40.934952]  __schedule+0x2f4/0x930
[   40.934994]  schedule+0x38/0xa0
[   40.935038]  schedule_timeout+0x1e0/0x430
[   40.935063]  wait_for_common+0x130/0x1e8
[   40.935104]  wait_for_completion+0x14/0x20
[   40.935149]  __flush_work+0xf8/0x230
[   40.935192]  flush_work+0x10/0x18
[   40.935238]  nvme_async_probe+0x18/0x38
[   40.935279]  async_run_entry_fn+0x44/0x120
[   40.935304]  process_one_work+0x1a0/0x418
[   40.935348]  worker_thread+0x4c/0x3e0
[   40.935392]  kthread+0x12c/0x158
[   40.935453]  ret_from_fork+0x10/0x18
[   51.174035] INFO: task swapper/0:1 blocked for more than 10 seconds.
[   51.174107]       Not tainted 4.19.111 #22
[   51.174124] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[   51.174143] swapper/0       D    0     1      0 0x00000028
[   51.174167] Call trace:
[   51.174201]  __switch_to+0xe4/0x138
[   51.174227]  __schedule+0x2f4/0x930
[   51.174249]  schedule+0x38/0xa0
[   51.174337]  async_synchronize_cookie_domain+0xc4/0x110
[   51.174383]  async_synchronize_full+0x14/0x20
[   51.174431]  kernel_init_freeable+0x228/0x37c
[   51.174473]  kernel_init+0x10/0x108
[   51.174498]  ret_from_fork+0x10/0x18
[   51.174579] INFO: task kworker/u12:1:42 blocked for more than 10 seconds.
[   51.174617]       Not tainted 4.19.111 #22
[   51.174651] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[   51.174738] kworker/u12:1   D    0    42      2 0x00000028
[   51.174809] Workqueue: events_unbound async_run_entry_fn
[   51.174850] Call trace:
[   51.174917]  __switch_to+0xe4/0x138
[   51.174962]  __schedule+0x2f4/0x930
[   51.175006]  schedule+0x38/0xa0
[   51.175030]  schedule_timeout+0x1e0/0x430
[   51.175073]  wait_for_common+0x130/0x1e8
[   51.175115]  wait_for_completion+0x14/0x20
[   51.175160]  __flush_work+0xf8/0x230
[   51.175203]  flush_work+0x10/0x18
[   51.175251]  nvme_async_probe+0x18/0x38
[   51.175273]  async_run_entry_fn+0x44/0x120
[   51.175317]  process_one_work+0x1a0/0x418
[   51.175361]  worker_thread+0x4c/0x3e0
[   51.175424]  kthread+0x12c/0x158
[   51.175468]  ret_from_fork+0x10/0x18
[   61.414048] INFO: task swapper/0:1 blocked for more than 10 seconds.
[   61.414118]       Not tainted 4.19.111 #22
[   61.414134] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[   61.414153] swapper/0       D    0     1      0 0x00000028
[   61.414176] Call trace:
[   61.414209]  __switch_to+0xe4/0x138
[   61.414236]  __schedule+0x2f4/0x930
[   61.414251]  schedule+0x38/0xa0
[   61.414263]  async_synchronize_cookie_domain+0xc4/0x110
[   61.414274]  async_synchronize_full+0x14/0x20
[   61.414289]  kernel_init_freeable+0x228/0x37c
[   61.414300]  kernel_init+0x10/0x108
[   61.414311]  ret_from_fork+0x10/0x18
[   61.414350] INFO: task kworker/u12:1:42 blocked for more than 10 seconds.
[   61.414359]       Not tainted 4.19.111 #22
[   61.414366] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[   61.414374] kworker/u12:1   D    0    42      2 0x00000028
[   61.414394] Workqueue: events_unbound async_run_entry_fn
[   61.414404] Call trace:
[   61.414415]  __switch_to+0xe4/0x138
[   61.414426]  __schedule+0x2f4/0x930
[   61.414436]  schedule+0x38/0xa0
[   61.414448]  schedule_timeout+0x1e0/0x430
[   61.414459]  wait_for_common+0x130/0x1e8
[   61.414470]  wait_for_completion+0x14/0x20
[   61.414482]  __flush_work+0xf8/0x230
[   61.414493]  flush_work+0x10/0x18
[   61.414506]  nvme_async_probe+0x18/0x38
[   61.414517]  async_run_entry_fn+0x44/0x120
[   61.414528]  process_one_work+0x1a0/0x418
[   61.414540]  worker_thread+0x4c/0x3e0
[   61.414551]  kthread+0x12c/0x158
[   61.414561]  ret_from_fork+0x10/0x18
[   62.438063] nvme nvme0: I/O 22 QID 0 timeout, disable controller
[   62.542472] nvme nvme0: Identify Controller failed (7)
[   62.542543] nvme nvme0: Removing after probe failure status: -5
[   62.545949] Freeing unused kernel memory: 3904K

....

How can I fix this !? Any suggestions are appreciated.

Have you tried Android 11?
https://github.com/radxa/manifests/releases/download/Rock-android11-20211115_1851/rockpi-4ab-android11-20211115_1851-gpt.zip

Hi mo123,
It works properly in Android 11.
What is the different in kernel between Android 11 and Android 10 !?
How can I fix this issue in Android 10!?

Many Thanks.

Android 10 - kernel 4.4
Android 11 - kernel 4.19
Is there any reason you need to use A10 instead of A11?
Driver compatibility will be a lot better with A11, the kernel changes will be thousands of patches so it will be almost impossible to compare the differences between them.

Hi mo123,

  1. I download the image (ROCKPI-4AB-2021-09-16-11-17-gpt.img) released by radxa and confirmed that Android 10 also uses kernel 4.19.

    Linux version 4.19.111 (jenkins-docker@5c9ddb5cd25b) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #9 SMP PREEMPT Thu Sep 16 11:17:19 CST 2021

  2. I removed config below in u-boot and found this issue was fixed. System can detect the ssd. Is there any issue in rockchip pcie driver of u-boot!?

    — a/u-boot/configs/rockpi4b_defconfig
    +++ b/u-boot/configs/rockpi4b_defconfig
    @@ -145,9 +145,8 @@ CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION=y
    CONFIG_NVME=y
    CONFIG_PCI=y
    CONFIG_DM_PCI=y
    -CONFIG_PCIE_ROCKCHIP=y
    CONFIG_CMD_PCI=y
    CONFIG_SPL_PCI_SUPPORT=y
    CONFIG_SPL_GPIO_SUPPORT=y
    CONFIG_CMD_CACHE=y
    -# CONFIG_ROCKCHIP_PRELOADER_ATAGS is not set
    \ No newline at end of file