SiL 5744 and recent kernels

The problem

I recently bought a Fantec MR-35DUS2, an external HDD enclosure which sports the Silicon Image 5744 chip. The enclosure supports two 3.5" SATA hard drives and can be connected to the computer using eSATA and USB. You can choose from four possible modes, RAID0, RAID1, JBOD and BIG. JBOD will use your eSATA’s/USB’s port-multiplication-feature to present two disks, the other modes will present a single (possibly large/mirrored) disk. I wanted to use the RAID1 mode. Unfortunately, only USB appeared to work with my Thinkpad T410s. Excerpts from the log when I tried to use the eSATA port looked like this:

Aug 21 14:10:36 ares kernel: [  160.196555] sd 0:0:0:0: Attached scsi generic sg0 type 0
Aug 21 14:10:37 ares kernel: [  161.678509] ata2: hard resetting link
Aug 21 14:10:38 ares kernel: [  161.998032] ata2: SATA link down (SStatus 0 SControl 300)
Aug 21 14:10:38 ares kernel: [  161.998051] ata2: EH complete
Aug 21 14:10:43 ares kernel: [  166.917489] ata5: hard resetting link
Aug 21 14:10:43 ares kernel: [  167.237003] ata5: SATA link down (SStatus 0 SControl 300)
Aug 21 14:10:43 ares kernel: [  167.237022] ata5: EH complete
Aug 21 14:10:44 ares kernel: [  168.846187] ata6: hard resetting link
Aug 21 14:10:45 ares kernel: [  169.337379] ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Aug 21 14:10:45 ares kernel: [  169.338279] ata6.15: Port Multiplier 1.1, 0x1095:0x5744 r33, 2 ports, feat 0x1/0x9
Aug 21 14:10:45 ares kernel: [  169.340570] ata6.00: hard resetting link
Aug 21 14:10:45 ares kernel: [  169.829022] ata6.00: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
Aug 21 14:10:45 ares kernel: [  169.829104] ata6.01: hard resetting link
Aug 21 14:10:46 ares kernel: [  170.148806] ata6.01: SATA link down (SStatus 0 SControl 320)
Aug 21 14:10:46 ares kernel: [  170.149122] ata6.00: ATA-7: External Disk 0, 1.1589, max UDMA/133
Aug 21 14:10:46 ares kernel: [  170.149127] ata6.00: 3907029168 sectors, multi 1: LBA48 NCQ (depth 31/32)
Aug 21 14:10:46 ares kernel: [  170.149351] ata6.00: configured for UDMA/133
Aug 21 14:10:46 ares kernel: [  170.163961] ata6: EH complete
Aug 21 14:10:46 ares kernel: [  170.164112] scsi 5:0:0:0: Direct-Access     ATA      External Disk 0  1.15 PQ: 0 ANSI: 5
Aug 21 14:10:46 ares kernel: [  170.164415] sd 5:0:0:0: Attached scsi generic sg1 type 0
Aug 21 14:10:46 ares kernel: [  170.164421] sd 5:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
Aug 21 14:10:46 ares kernel: [  170.164537] sd 5:0:0:0: [sdb] Write Protect is off
Aug 21 14:10:46 ares kernel: [  170.164602] sd 5:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Aug 21 14:10:46 ares kernel: [  170.165107] ata6.15: hard resetting link
Aug 21 14:10:46 ares kernel: [  170.655081] ata6.15: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Aug 21 14:10:46 ares kernel: [  170.671111] ata6.00: hard resetting link
Aug 21 14:10:47 ares kernel: [  171.162775] ata6.00: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
Aug 21 14:10:47 ares kernel: [  171.162814] ata6.01: hard resetting link
Aug 21 14:10:47 ares kernel: [  171.482416] ata6.01: SATA link down (SStatus 0 SControl 320)
Aug 21 14:10:47 ares kernel: [  171.482862] ata6.00: configured for UDMA/133
Aug 21 14:10:47 ares kernel: [  171.483096] ata6: EH complete
Aug 21 14:10:47 ares kernel: [  171.483240] ata6.15: hard resetting link
Aug 21 14:10:48 ares kernel: [  171.972843] ata6.15: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Aug 21 14:10:48 ares kernel: [  171.988893] ata6.00: hard resetting link
Aug 21 14:10:48 ares kernel: [  172.480427] ata6.00: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
Aug 21 14:10:48 ares kernel: [  172.480465] ata6.01: hard resetting link
Aug 21 14:10:48 ares kernel: [  172.800195] ata6.01: SATA link down (SStatus 0 SControl 310)
Aug 21 14:10:48 ares kernel: [  172.800725] ata6.00: configured for UDMA/133
Aug 21 14:10:48 ares kernel: [  172.800948] ata6: EH complete
Aug 21 14:10:48 ares kernel: [  172.801061] ata6.15: hard resetting link
Aug 21 14:10:49 ares kernel: [  173.290556] ata6.15: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Aug 21 14:10:49 ares kernel: [  173.306718] ata6.00: hard resetting link
Aug 21 14:10:49 ares kernel: [  173.798185] ata6.00: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
Aug 21 14:10:49 ares kernel: [  173.798227] ata6.01: hard resetting link
Aug 21 14:10:50 ares kernel: [  174.117880] ata6.01: SATA link down (SStatus 0 SControl 310)
Aug 21 14:10:50 ares kernel: [  174.118272] ata6.00: configured for UDMA/133
Aug 21 14:10:50 ares kernel: [  174.118572] ata6: EH complete
Aug 21 14:10:50 ares kernel: [  174.121196] ata6.15: hard resetting link

These errors continue until I plugged off the device. It also didn't work then. ☹

The solution

The solution is pretty simple: disable port multiplier support. This can probably be achieved by blacklisting some module in stock kernels, but as I usually compile my own kernels, I simply deactivated the feature (-> Device Drivers -> Serial ATA and Parallel ATA drivers -> SATA Port Multiplier support). This will, obviously, disable PMP, which is probably necessary to use JBOD. However, I don’t care as I don’t use the PMP feature anywhere else.

I got to this solution after I tried to get eSATA to work for pretty much fourteen hours without avail, reading, besides others, this post where someone claims that a software update broke his eSATA support. I then went to bed and had a nice idea the next morning – which features could have been added just recently which could break this device? ☺

Some remarks

I was able to read/write data at about 25 MB/s on average (i. e. including the USB-common pauses of a few seconds between large bursts). This value tripled to 80-120 MB/s both reading & writing using eSATA. I partitioned the two Samsung 2 TB devices into two partitions, both of which are encrypted using LUKS with aes-cbc-essiv:sha256. It is easily possible to hotplug the device, however, data may obviously be lost. You should also take care to clean up afterwards by unmounting the partitions (possibly using fuser -mMk first) and calling cryptsetup remove/cryptdisks_stop. To scan for new devices after you plugged the device in, rescan-scsi-bus might come in handy.

Contact information

I’ll happily assist you or answer any remaining questions, provided that you know what you’re talking about. I will not read Wikipedia to you. You can find my contact details on my main page.