Bananian

SATA port multiplier support

107 45381
Well, as far as I can see, it works!
I can see both drives of the enclosure, I can even do smartctl on both drives with sensible results. I had connected them via USB yesterday and created a RAID with mdadm. This one is even up an running when connected via SATA/eSATA.

I'm going to test a bit and will report any problems. But I would recommend to change kernel sources for the banana / A20.

Thanks and greetings
Richard

... as a proof: an excerpt of my dmesg:
  1. [  480.897837] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  2. [  480.922657] ata1.15: Port Multiplier 1.1, 0x1095:0x5744 r33, 3 ports, feat 0x1/0x9
  3. [  480.944899] ata1.00: hard resetting link
  4. [  481.508521] ata1.00: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
  5. [  481.529654] ata1.01: hard resetting link
  6. [  482.098589] ata1.01: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
  7. [  482.120068] ata1.02: hard resetting link
  8. [  482.488042] ata1.02: SATA link down (SStatus 0 SControl 320)
  9. [  482.554313] ata1.00: ATA-8: TOSHIBA MK5059GSXP, GN001U, max UDMA/100
  10. [  482.577677] ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
  11. [  482.600075] ata1.00: configured for UDMA/100
  12. [  482.675020] ata1.01: ATA-8: WDC WD5000BEVT-22A0RT0, 01.01A01, max UDMA/133
  13. [  482.699046] ata1.01: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
  14. [  482.724720] ata1.01: configured for UDMA/133
  15. [  482.743045] ata1: EH complete
  16. [  482.765135] scsi 0:0:0:0: Direct-Access     ATA      TOSHIBA MK5059GS GN00 PQ: 0 ANSI: 5
  17. [  482.793727] sd 0:0:0:0: [sdd] 976773168 512-byte logical blocks: (500 GB/465 GiB)
  18. [  482.818886] sd 0:0:0:0: [sdd] 4096-byte physical blocks
  19. [  482.825954] scsi 0:1:0:0: Direct-Access     ATA      WDC WD5000BEVT-2 01.0 PQ: 0 ANSI: 5
  20. [  482.869878] sd 0:1:0:0: [sde] 976773168 512-byte logical blocks: (500 GB/465 GiB)
  21. [  482.874298] sd 0:1:0:0: [sde] Write Protect is off
  22. [  482.878439] sd 0:1:0:0: [sde] Mode Sense: 00 3a 00 00
  23. [  482.894385] sd 0:1:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
  24. [  482.912381]  sde: sde1
  25. [  482.953485] sd 0:1:0:0: [sde] Attached SCSI disk
  26. [  482.970938] sd 0:0:0:0: [sdd] Write Protect is off
  27. [  482.975108] sd 0:0:0:0: [sdd] Mode Sense: 00 3a 00 00
  28. [  482.983373] sd 0:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
  29. [  483.024915] sd 1:0:0:0: Attached scsi generic sg0 type 0
  30. [  483.033667]  sdd: sdd1
  31. [  483.064705] sd 0:0:0:0: Attached scsi generic sg1 type 0
  32. [  483.068295] sd 0:0:0:0: [sdd] Attached SCSI disk
  33. [  483.110826] sd 0:1:0:0: Attached scsi generic sg2 type 0
Copy the Code

pgk  
I guess it would be interesting if LeMaker can find out from AllWinner if indeed A20 is supposed to support PMP or if there are any bugs which meant it got disabled in the driver.

right now, I guess, they just forgot or just didn't care...

