Bug 34832 - Marvell 88SE9120 IDE-Part not working
Summary: Marvell 88SE9120 IDE-Part not working
Status: RESOLVED PATCH_ALREADY_AVAILABLE
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: Serial ATA (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jeff Garzik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-10 15:23 UTC by teddy19
Modified: 2011-07-06 10:03 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.38-9.43
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Patches pata_marvell.c (332 bytes, patch)
2011-06-06 19:00 UTC, teddy19
Details | Diff
Patches pata_marvell.c Version2 (50 bytes, text/plain)
2011-07-06 10:00 UTC, teddy19
Details

Description teddy19 2011-05-10 15:23:23 UTC
Tested with following Kernels:
2.6.38-9.43 - (Mainline)
Ubuntu-Kernels:
2.6.38-02063804
2.6.38-8.42
2.6.35-28.50
Daily-Mainline-Kernel will not boot, so no information on that.

System Motherboard: Asus P8P67 LE Rev. B3
Not working Chip: Marvell 88SE9120 SATA/PATA

The SATA-Ports on the Chip are working fine (tested with HDD), CDROM-Devices (2) on the IDE-Part are not working but recognised in the UEFI-Setup and one can boot from them (Windows).

"lspci -nn" shows me:
08:00.1 IDE interface [0101]: Marvell Technology Group Ltd. Device [1b4b:91a4] (rev 12)

The Vendor ID is not listed in the ahci-Driver to be a Marvell-Device. So the ahci-Driver does not give over to the pata_marvell-Driver.
Also the pata_marvell-Driver does not list the ID.

Bug also filed under Launchpad-Ubuntu. Someone is having the same problems, but nobody there to help...
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/777325
Comment 1 Israel G. Lugo 2011-05-10 15:51:40 UTC
I am experiencing the same thing on my Gentoo system, using kernel 2.6.37. Same motherboard. I'll sum up here what I posted in the linked Ubuntu bug, for convenience:

The 88SE9120 is being driven by the ahci driver, but this doesn't know how to access the PATA port. The pata_marvell driver would seem to be the logical choice, and ahci is supposed to refuse itself when it detects a Marvell device (cf. http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.38.y.git;a=commit;h=5b66c829bf5c65663b2f68ee6b42f6e834cd39cd ).

However:
1) The ahci driver is looking for PCI_VENDOR_ID_MARVELL (0x11ab), but the 88SE9120 identifies itself with a vendor ID of 0x1b4b instead.

2) The pata_marvell driver seems to only be able to handle 88SE61xx controllers. Looking at the comments in the code, there seem to be some operations which are only known to work in specific models and I'm not sure whether it would handle the 88SE9120 correctly.

I believe the fix would be to either teach the ahci driver to drive the PATA port, or to add the new 0x1b4b vendor ID to its blacklist and test/improve the pata_marvell driver? I'm not sure if that means that the 88SE9120's SATA ports will be driven in legacy IDE mode, though, which would definitely be suboptimal.
Comment 2 Israel G. Lugo 2011-05-10 15:55:36 UTC
Just noticed this bug is marked as a regression... Was that for a particular reason? (i.e., did an older kernel work for you?) I don't believe it to be a regression, more like unsupported hardware.
Comment 3 teddy19 2011-05-12 12:47:38 UTC
(In reply to comment #2)
> Just noticed this bug is marked as a regression... Was that for a particular
> reason? (i.e., did an older kernel work for you?) I don't believe it to be a
> regression, more like unsupported hardware.

Sorry, thats wrong... Can I change it somehow to "no"?! There's no edit-button.
Comment 4 teddy19 2011-06-06 19:00:51 UTC
Created attachment 60962 [details]
Patches pata_marvell.c
Comment 5 Israel G. Lugo 2011-06-08 09:49:10 UTC
This isn't really the most optimal solution... The patch just hacks pata_marvell to claim it can handle this particular controller. It would be nice to improve the driver; looking at its comments there seem to be a few gray areas where things are more or less "it looks like this works, most of the time".
Comment 6 Igor 2011-07-05 03:23:23 UTC
The same story for me with 2.6.39 kernel on Archlinux. Same motherboard. BTW, why is it assigned to Jeff? I found an old issue with pata_marvell here: https://bugzilla.kernel.org/show_bug.cgi?id=10425 and it was assigned to Alan.

teddy19, does this patch work for you?
Comment 7 teddy19 2011-07-06 10:00:08 UTC
Created attachment 64782 [details]
Patches pata_marvell.c Version2
Comment 8 teddy19 2011-07-06 10:03:16 UTC
Hey,
it works fine for me and all the others on launchpad:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/777325
The diff-mechanism did not work at first but it is now... Just Patch your /drivers/ata/pata_marvell.c
The patch will be included in the 3.0 Kernel:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f920fe1cb74191a780d88937f36994231a8faba1

Note You need to log in before you can comment on or make changes to this bug.