tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: SATA port multiplier support

On Thu, Jul 12, 2012 at 10:04:39PM +0200, Reinoud Zandijk wrote:
> Nice! I recently tried out NetBSD-6_BETA2 on my LG NAS (MARVELL_NAS) that has
> a mvsata(4) controller. Currently it only detects my single harddisc but ithe
> machine also has a 2nd harddisc slot and a SATA DVD burner attached.i
> How hard would it to implement this? Is the SATA multiplexer driver specific?
> or do you need some docs on the multiplexer first?
> I'd be most willing to test out some code! ;) Even if it just detects all and
> only allows the 1st drive to work as it does now.

sorry for not replying sooner, I just found this while cleaning my mailbox ...

The SATA multiplexer driver is not specific, the hardware should
follow the specification (I don't have the reference in hands but
goolge should point you to it if needed).

Support is needed at the host controller driver, and this may be hard
part: some documentation is needed about the controller, and then you may
have to work around hardware bugs (see the table in ahcisata_pci.c for
example :)
Basically, a 4-bits field in the host to device FIS (which was marked as
reserved in the earlier SATA specs) carry the PMP port number, port
number 0xf targetting the PMP itself. How we can set this field is
controller-specific, and may also vary depending on the type of access
(for example in AHCI the H2D FIS is constructed in RAM and read by DMA,
so you just set it there. sii follows the same scheme, but uses
a specific command to send a reset to a target while with AHCI we have to
build one H2D FIS to set the reset bit and another one to reset it).

So, basically all the work has to be done in mvsata(4) :)

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index