EspressoBin & mPCI-E Dual SATA

This is for ARMv8 based devices

EspressoBin & mPCI-E Dual SATA

Postby tparys » Wed Dec 20, 2017 7:10 pm

So, I've found a reliable fault when trying to use a dual SATA mPCI-E card. http://www.mfactors.com/pm1061-sata-iii-to-mini-pcie-2-0-adapter/

I'm using a recent kernel ...

$this->bbcode_second_pass_code('', '
[alarm@alarm ~]$ uname -a
Linux alarm 4.14.3-1-ARCH #1 SMP Thu Nov 30 19:03:08 MST 2017 aarch64 GNU/Linux
')

And the SATA card shows up on the PCI bus ...

$this->bbcode_second_pass_code('', '
[alarm@alarm ~]$ lspci -k
00:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
Subsystem: ASMedia Technology Inc. Device 1060
Kernel driver in use: ahci
')

Plugging in a SATA drive (850 Pro 1 TB) looks initially promising ...

$this->bbcode_second_pass_code('', '
[ 133.930305] ata2: exception Emask 0x10 SAct 0x0 SErr 0x4050000 action 0xe frozen
[ 133.937525] ata2: irq_stat 0x00000040, connection status changed
[ 133.943822] ata2: SError: { PHYRdyChg CommWake DevExch }
[ 133.949384] ata2: hard resetting link
[ 134.892300] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 134.900196] ata2.00: supports DRM functions and may not be fully accessible
[ 134.913029] ata2.00: ATA-9: Samsung SSD 850 PRO 1TB, EXM02B6Q, max UDMA/133
[ 134.920226] ata2.00: 2000409264 sectors, multi 1: LBA48 NCQ (depth 31/32), AA
[ 134.932756] ata2.00: supports DRM functions and may not be fully accessible
[ 134.949548] ata2.00: configured for UDMA/133
[ 134.953659] ata2: EH complete
[ 134.957444] scsi 1:0:0:0: Direct-Access ATA Samsung SSD 850 2B6Q PQ: 0 ANSI: 5
[ 134.968759] sd 1:0:0:0: [sda] 2000409264 512-byte logical blocks: (1.02 TB/954 GiB)
[ 134.976988] sd 1:0:0:0: [sda] Write Protect is off
[ 134.981650] sd 1:0:0:0: Attached scsi generic sg0 type 0
[ 134.986985] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 135.000936] sda: sda1 sda2 sda3
[ 135.006646] sd 1:0:0:0: [sda] supports TCG Opal
[ 135.011351] sd 1:0:0:0: [sda] Attached SCSI disk
[alarm@alarm ~]$ ls -l /dev/sda
brw------- 1 root root 8, 0 Nov 15 02:36 /dev/sda
')

And then it all goes sideways

$this->bbcode_second_pass_code('', '
[ 165.722338] Synchronous External Abort: synchronous external abort (0x96000210) at 00
[ 165.731433] Internal error: : 96000210 [#1] SMP
[ 165.736457] Modules linked in: aes_ce_blk crypto_simd aes_ce_cipher crc32_ce crct10dif_ce ghash_ce ae6
[ 165.752902] CPU: 1 PID: 90 Comm: scsi_eh_1 Not tainted 4.14.3-1-ARCH #1
[ 165.759815] Hardware name: Globalscale Marvell ESPRESSOBin Board (DT)
[ 165.766466] task: ffff800039144600 task.stack: ffff000009300000
[ 165.772672] PC is at ahci_scr_read+0x64/0xb0
[ 165.776802] LR is at sata_scr_read+0x8c/0xa8
[ 165.781202] pc : [<ffff0000086592d4>] lr : [<ffff0000086406ec>] pstate: 80000145
[ 165.788747] sp : ffff000009303bd0
[ 165.792430] x29: ffff000009303bd0 x28: 0000000000000000
[ 165.797733] x27: ffff8000391b0000 x26: ffff8000391b2110
[ 165.803393] x25: ffff8000391b2098 x24: ffff8000391b36b0
[ 165.808874] x23: 0000000000000140 x22: ffff8000391b1d80
[ 165.814355] x21: ffff8000391b1d80 x20: 0000000000000001
[ 165.819836] x19: ffff000009303cb8 x18: 0000000000000000
[ 165.825407] x17: 000000000000023e x16: 0000000000000000
[ 165.830619] x15: 0000000000000000 x14: 0000000000000000
[ 165.836279] x13: 0000000000000000 x12: 0000000000000000
[ 165.841671] x11: 0000000000000000 x10: 0000000000000000
[ 165.847241] x9 : 0000000000000000 x8 : 0000000000000000
[ 165.852633] x7 : 0000000000000000 x6 : 0000000000000046
[ 165.857935] x5 : ffff8000391b2110 x4 : 00000000001e4482
[ 165.863505] x3 : ffff00000805d1b0 x2 : ffff000009303cb8
[ 165.869076] x1 : 0000000000000030 x0 : 00000000000001b0
[ 165.874737] Process scsi_eh_1 (pid: 90, stack limit = 0xffff000009300000)
[ 165.881476] Call trace:
[ 165.883815] Exception stack(0xffff000009303a90 to 0xffff000009303bd0)
[ 165.890912] 3a80: 00000000000001b0 0000000000000030
[ 165.898909] 3aa0: ffff000009303cb8 ffff00000805d1b0 00000000001e4482 ffff8000391b2110
[ 165.907084] 3ac0: 0000000000000046 0000000000000000 0000000000000000 0000000000000000
[ 165.914991] 3ae0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 165.923077] 3b00: 0000000000000000 0000000000000000 0000000000000000 000000000000023e
[ 165.931253] 3b20: 0000000000000000 ffff000009303cb8 0000000000000001 ffff8000391b1d80
[ 165.939250] 3b40: ffff8000391b1d80 0000000000000140 ffff8000391b36b0 ffff8000391b2098
[ 165.947425] 3b60: ffff8000391b2110 ffff8000391b0000 0000000000000000 ffff000009303bd0
[ 165.955601] 3b80: ffff0000086406ec ffff000009303bd0 ffff0000086592d4 0000000080000145
[ 165.963508] 3ba0: ffff8000391b0000 ffff0000089c9b90 ffffffffffffffff ffff0000080f5c98
[ 165.971682] 3bc0: ffff000009303bd0 ffff0000086592d4
[ 165.976448] [<ffff0000086592d4>] ahci_scr_read+0x64/0xb0
[ 165.982196] [<ffff0000086406ec>] sata_scr_read+0x8c/0xa8
[ 165.987678] [<ffff0000086516f8>] ata_eh_link_autopsy+0x70/0xaa0
[ 165.993698] [<ffff000008652160>] ata_eh_autopsy+0x38/0xf0
[ 165.999270] [<ffff0000086575c0>] sata_pmp_error_handler+0x20/0x48
[ 166.005470] [<ffff00000865bbd0>] ahci_error_handler+0x28/0x90
[ 166.011757] [<ffff000008654538>] ata_scsi_port_error_handler+0x198/0x620
[ 166.018412] [<ffff000008654a48>] ata_scsi_error+0x88/0xc0
[ 166.023895] [<ffff00000861e690>] scsi_error_handler+0xa0/0x598
[ 166.030273] [<ffff0000080e96f0>] kthread+0x138/0x140
[ 166.034865] [<ffff0000080848dc>] ret_from_fork+0x10/0x1c
[ 166.040704] Code: b8745821 34000181 8b21c000 8b000063 (b9400063)
[ 166.046813] ---[ end trace 3be656a01ba752c7 ]---
')

Based on some brief reading, a synchronous external abort looks like the PCI driver is trying to access something that doesn't exist, or isn't at the requested address. But I'm not sure where to go from here.

Any thoughts?
tparys
 
Posts: 1
Joined: Wed Dec 20, 2017 6:49 pm

Re: EspressoBin & mPCI-E Dual SATA

Postby WarheadsSE » Thu Dec 21, 2017 1:28 pm

The first answer here provides some solid insights. I might raise a question on the driver's mailing list.
https://stackoverflow.com/questions/275 ... ort-on-arm

Also see https://patchwork.kernel.org/patch/9650393/
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 12 guests