Orange pi 3b NVME problem

Okay just to clarify:

  • No NVMe disk was ever detected as disk on the Orange Pi 3B? (means it was detected as hardware device via lspci, but not as block device via lsblk or similar)
  • If so, how did nvme_core.default_ps_max_latency_us=0 make it worse? Did the same Device not ready; aborting initialisation, CSTS=0x0 show up in dmesg?

Yes
after adding this option, one of the drives was no longer detected by lspci

Very interesting. Actually, since the nvme_core driver was never really in use, it should not have an effect, unless e.g. the initialisation lead to a complete disconnect of the device.

The kernel then should report different errors:

dmesg -l 0,1,2,3

Do you have a 4A or 5A PSU to test with? 3.6A should normally be sufficient, but probably some NVMe SSDs have power usage peaks during initialisation, which exceed those. Such could explain the inconsistent behaviour, also from the other user on GitHub.

I probably have a more powerful power supply, and I probably didn’t mention a few things. Namely, if the edited entry in dietpiEnv.txt should look like this (as I sent earlier), the adata disk was detected and no error was shown in the logs, but it did not show up as a disk (I wanted to check when using adata whether it was just the m.2 slot or no, because at the beginning the WD drive that I wanted to add to this sbc computer was not detected even by LSPCI, after the uboot update it started to show) and the WD drive which was supposed to be the target disk for this sbc but after this edition it no longer showed up even in LSPCI

A more powerful PSU is definitely worth a try.

In cases where the NVMe is not even detected with lspci the kernel errors would be interesting:

dmesg -l 0,1,2,3

They should be different compared to what you posted before.

no error refers to pci/nvme but I will send it soon

1 Like

ok, now I noticed that some changes in the logs occurred without this additional one in dietpiEnv.txt

[    1.270843] pci 0000:01:00.0: calc_l12_pwron: Invalid T_PwrOn scale: 3
[    1.271162] pci 0000:01:00.0: BAR 0: error updating (0xf4200004 != 0xffffffff)
[    1.271192] pci 0000:01:00.0: BAR 0: error updating (high 0x00000000 != 0xffffffff)
[    1.271257] pci 0000:01:00.0: BAR 4: error updating (0xf4204004 != 0xffffffff)
[    1.271286] pci 0000:01:00.0: BAR 4: error updating (high 0x00000000 != 0xffffffff)
[    1.657443] mmc1: tuning execution failed: -5
[    1.657474] mmc1: error -5 whilst initialising SD card
[    1.781486] mmc1: tuning execution failed: -5
[    1.918329] WCN_ERR: gpio chip_en request err: 27
[    6.678847] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[    6.691015] wifi ini path = /lib/firmware/wifi_2355b001_1ant.ini
[    6.693596] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[    6.710817] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[    6.720908] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[    6.732210] sprdwl:sprdwl_get_fw_info length mismatch: len_count=83, r_len=89
[    6.732278] sprdwl:sprdwl_get_fw_info, drv_version=1, fw_version=2, compat_ver=0
[    6.732305] sprdwl:chip_model:0x2355, chip_ver:0x0
[    6.732323] sprdwl:fw_ver:0, fw_std:0x7f, fw_capa:0x120f7f
[    6.732343] sprdwl:mac_addr:e0:51:d8:20:e3:78
[    6.732363] sprdwl:credit_capa:TX_WITH_CREDIT
[    6.732379] sprdwl:ott support:0
[    6.772616] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[   10.944199] sprdwl:ctx_id = 0, sm_state = 4, bssid =ff:ff:ff:ff:ff:ff
[   10.944273] sprdwl:ctx_id = 0, sm_state = 4, bssid =ff:ff:ff:ff:ff:ff

but after adding this in dietpiEnv.txt the logs look like this, interestingly, I had a more powerful power supply with an ammeter and at startup it measured no more than 0.8A (in the event of a short circuit, this power supply (or rather converter) can deliver 5A) , I restarted it and there are different logs on these two runs and I didn’t change anything
lspci displayed the information normally

[    1.269970] pci 0000:01:00.0: calc_l12_pwron: Invalid T_PwrOn scale: 3
[    1.270307] pci 0000:01:00.0: BAR 0: error updating (0xf4200004 != 0xffffffff)
[    1.270338] pci 0000:01:00.0: BAR 0: error updating (high 0x00000000 != 0xffffffff)
[    1.270401] pci 0000:01:00.0: BAR 4: error updating (0xf4204004 != 0xffffffff)
[    1.270431] pci 0000:01:00.0: BAR 4: error updating (high 0x00000000 != 0xffffffff)
[    1.324188] nvme 0000:01:00.0: of_irq_parse_pci: failed with rc=134
[    1.324908] nvme 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible
[    2.038627] WCN_ERR: gpio chip_en request err: 27
[    6.366354] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[    6.374066] wifi ini path = /lib/firmware/wifi_2355b001_1ant.ini
[    6.376541] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[    6.390152] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[    6.397512] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[    6.408581] sprdwl:sprdwl_get_fw_info length mismatch: len_count=83, r_len=89
[    6.408646] sprdwl:sprdwl_get_fw_info, drv_version=1, fw_version=2, compat_ver=0
[    6.408672] sprdwl:chip_model:0x2355, chip_ver:0x0
[    6.408691] sprdwl:fw_ver:0, fw_std:0x7f, fw_capa:0x120f7f
[    6.408711] sprdwl:mac_addr:e0:51:d8:20:e3:78
[    6.408732] sprdwl:credit_capa:TX_WITH_CREDIT
[    6.408748] sprdwl:ott support:0
[    6.450467] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[    9.327151] sprdwl:ctx_id = 0, sm_state = 4, bssid =ff:ff:ff:ff:ff:ff
[    9.327213] sprdwl:ctx_id = 0, sm_state = 4, bssid =ff:ff:ff:ff:ff:ff

