SATA controller problem
#1
Hi there,

Does anyone know what can be the problem with the controller below?
Code:
01:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)


in dmesg I see 
Code:
[64391.518074] ata1.15: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[64391.518764] ata1.00: hard resetting link
[64392.028586] ata1.00: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[64392.528307] ata1.01: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[64392.863003] ata1.02: SATA link down (SStatus 0 SControl 310)
[64392.870435] ata1.00: configured for UDMA/33
[64392.870474] ata1.00: retrying FLUSH 0xea Emask 0x4
[64392.877776] ata1.01: configured for UDMA/133
[64392.878152] ata1: EH complete
[79828.206213] ata1.00: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[79828.210080] ata1.00: configured for UDMA/33
[79893.003541] ata1.00: failed to read SCR 1 (Emask=0x40)
[79893.003606] ata1.01: failed to read SCR 1 (Emask=0x40)
[79893.003629] ata1.02: failed to read SCR 1 (Emask=0x40)
[79893.003655] ata1.00: exception Emask 0x100 SAct 0x0 SErr 0x0 action 0x6 frozen
[79893.003682] ata1.00: failed command: FLUSH CACHE EXT
[79893.003698] ata1.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 22
                        res 40/00:00:d7:82:24/00:00:00:00:00/e0 Emask 0x4 (timeout)
[79893.003756] ata1.00: status: { DRDY }

and disks are making weird sound of spinning up. 

Any help appreciated  Blush
  Reply
#2
I'm having the same issue but with ASM1166 controller
  Reply
#3
How are the disks being powered? If you're using the PINE64 SATA power cable, make sure you're also using the 12V5A power supply and not the 12V3A one.

Occasional Linux Kernel Contributor, Avid Wiki Updater, Ask Me About Quartz64
Open Hardware Quartz64 Model A TOSLink Adapter
Pi-bus GPIO Extender For ROCKPro64 And Quartz64 Model A
Plebian GNU/Linux
  Reply
#4
I have 6 HDDs which are powered up from the external PSU (provides ~25A (300W PC PSU)). Quartz64 A is powered from it as well.
  Reply
#5
What distribution/kernel version are you using? Also which precise Quartz64 board?

One potential issue on the Quartz64 Model A is that the 3.3V regulator for PCIe only provides up to 10W, so if the card draws more than that through the 3.3V PCIe rail it's going to keep resetting from voltage drop. Another issue is the PCIe reg ranges for which the fix never made it upstream properly, I don't think.

Occasional Linux Kernel Contributor, Avid Wiki Updater, Ask Me About Quartz64
Open Hardware Quartz64 Model A TOSLink Adapter
Pi-bus GPIO Extender For ROCKPro64 And Quartz64 Model A
Plebian GNU/Linux
  Reply
#6
(02-15-2023, 07:58 AM)CounterPillow Wrote: What distribution/kernel version are you using? Also which precise Quartz64 board?
Currently I'm trying with 6.0.12-1-MANJARO-ARM #1 SMP PREEMPT Thu Dec 8 14:18:34 UTC 2022 aarch64 GNU/Linux

Quartz64 A 8Gb

(02-15-2023, 09:42 AM)CounterPillow Wrote: One potential issue on the Quartz64 Model A is that the 3.3V regulator for PCIe only provides up to 10W, so if the card draws more than that through the 3.3V PCIe rail it's going to keep resetting from voltage drop. Another issue is the PCIe reg ranges for which the fix never made it upstream properly, I don't think.

I have a PCIe extension with extra power ports on it. Do you think it's a good idea to try to add power through it?

I tried to search some info related to PCIe reg ranges, but couldn't find any mentions.. Can you please share some links to that?

Thank you!
  Reply
#7
Quote:I have a PCIe extension with extra power ports on it. Do you think it's a good idea to try to add power through it?

Can't hurt to try, if it's from the same power supply.

Quote:I tried to search some info related to PCIe reg ranges, but couldn't find any mentions.. Can you please share some links to that?

https://lore.kernel.org/linux-rockchip/2...omnom.net/

Needs another fix though before it can be applied.

Occasional Linux Kernel Contributor, Avid Wiki Updater, Ask Me About Quartz64
Open Hardware Quartz64 Model A TOSLink Adapter
Pi-bus GPIO Extender For ROCKPro64 And Quartz64 Model A
Plebian GNU/Linux
  Reply
#8
Quote:CounterPillow

Can't hurt to try, if it's from the same power supply.

I tried but unfortunately the behaviour of SATA ports is the same. Dropping the connection all the time irregardless of how many drives is connected - 1 or 6.

Quote:https://lore.kernel.org/linux-rockchip/2...omnom.net/

Needs another fix though before it can be applied.

I think I found the same thread but on different platform https://patchew.org/linux/20221107130157...gi@xff.cz/

Thanks you very much for the tips! Seems that I have to wait and monitor the progress of this issue since my knowledge and skills not allowing me to debug and contribute solution
  Reply
