Marvell 88SX7042 controller only shows 2 drives instead of 4

Redguy

Cadet
Joined
Jul 29, 2017
Messages
3
i'm trying to convert a QNAP TS-419P NAS to a FreeNAS setup. Yes that's an ARM based device.. BUT :

The little 4 drive box actualy contains a mini ITX size arm based mother board connected to the hard disk backplane through a PCI-E x4 connector. The actual sata controller for the 4 drives is on the backplane itself ! It contains a Marvel 88SX4072 Sata2 controller.
So my hobby project is to ditch the ARM based motherboard, and hookup the harddisk backplane to something intel based through the PCI-E connector. (Just for the fun of it, no production nas)

In my case, its a little Intel NUC board. I first plugged in an M.2 -> PCI-E x4 converter board. After supplying the board with an external 5V/12V power feed (there a floppy drive header on the converter board for that) i plugged in an intel based PCI-E x4 NIC and this works great !
Next was to plug the QNAP harddisk backplane in to the NUC.

When i boot up FreeNAS the marvel chip shows up nicely, and so do the first 2 harddisk drives plugged in ! :)

Boot output :

mvs0: <Marvell 88SX7042 SATA controller> port 0xe000-0xe0ff mem 0xdf000000-0xdf0fffff irq 16 at device 0.0 on pci1
mvs0: Gen-IIe, 4 3Gbps ports, Port Multiplier supported with FBS
mvsch0: <Marvell SATA channel> at channel 0 on mvs0
mvsch1: <Marvell SATA channel> at channel 1 on mvs0
mvsch2: <Marvell SATA channel> at channel 2 on mvs0
mvsch3: <Marvell SATA channel> at channel 3 on mvs0
..
..
ada0 at mvsch0 bus 0 scbus1 target 0 lun 0
ada0: <WDC WD2002FYPS-01U1B1 04.05G05> ATA8-ACS SATA 2.x device
ada0: Serial Number WD-WCAVY4816819
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 1907729MB (3907029168 512 byte sectors)
ada1 at mvsch1 bus 0 scbus2 target 0 lun 0
ada1: <WDC WD2002FYPS-02W3B0 04.01G01> ATA8-ACS SATA 2.x device
ada1: Serial Number WD-WCAVY6793666
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 1907729MB (3907029168 512 byte sectors)
..


Problem is, only the first 2 drives show up. The drives plugged into slots 3 and 4 dont show up. The marvel chip is recognized as itself :

lspci -vv output :

01:00.0 SCSI storage controller: Marvell Technology Group Ltd. 88SX7042 PCI-e 4-port SATA-II (rev 02)
Subsystem: Marvell Technology Group Ltd. Device 11ab
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 16
Region 0: Memory at df000000 (64-bit, non-prefetchable)
Region 2: I/O ports at e000
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME+
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [60] Express (v1) Legacy Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <256ns, L1 <1us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 256 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x4, ASPM L0s, Exit Latency L0s <256ns, L1 unlimited
ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-


I have not been able to find a datasheet for the 88sx7042 chip, but i think it contains a sata multiplier. Which is fine with me, this thing does not have to be lightning fast. But why only see the first 2 channels ? Only drives plugged in to the first 2 channels are recognized.. drives in the last 2 channels are always ignored, even with the first to empty.


Any clues on this ??????
 
Last edited by a moderator:

leenux_tux

Patron
Joined
Sep 3, 2011
Messages
238
I have seen something similar when I first started to experiment with FreeNAS. I bought a MARVEL based SATA card hoping it would be a "good value" card instead of shelling out for an IBM M1015 (which is one of the favoured cards on this site). I was only experimenting after all so I was trying to keep things as cheap as possible. All of the disks were being seen by the BIOS on the card, however, FreeNAS would only see two. Turns out the card was not supported by FreeNAS/FreeBSD; I'm going back at least 5 years here so things may have changed since then

At the time, as a test, I installed Linux on the box to see if it would see the hard drives, after checking the supported OS's for the card. I think I went for CentOS. All the hard drives were seen by the OS so I knew the card was really OK.

I then decided to invest in the IBM card and install FreeNAS, haven't looked back since. In fact I have two 1015's in my server now and the MARVEL was sold on ebay.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Marvel has terrible drivers on FreeBSD, just don't use marvel products. The same goes for realtek nics.
 
Last edited by a moderator:

Redguy