after the second start
lspci shortened something

01:00.0 Non-Volatile memory controller: Sandisk Corp Device 0100

Logs

[    1.271114] pci 0000:01:00.0: BAR 0: error updating (0xf4200004 != 0xffffffff)
[    1.271145] pci 0000:01:00.0: BAR 0: error updating (high 0x00000000 != 0xffffffff)
[    1.271210] pci 0000:01:00.0: BAR 4: error updating (0xf4204004 != 0xffffffff)
[    1.271239] pci 0000:01:00.0: BAR 4: error updating (high 0x00000000 != 0xffffffff)
[    1.325205] nvme 0000:01:00.0: of_irq_parse_pci: failed with rc=134
[    1.325827] nvme 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible
[    1.623209] mmc1: tuning execution failed: -5
[    1.623239] mmc1: error -5 whilst initialising SD card
[    1.749530] mmc1: tuning execution failed: -5
[    1.903412] WCN_ERR: gpio chip_en request err: 27
[    6.725763] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[    6.733946] wifi ini path = /lib/firmware/wifi_2355b001_1ant.ini
[    6.736391] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[    6.750956] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[    6.760186] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[    6.774760] sprdwl:sprdwl_get_fw_info length mismatch: len_count=83, r_len=89
[    6.774824] sprdwl:sprdwl_get_fw_info, drv_version=1, fw_version=2, compat_ver=0
[    6.774851] sprdwl:chip_model:0x2355, chip_ver:0x0
[    6.774869] sprdwl:fw_ver:0, fw_std:0x7f, fw_capa:0x120f7f
[    6.774889] sprdwl:mac_addr:e0:51:d8:20:e3:78
[    6.774908] sprdwl:credit_capa:TX_WITH_CREDIT
[    6.774924] sprdwl:ott support:0
[    6.819560] sprdwl:__sprdwl_cmd_getbuf cant't get vif, ctx_id: 0
[   10.308546] sprdwl:ctx_id = 0, sm_state = 4, bssid =ff:ff:ff:ff:ff:ff
[   10.308636] sprdwl:ctx_id = 0, sm_state = 4, bssid =ff:ff:ff:ff:ff:ff

I looked for an error related to the line:

pci 0000:01:00.0: BAR 4: error updating (0xf4204004 != 0xffffffff)

from what I found it is simply that linux tries to change the disk address but fails to change it, so it turns it off, they then fixed it by recompiling the kernel
https://bugzilla.kernel.org/show_bug.cgi?id=43331

one question because I know why the system wants to assign it the address 0xffffffff, but shouldn’t it be some other address?

Just a note:
I am running a 3b as well, and reading nvme without issue now. My 16GB Kingston did not work, but my already formatted toshiba 256GB is working without complaint. Maybe try another ssd? or try creating a partition table on another machine and see if it works?

I don’t have 3 SSD, the disks have been tested and are functional, I will try to create a partition on this disk

I think the problem is with my sbc computer. I recently tried other official systems from Orange Pi and none of them work, today I tried to directly install the system on the m.2 nvme disk using an balena etcher and an nvme usb adapter. the disk is no longer detected (it was at the beginning of this entry, additionally, the disk was connected to the sbc computer for a long time ).

These orange pis are sketchy, lol. I have mine reading and writing to nvme just fine, but can’t get it to boot from there shrug

may be the partition is not detectable to windows?
did you try plug the disk to your android mobile phone through OTG?
I found it useful when the disk is not detected in window after flashing.
Just format it in android and have another try~

Windows is not able to read ext4 partitions. Same like MacOS.

This depends on device / SBC. Not every device is able to do so.

it’s not that it didn’t detect the partition in disk management, it just didn’t detect the disk at all, it said that the drive was empty or something like that

As said windows is not able to handle ext4 at all. Therefore partitions could be shown as empty if partition is located on the whole disk.

where you didn’t detect it? in the Windows? or Android? or Linux?
We might need to clarify whether it is a hardware fault or partition table problem first I think :thinking:

em… actually I used Ext2FSD in Windows to read the ext4 partition if it is absolutely necessary…
but this seems kinda off-topic :sweat_smile:

Yeah I assumed it was just a limitation of the hardware. Works just fine on my Pi4 when I push to nvme (over usb).