SATA and port multiplier?

Started by eas, October 05, 2013, 11:31:03 PM

Previous topic - Next topic

eas

Does the A20 board work with a SATA port multiplier in Linux? My understanding is that port multipliers weren't supported by earlier versions of the Allwinner SoC, but haven't been able to figure out if that has changed.

I'd like to replace the Pogoplug2 I'm using as my backup server with something that has more memory and SATA, but I'd really like to be able to hook 2-3 disks up through SATA. GigE would be nice too, but the backup is connected the clients over WiFi and sends stuff out over my cable modem connection, so fast network connectivity isn't as important, but SATA would be nice for speeding up backup maintenance tasks, transferring between drives, etc.

progmetalbg

I suppose nobody tried that on A20-OLinuXino.
You can check the SATA section in "A20 User Manual" on page 822:
http://dl.linux-sunxi.org/A20/

eas

Thanks. I looked at the A20 user manual and couldn't tell one way or another.  Elsewhere, people have suggested that the Cubieboard2 won't work with a SATA port multiplier, which I'd think would be driven by a limitation of the SoC or drivers, so my hopes are not high at this point that OLinuXino will work with a port multiplier.

Steph.brette


mbear345

#4
Quote from: eas on October 07, 2013, 01:52:20 AM
Elsewhere, people have suggested that the Cubieboard2 won't work with a SATA port multiplier, which I'd think would be driven by a limitation of the SoC or drivers, so my hopes are not high at this point that OLinuXino will work with a port multiplier.

Hi, I got a Lime2 (A20-OLinuXIno-LIME2) and I've tried with a chinese eSata port multibay device which works well with my CuBox-i4Pro. It has i.MX6 Quad chip. In dmesg, there is a text: ata1.15: Port Multiplier 1.2, 0x197b:0x0325 r0, 5 ports, feat 0x5/0xf
So this device didn't work with Lime2 for me the controller/OS sees only the first SATA drive. :(

But ... then I've found this promising: http://forum.lemaker.org/thread-9207-1-1.html

mbear345

Quote from: mbear345 on December 30, 2015, 08:10:36 PM
But ... then I've found this promising: http://forum.lemaker.org/thread-9207-1-1.html

So it is working with my A20-OLinuXIno-LIME2  8)
Build your own kernel with modification in <kernel source>/drivers/ata/sw_ahci_platform.c" file suggested by previous. Do not forget to set "CONFIG_SATA_PMP=y" in kernel config.

And voilĂ , all four SATA disk are visible:

root@lime2:~# dmesg | grep ata1
[    1.711316] ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 88
[    2.264223] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    2.271038] ata1.15: Port Multiplier 1.2, 0x197b:0x0325 r0, 5 ports, feat 0x5/0xf
[    2.282333] ata1.00: hard resetting link
[    2.634937] ata1.00: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
[    2.641475] ata1.01: hard resetting link
[    3.014866] ata1.01: SATA link up 1.5 Gbps (SStatus 113 SControl 320)
[    3.021979] ata1.02: hard resetting link
[    3.384927] ata1.02: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
[    3.387879] ata1.03: hard resetting link
[    3.734917] ata1.03: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
[    3.737868] ata1.04: hard resetting link

root@lime2:~# cat /proc/partitions
major minor  #blocks  name

179        0    7782400 mmcblk0
179        1    7781376 mmcblk0p1
   8       16 2930266584 sdb
   8       17 2930265543 sdb1
   8       32 1465138584 sdc
   8       48 1465138584 sdd
   8        0 2930266584 sda
   8        1 2930265088 sda1

root@lime2:~# uname -a
Linux lime2 3.4.110-sun7i #4 SMP PREEMPT Wed Dec 30 22:12:13 CET 2015 armv7l armv7l armv7l GNU/Linux


freedomlives

Quote from: mbear345 on December 30, 2015, 11:41:05 PM

And voilĂ , all four SATA disk are visible:

What sort of performance do you get on these drives?  Are you using them for software RAID?

mbear345

Quote from: freedomlives on January 19, 2016, 09:10:53 PM
What sort of performance do you get on these drives?  Are you using them for software RAID?
Sorry, I haven't measured yet.
Yes I am there is a RAID1 of 2 HDDs and there are 2 HDDs without RAID:

md1 : active raid1 sdc[0] sdd[1]
      1465007360 blocks super 1.2 [2/2] [UU]

root@lime2:~# cat /proc/partitions
   8       48 1465138584 sdd
   8        0 2930266584 sda
   8        1 2930265088 sda1
   8       16 2930266584 sdb
   8       17 2930265543 sdb1
   8       32 1465138584 sdc
   9        1 1465007360 md1