Cadet
Joined
Jul 29, 2017
Messages
3
Thanks for the replies.. It seems the Marvell 88SX7042 should be well supported, it pops up all over the placed when searching for that type of card, even in the FreeNAS forums.

I know : Buy card x, y or z, your card is crap.. You are probably right, there are far better products you can buy. Which is not the point.. I would like to reuse the qnap case instead of just scrapping it. So i am trying to get the backplane with that controller on board working. I cant swap it out without ditching the whole plan. This is not a high performance production system. Just curious if i can get it to work this way as a little lab box running some stuff for me.

The backup/controller works fine when used with the QNAP motherboard and software.. I have seen a few mentions of people having similar issues with only a few drives seen, but those posts are old and note very helpful.

I have tried the same setup using a Debian live cd.. same result.. Since it does work in the original setup, it's either a generic driver issue or QNAP using some proprietary firmware or hardware.. Thing is that the output does show the 4 channels. The 88SX7042 seems to use a sata multiplier internally bus the output shows that this is working since the first to drives are connected to that multiplier as well.


My hope is that is can be fixed with a little driver or kernel tweaking but have not found anything useful as of yet..
 
Last edited by a moderator:

leenux_tux

Patron
Joined
Sep 3, 2011
Messages
238
I did a quick check on the forum for posts relating to the Marvell 88SX7042 and the ones I have seen seem to be on the negative side more than positive, especially the one around "Kernel Panic" and "Can't replace disk because pool is unavailable, even though its imported".

I probably shouldn't be saying this seeing as it's a "FreeNAS" forum and all, however if you really want to use ZFS with all of the nice things that come with it, and your QNAP box can see all four disks with Linux installed, you could look at using OpenZFS ?

As well as my FreeNAS box I have a Proxmox server. The FreeNAS box is used to host (via NFS) my Proxmox VM's (amongst a ton of other stuff). I have a three disk ZFS raid 1 in the Proxmox server which acts as an archive (via zfs snapshots) for my FreeNAS file systems. I can send a zfs snapshot streams from my FreeNAS system over to OpenZFS on Proxmox server, no issues at all.


Just my four-peneth-worth.
 

piknew

Cadet
Joined
Jul 26, 2019
Messages
1
For original problem - a little bit electronic skills are required. First of all - please take a look at board, especially on sata power connections. You will see something diffreent for ports 1&2 and 3&4. The 3&4 have MOSFETs (dual) for both +5 and +12V lines. They are controlled by other MOSFETs (small SOT-23s). These, on the other hand, are controlled by trace to PCI-E to 30 (and one more, which is on the opposide side of the board). This is marked as "RESERVED". And QNAP is using it to power up HDDs 3rd and 4th (QNAP is putting +3.3V on these lines, standard PCI-e has it floating). This is the reason that HDDs 3rd & 4th are not powered up so also not visible.

Modification of board is to cut controlling lines and pull them up to 3.3V. I soldered small 3.3V voltage regulator. Inputs of regulator are: +5V and ground. Output is soldered to these 2 small tracks (you need to scratch PCB mask a little bit). Do not forget to cut traces in place which is more near to PCI-e connector - to phisically disconnect them from PCI-e connector/host. I marked example pleace.

Image_04.jpg
 
Last edited:

yagi

Cadet
Joined
May 9, 2017
Messages
1
For original problem - a little bit electronic skills are required. First of all - please take a look at board, especially on sata power connections. You will see something diffreent for ports 1&2 and 3&4. The 3&4 have MOSFETs (dual) for both +5 and +12V lines. They are controlled by other MOSFETs (small SOT-23s). These, on the other hand, are controlled by trace to PCI-E to 30 (and one more, which is on the opposide side of the board). This is marked as "RESERVED". And QNAP is using it to power up HDDs 3rd and 4th (QNAP is putting +3.3V on these lines, standard PCI-e has it floating). This is the reason that HDDs 3rd & 4th are not powered up so also not visible.

Modification of board is to cut controlling lines and pull them up to 3.3V. I soldered small 3.3V voltage regulator. Inputs of regulator are: +5V and ground. Output is soldered to these 2 small tracks (you need to scratch PCB mask a little bit). Do not forget to cut traces in place which is more near to PCI-e connector - to phisically disconnect them from PCI-e connector/host. I marked example pleace.

View attachment 31984
Hi, thanks for your hint. Don't you think the 3,3 Volt from the PCIe Port can also be used? So there would be no need for a volatage regulator.
 
Top