#9
I've updated the system to Linux DietPi 6.1.14 #1 SMP PREEMPT Tue Mar  7 17:05:42 UTC 2023 aarch64 GNU/Linux and all drives are fine except the one that is connected to SATA port 0. I tried to connect different drives (HDD and SSD) to the port 0 but all have the same issue
Code:
[   12.258466] ata1.00: exception Emask 0x11 SAct 0x80 SErr 0x480100 action 0x6 frozen
[   12.259253] ata1.00: irq_stat 0x48000008, interface fatal error
[   12.259804] ata1: SError: { UnrecovData 10B8B Handshk }
[   12.260331] ata1.00: failed command: READ FPDMA QUEUED
[   12.260861] ata1.00: cmd 60/f8:38:08:0a:00/01:00:00:00:00/40 tag 7 ncq dma 258048 in
                        res 40/00:3c:08:0a:00/00:00:00:00:00/40 Emask 0x10 (ATA bus error)
[   12.262409] ata1.00: status: { DRDY }
[   12.262838] ata1: hard resetting link
[   12.738444] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[   12.739821] ata1.00: configured for UDMA/100
[   12.740029] sd 0:0:0:0: [sda] tag#7 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=DRIVER_OK cmd_age=0s
[   12.740073] sd 0:0:0:0: [sda] tag#7 Sense Key : 0x5 [current]
[   12.740102] sd 0:0:0:0: [sda] tag#7 ASC=0x21 ASCQ=0x4
[   12.740133] sd 0:0:0:0: [sda] tag#7 CDB: opcode=0x28 28 00 00 00 0a 08 00 01 f8 00
[   12.740157] I/O error, dev sda, sector 2568 op 0x0:(READ) flags 0x80700 phys_seg 20 prio class 2
[   12.741181] ata1: EH complete
[   12.826448] ata1.00: exception Emask 0x11 SAct 0x6 SErr 0x680100 action 0x6 frozen
[   12.827185] ata1.00: irq_stat 0x48000008, interface fatal error
[   12.827723] ata1: SError: { UnrecovData 10B8B BadCRC Handshk }
[   12.828253] ata1.00: failed command: READ FPDMA QUEUED
[   12.828714] ata1.00: cmd 60/80:08:00:2f:cf/00:00:1d:00:00/40 tag 1 ncq dma 65536 in
                        res 40/00:14:88:2f:cf/00:00:1d:00:00/40 Emask 0x10 (ATA bus error)
[   12.830108] ata1.00: status: { DRDY }
[   12.830585] ata1.00: failed command: READ FPDMA QUEUED
[   12.831067] ata1.00: cmd 60/68:10:88:2f:cf/00:00:1d:00:00/40 tag 2 ncq dma 53248 in
                        res 40/00:14:88:2f:cf/00:00:1d:00:00/40 Emask 0x10 (ATA bus error)
[   12.832586] ata1.00: status: { DRDY }
[   12.832953] ata1: hard resetting link
[   13.306475] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[   13.307369] ata1.00: configured for UDMA/100
[   13.307449] sd 0:0:0:0: [sda] tag#1 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=DRIVER_OK cmd_age=0s
[   13.307465] sd 0:0:0:0: [sda] tag#1 Sense Key : 0x5 [current]
[   13.307474] sd 0:0:0:0: [sda] tag#1 ASC=0x21 ASCQ=0x4
[   13.307484] sd 0:0:0:0: [sda] tag#1 CDB: opcode=0x28 28 00 1d cf 2f 00 00 00 80 00
[   13.307492] I/O error, dev sda, sector 500117248 op 0x0:(READ) flags 0x80700 phys_seg 16 prio class 2
[   13.308412] sd 0:0:0:0: [sda] tag#2 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=DRIVER_OK cmd_age=0s
[   13.308426] sd 0:0:0:0: [sda] tag#2 Sense Key : 0x5 [current]
[   13.308434] sd 0:0:0:0: [sda] tag#2 ASC=0x21 ASCQ=0x4
[   13.308443] sd 0:0:0:0: [sda] tag#2 CDB: opcode=0x28 28 00 1d cf 2f 88 00 00 68 00
[   13.308450] I/O error, dev sda, sector 500117384 op 0x0:(READ) flags 0x80700 phys_seg 13 prio class 2
[   13.309312] ata1: EH complete

If I'm not connecting any drive to SATA0 - everything is fine.
I assume that some fixes was applied to the kernel. Is there a way that I can participate in testing and report any useful info?
  Reply
#10
The reg ranges fix still isn't in but I'm not sure if it's relevant, I bought an ASM1166 and it seems to work fine (though I haven't tried all ports). If you want to test kernels, you can git clone torvalds' linux git tree, grab a config from your running system, put that in .config, run `make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc) bindeb-pkg` and it will spit out a .deb with a kernel in it you can install. I don't know how dietpi handles multiple kernels though.

Occasional Linux Kernel Contributor, Avid Wiki Updater, Ask Me About Quartz64
Open Hardware Quartz64 Model A TOSLink Adapter
Pi-bus GPIO Extender For ROCKPro64 And Quartz64 Model A
Plebian GNU/Linux
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Quartz64 Model A - SATA & USB3 dml-pc 0 1,326 10-13-2022, 07:43 PM
Last Post: dml-pc
  SATA SSD and case? MikeInMass 2 3,870 07-10-2021, 07:30 PM
Last Post: zer0sig

Forum Jump:


Users browsing this thread: 1 Guest(s)