Using a SATA Card with MOX B

Hello,
I received my MOX a couple of months ago and was very pleased with it. However, I didn’t really buy it for its wi-fi capabilities, but for the fact that it has a powerful CPU, plenty of RAM and most importantly a PCI Express Mini card slot (on the -B and -G expansions).

So, wanting to use the MOX as a NAS, I opted to purchase a SATA card with 2 ports and have installed it after carefully disassembling the MOX. After installation, I went into LuCI and installed the kmod-ata-ahci package and rebooted.

However, I have encountered a problem: the SATA card uses an ASMedia ASM1062 controller. This device has quirks, which means that if I try to use any drive with the card it will cause the MOX to freeze, after a short while it will reboot and keep looping until the drive is disconnected.

Apparently the solution is to prevent SCSI command passthrough using a kernel parameter (libata.atapi_passthru16=0).

Is there a way of changing the boot parameters for the MOX so that this parameter can be added and I can use my drives?

1 Like

Ah, I can see that the Omnia also includes this controller and had issues, resulting in the package asm1062-fix being created.

I’ll give that a try.

No, having the drive (a Kingston A400 SSD) connected still makes it freeze and boot loop. :frowning:

I guess I’ll need to read the serial console when that happens…

Up to this date I did not know, that mPCIE SATA-Cards even exist. Good to know.

OK, now that I have been able to get hold of a serial adapter that supports 1.8V, I am able to provide the following trace:
[ 129.298685] Synchronous External Abort: synchronous external abort (0x96000210) at 0xffffff8008b7d130
[ 129.308491] Internal error: : 96000210 [#1] SMP
[ 129.313262] Modules linked in: pppoe ppp_async ath9k(O) pppox ppp_generic nf_conntrack_ipv6 lz4 iptable_nat ipt_REJECT ipt_MASQUERADE ebtae
[ 129.388529] iptable_filter ipt_ECN ip_tables hidp hci_uart ebtables ebt_vlan ebt_stp ebt_redirect ebt_pkttype ebt_mark_m ebt_mark ebt_limn
[ 129.463643] ip6table_mangle ip6table_filter ip6_tables x_tables ifb sit ip6_tunnel tunnel6 tunnel4 ip_tunnel snd_compress snd_pcm_oss snd)
[ 129.490407] Process scsi_eh_0 (pid: 845, stack limit = 0xffffff8009af8000)
[ 129.497572] CPU: 1 PID: 845 Comm: scsi_eh_0 Tainted: G O 4.14.141 #0
[ 129.505466] Hardware name: CZ.NIC Turris Mox Board (DT)
[ 129.510975] task: ffffffc01e27ee00 task.stack: ffffff8009af8000
[ 129.517237] PC is at ahci_scr_read+0x5c/0x88
[ 129.521662] LR is at sata_scr_read+0x54/0x78
[ 129.526126] pc : [] lr : [] pstate: 80000145
[ 129.533859] sp : ffffff8009afbb40
[ 129.537415] x29: ffffff8009afbb40 x28: 0000000000000000
[ 129.542956] x27: ffffffc01d9fe090 x26: 0000000000000000
[ 129.548519] x25: ffffffc01d9fc000 x24: 0000000000000140
[ 129.553919] x23: 0000000000000001 x22: ffffffc01d9fde80
[ 129.559505] x21: ffffff8009afbd10 x20: ffffffc01d9fe108
[ 129.564911] x19: ffffffc01d9fde80 x18: 0000000000000080
[ 129.570225] x17: 0000007fb0602110 x16: ffffff80081c4738
[ 129.576078] x15: 00005f9010000000 x14: 0000000000000000
[ 129.581496] x13: 0000000000000000 x12: 0000000000000000
[ 129.586899] x11: 0000000000000000 x10: 0000000000000000
[ 129.592305] x9 : 0000000000000000 x8 : 0000000000000000
[ 129.597802] x7 : ffffff8009afbbd8 x6 : 0000000000000001
[ 129.603475] x5 : ffffffc01d9fde80 x4 : ffffff80087ade48
[ 129.608972] x3 : 0000000000000100 x2 : ffffff8009afbbd8
[ 129.614557] x1 : ffffff8008b7d130 x0 : ffffff8008b7d000
[ 129.619790] Call trace:
[ 129.622315] Exception stack(0xffffff8009afba00 to 0xffffff8009afbb40)
[ 129.629069] ba00: ffffff8008b7d000 ffffff8008b7d130 ffffff8009afbbd8 0000000000000100
[ 129.636900] ba20: ffffff80087ade48 ffffffc01d9fde80 0000000000000001 ffffff8009afbbd8
[ 129.645464] ba40: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 129.653754] ba60: 0000000000000000 0000000000000000 0000000000000000 00005f9010000000
[ 129.662007] ba80: ffffff80081c4738 0000007fb0602110 0000000000000080 ffffffc01d9fde80
[ 129.670171] baa0: ffffffc01d9fe108 ffffff8009afbd10 ffffffc01d9fde80 0000000000000001
[ 129.678463] bac0: 0000000000000140 ffffffc01d9fc000 0000000000000000 ffffffc01d9fe090
[ 129.686708] bae0: 0000000000000000 ffffff8009afbb40 ffffff80084c139c ffffff8009afbb40
[ 129.694959] bb00: ffffff80084d98c4 0000000080000145 ffffff8008a18288 00000000000001c0
[ 129.703211] bb20: ffffffffffffffff 0000000100000000 ffffff8009afbb40 ffffff80084d98c4
[ 129.711471] [] ahci_scr_read+0x5c/0x88
[ 129.716991] [] ata_eh_link_autopsy+0x44/0x950
[ 129.723278] [] ata_eh_autopsy+0x2c/0xe8
[ 129.728979] [] sata_pmp_error_handler+0x2c/0x8f0
[ 129.735418] [] ahci_error_handler+0x3c/0x70
[ 129.741505] [] ata_scsi_port_error_handler+0x18c/0x420
[ 129.748470] [] ata_scsi_error+0x80/0xa0
[ 129.754222] [] scsi_error_handler+0x80/0x2f8
[ 129.760296] [] kthread+0x120/0x130
[ 129.765485] [] ret_from_fork+0x10/0x18
[ 129.771054] Code: d503201f 52800781 8b21c061 8b010001 (b9400021)
[ 129.777506] —[ end trace 8751295cb22048d3 ]—
[ 129.789974] Kernel panic - not syncing: Fatal exception
[ 129.795479] SMP: stopping secondary CPUs
[ 129.799532] Kernel Offset: disabled
[ 129.803262] CPU features: 0x0802008
[ 129.806936] Memory Limit: none
[ 129.814474] Rebooting in 3 seconds…

For Omnia it was one of the more popular ways to use the third slot (two are taken by WiFi). There was this thing in the crowdfunding campaign: https://www.discomp.cz/turris-omnia-nas-kit-pro-modely-rtrom01-xx-krabice-radic-kabely-_d81320.html

2 Likes

@vcunat, thanks for the info.