olihey  
Hej, I can confirm this although didn't test heavily. I went and bought a 1-to-5 SATA port multiplier from DeLock (http://www.delock.de/produkte/G_ ... html?setLanguage=en), removed the "AHCI_HFLAG_NO_PMP" from the latest kernel in <kernel source>/drivers/ata/sw_ahci_platform.c and it seem to work just fine.
  1. root@bananapi:~# dmesg | grep ata
  2. [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
  3. [    0.000000] Memory policy: ECC disabled, Data cache writealloc
  4. [    0.000000]       .data : 0xc08a0000 - 0xc0913f30   ( 464 kB)
  5. [    0.388075] libata version 3.00 loaded.
  6. [    1.524395] ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 88
  7. [    7.114353] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  8. [    7.134142] ata1.15: Port Multiplier 1.1, 0x1095:0x3726 r23, 6 ports, feat 0x1/0x9
  9. [    7.155904] ata1.00: hard resetting link
  10. [    7.514069] ata1.00: SATA link down (SStatus 0 SControl 310)
  11. [    7.529472] ata1.01: hard resetting link
  12. [    7.773299] ata1.01: failed to read SCR 2 (Emask=0x40)
  13. [    7.788636] ata1.01: COMRESET failed (errno=-5)
  14. [    7.803945] ata1.01: failed to read SCR 0 (Emask=0x40)
  15. [    7.820870] ata1.01: reset failed (errno=-85), retrying in 10 secs
  16. [   17.542433] ata1.01: reset failed, giving up
  17. [   17.556214] ata1.15: hard resetting link
  18. [   17.913825] ata1.15: SATA link down (SStatus 0 SControl 300)
  19. [   20.070796] ata1.15: failed to read PMP GSCR[0] (Emask=0x100)
  20. [   20.087193] ata1.15: PMP revalidation failed (errno=-5)
  21. [   22.922086] ata1.15: hard resetting link
  22. [   28.524603] ata1.15: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  23. [   28.540665] ata1.01: hard resetting link
  24. [   28.904056] ata1.01: SATA link down (SStatus 0 SControl 320)
  25. [   28.919061] ata1.02: hard resetting link
  26. [   29.284053] ata1.02: SATA link down (SStatus 0 SControl 320)
  27. [   29.299074] ata1.03: hard resetting link
  28. [   29.664834] ata1.03: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  29. [   29.680578] ata1.04: hard resetting link
  30. [   30.044832] ata1.04: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  31. [   30.060686] ata1.05: hard resetting link
  32. [   30.424830] ata1.05: SATA link up 1.5 Gbps (SStatus 113 SControl 320)
  33. [   30.449983] ata1.03: ATA-8: ST1000LM024 HN-M101MBB, 2AR10001, max UDMA/133
  34. [   30.469143] ata1.03: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
  35. [   30.492052] ata1.03: configured for UDMA/133
  36. [   30.545150] ata1.04: ATA-8: WDC WD3200BJKT-00F4T0, 11.01A11, max UDMA/133
  37. [   30.564076] ata1.04: 625142448 sectors, multi 0: LBA48 NCQ (depth 31/32)
  38. [   30.583372] ata1.04: configured for UDMA/133
  39. [   30.596085] ata1: EH complete
Copy the Code

Thank you for testing!

Reply 15# olihey


   That's really cool! Did you re-compile the whole kernel or did you just alter that and recompile just that file? Do you have some basic steps you went through to achieve that?

olihey  
Reply 17# techman83

I used this guide to get and compile the kernel. One thing to note is, when you enabled the PMP support I couldn't access the hard drive anymore when I didn't use the multiplier. No idea why. Just some heads up.

Also, I don't use the multiplier I bought (the DeLock) anymore, since it was getting pretty hot and used 6 watts in standy by. That's way to much for my low power NAS I build, which uses only 11 watts in standy by with 4 HD's connected (al in sleep) and a Gigibit switch, USB hub and a Wireless access point

sammo  
Reply 18# olihey

You can save even more power if your usb hub support individual per port power switch.

https://github.com/codazoda/hub-ctrl.c

I have 4 HD connected and I cut the power off when I don't need them.

As it seems, PMP is not enabled in Bananian 14.09. Questions:
1. is there a reason why?
2. Which are the correct kernel sources?
3. What are the kernel tweaks introduced in 14.09 ?

Thanks and greetings
Richard

You have to log in before you can reply Login | Sign Up

Points Rules