Comment 2 for bug 777325

Revision history for this message
Israel G. Lugo (ilugo) wrote : Re: Marvell 88SE9120 IDE-Part not working

I have the same problem on my Gentoo system, using kernel 2.6.37. For searching reference, this is an Asus P8P67-LE motherboard, with a Marvell 88SE9120 SATA 6 Gb/s + PATA controller. I've researched this by looking at the driver sources and the Linux kernel changelogs.

The problem here is that the 88SE9120 is being (correctly) driven by the AHCI driver, which unfortunately doesn't know how to access the PATA port on the device. You can verify that the ahci driver is being used by looking at the output of lspci -k, or at the lspci.txt file which has been attached to this bug.

There is a pata_marvell driver, which can handle both the SATA and PATA ports (I'm not sure but it may drive the SATA ports in slightly slower legacy IDE mode). The ahci driver is designed to back down to the pata_marvell driver if it detects a Marvell controller -- see this commit: http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.38.y.git;a=commit;h=5b66c829bf5c65663b2f68ee6b42f6e834cd39cd

The problem is two fold:
1. First, the ahci driver is detecting the Marvell controller using the old vendor ID of 0x11ab (which is what PCI_VENDOR_ID_MARVELL is defined to). The 88SE9120 identifies itself with vendor ID 0x1b4b (again, as can be seen in the attached lspci.txt). Therefore, the ahci driver does not know it is a Marvell controller and doesn't yield control to the pata_marvell driver.

2. The pata_marvell driver itself is only meant to handle the 88SE61xx chipsets. Even then there are some features which only work in specific models; the driver seems to be somewhat incomplete. I'm not sure whether it will correctly drive other controllers. I can try patching the driver on my system to recognize the 88SE9120 and see if it will work correctly...

The fix here would be to either teach the ahci driver to drive the PATA port, or to teach it to back off the controller altogether and let the pata_marvell do the work (make it look for the new 0x1b4b vendor ID as well). As for pata_marvell, it needs to be tested. It may be necessary to patch it so that it recognizes the 88SE9120 controller as its own, and it may need some teaching to handle it correctly (haven't tested yet).

I suggest the Ubuntu kernel team could contact the Linux kernel folks to get their take on this...