PINE64
PCIE SATA controller ASM1062 problems or software - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98)
+--- Forum: RockPro64 Hardware and Accessories (https://forum.pine64.org/forumdisplay.php?fid=102)
+--- Thread: PCIE SATA controller ASM1062 problems or software (/showthread.php?tid=7538)

Pages: 1 2 3 4


RE: PCIE SATA controller ASM1062 problems or software - Nikolay_Po - 06-02-2019

The black have better heatsink.

As for o-rings, if they deattached on both sides it means the trace which was connected to o-ring is broken. You may look around the missed o-rings and find disconnected trace. In such cases I'm scratching the coating of the trace and trying to make the trace copper clean from coating closer to the pin but keep the coating at surrounding ground and another traces. When broken trace is scratched and is clear, I'm soldering a thinnest wire from a strand right over the trace and the pin. This way the trace become connected to it's pin even if o-ring is absent.



About the RAID. Here in the last log are these records:

Code:
[    2.809456] ahci 0000:01:00.0: version 3.0
[    2.809468] ahci 0000:01:00.0: enabling device (0000 -> 0002)
[    2.809650] md: multipath personality registered for level -4
[    2.813999] md: raid0 personality registered for level 0
[    2.832249] md: raid1 personality registered for level 1
[    2.851691] md: raid6 personality registered for level 6
[    2.862482] md: raid5 personality registered for level 5
[    2.873154] md: raid4 personality registered for level 4
[    2.897874] md: raid10 personality registered for level 10
[    3.550509] EXT4-fs (mmcblk0p7): 2 orphan inodes deleted
[    3.558010] EXT4-fs (mmcblk0p7): recovery complete
[    3.577286] EXT4-fs (mmcblk0p7): mounted filesystem with writeback data mode. Opts: (null)

Rigth after AHCI device enable the messages from "md", Multiply Devices, aka Linux Software RAID are present.
May be your drives formerly were a part of software RAID? The file system look mounted earlier than when you booted with one drive active.

It will be better to debug in future test to increase debug level. To do that, you need to add a kernel parameter loglevel=6 into the boot configuration file.
The file is in /linux-root/boot/extlinux directory, "extlinux.conf". You need to add loglevel=6 into the line with kerner parameters on the flash drive:

original (example)
Code:
append rw panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 root=LABEL=linux-root rootwait rootfstype=ext4

modified (example, look at the end of line)

Code:
append rw panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 root=LABEL=linux-root rootwait rootfstype=ext4 loglevel=6


If I'm not mistaken, the debug log you will get will contain much more information (level 6 is INFO level) about what is happening during a boot.


RE: PCIE SATA controller ASM1062 problems or software - vecnar - 06-02-2019

(06-02-2019, 01:39 PM)Nikolay_Po Wrote: The black have better heatsink.

As for o-rings, if they deattached on both sides it means the trace which was connected to o-ring is broken. You may look around the missed o-rings and find disconnected trace. In such cases I'm scratching the coating of the trace and trying to make the trace copper clean from coating closer to the pin but keep the coating at surrounding ground and another traces. When broken trace is scratched and is clear, I'm soldering a thinnest wire from a strand right over the trace and the pin. This way the trace become connected to it's pin even if o-ring is absent.



I ordered black one but it is from france so not sure how long it will take them to deliver.
I looked at trace but it is too small for me to see anything, with my double vision now it makes it even worse. And as i remember cleaning it some were detaching and i was just soldering them back in so i am not sure which ones do not have good connection. I will leave it until new one arrives but i will try debug logging and update you when i receive the card.
I think software raid is part of omv functionality, i definitely didn't have raid setup as these were new drives.
Thanks a lot for all the help so far!


RE: PCIE SATA controller ASM1062 problems or software - vecnar - 06-09-2019

Hello Nikolay,

I received the card and was doing tests with it until i decided to change mounting bracket as the one it arrived didn't have a short one. I was going crazy as i thought it is position that was causing it to not have good contacts and hdds were not showing after boot. I was changing angle to apply a bit more pressure on contact on one side of the pcie slot or the other, removed ground wire and to see if contact to case made any difference but couldn't find the pattern when it worked. When i was close to giving up i inserted sd card with armbian and it booted fine and after i inserted sd card with omv and it booted as well. So it reproduced the same behavior as with ASM1062 card but i can't guarantee that as now i have level 6 logging and previously i didn't have this.
Previous issue from visual point of view, plug power plug in ac socket and monitor sata card leds, if it blinked only once or 1 long and 3 short but quick and nothing after it meant hdds were not recognized. Leds would start blinking after a few moments if the were recognized. Reboot a few times would solve the problem.
Current scenario from visual point of view, plug power plug in ac socket, and notice that leds do not even blink once. Lights start blinking when hdds are recognized. Reboot 3-4 times didn't resolve the problem. Booting to armbian resolved the problem.
Attached log contains below entries
Code:
[    3.152067] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout!
[    3.155330] rockchip-pcie: probe of f8000000.pcie failed with error -110

I searched them online and found a thread on git
https://github.com/rockchip-linux/kernel/issues/116
and it refered to below patch
https://github.com/nuumio/linux-kernel/commit/5a65b17686002dc84d461bffa324a2cb68e67aee

I tried leaving nas turned off for long time but can't reproduce it the problem as  easily as i was with old sata card. But powering it down now, disconnecting from power, pressing turnon button a few times and pluging ac cord back into socket reproduced the problem. Restarted 3 times but no fix, disconnected usb dvb-t card and rebooted and i could see that reboot was quicker and i saw the lights flashing right away. Connected card back and tried to reproduce the same but couldn't. I wasn't using usb dvb-t card with old sata card.

Below are just the throughput tests i did.

I tested throughput of pcie card and as it is verison 1 i got 250MB/s of write speed from ram to ssd disk using large block size.
Code:
time dd if=/dev/zero of=/srv/dev-disk-by-label-ssd/temp1/dd.file  bs=2G  count=1  oflag=dsync

Testing write speed to wd red using large block size i got 126 MB/s
Testing throughput between 2 wd red drives connected to same sata controller I got 84 MB/s
The above were done with 1 GB block size so it is not real performance but when using rsync and large files i got 58 MB/s. Same transfer speeds over cif shares on lan.


RE: PCIE SATA controller ASM1062 problems or software - Nikolay_Po - 06-12-2019

Hi, Vecnar. I've got mine RockPro64 and SATA card. It works flawlessly with USB3.0-to-SATA cradle adapter with single 3TB HDD. I bought the SATA cables only in the evening today. Have none time to test right now.
It is interesting that PCIE is failing 500us after file system on SD card starts to operate:

Code:
[    2.865794] EXT4-fs (mmcblk0p7): mounted filesystem with writeback data mode. Opts: (null)
[    2.870305] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout!
[    2.870559] rockchip-pcie: probe of f8000000.pcie failed with error -110

It looks like hardware problem. Bad slot contact, bad card placing, bad power regulator or similar.
I checked the schematic of SATA board from Pine64. It has linear voltage regulator for 1.25V supply instead of usage of an inductor L2. Nothing wrong. The regulator AMS1117 seems to have enough current and dissipation to supply ASM1061 chip. So no problem with this card.

Have you tied most fresh images:

0.8.0rc14/stretch-openmediavault-rock64-0.8.0rc14-1134-armhf.img

and

rockpro64-debian-desktop-mrfixit-190531.img

The last one had none difference from mine PC Debian linux (without of a display, only ssh console was used). There was a problems with serial interface for WiFi/Bluetooth module and PCIE simultaneous usage. MicroSD card is serial too. May be you have catch the same kind of problem?


RE: PCIE SATA controller ASM1062 problems or software - Nikolay_Po - 06-13-2019

These two kernel workarounds may be relevant to the case:

PCIe scan bus workaround + MPT3SAS module

RP64 PCIe bus scan crash workaround for 4.20

You need to ensure your release uses the kernel with these two workarounds available and you have set the parameters in /boot/extlinux/extlinux.conf.


RE: PCIE SATA controller ASM1062 problems or software - vecnar - 06-13-2019

Hello Nikolay,
Congratulations on getting your item and that it is working without any problems!

I haven't had any problems with mine since the last time and the only way i can reproduce it is by moving pcie card slightly to one side today. It wasn't the case the last time as the card bracket was screwed hard and no movements bar sd card change which applies a slight pressure on the board but as it is screwed in to metal case it shouldn't made any difference.
Quote:You need to ensure your release uses the kernel with these two workarounds available and you have set the parameters in /boot/extlinux/extlinux.conf.
I really want to try to reproduce with new sata card consistently first. I do not know how to apply any changes to kernel and I would like to find out if my current kernel has those patches or not. How do i verify it, according to this post by hackerb9 ?
Code:
apt source linux
looked for some added lines with plus from https://github.com/nuumio/linux-kernel/commit/5a65b17686002dc84d461bffa324a2cb68e67aee
# searched for "pcie_rk_bus_scan_delay=" but couldn't find
nano /linux-4.9.168/Documentation/kernel-parameters.txt
#searched for "bus_scan_delay" but no entries found
nano /linux-4.9.168/drivers/pci/host/pcie-rockchip.c
I tried the above steps but not sure if it downloaded the correct version. I tried to do the same on armbian but on first step it gave me error "You must put some 'source' URIs in your sources.list". I tried to uncomment dsc from /etc/apt/sources.list and run apt-get update and apt source linux it downloaded source but i couldn't find any /drivers/pci/host directory. Any advice on how else i can identify kernel has this fix or not?


RE: PCIE SATA controller ASM1062 problems or software - Nikolay_Po - 06-15-2019

Try to start from microSD card with completely new image.