Bug 455833

Summary: Marvell 88SE6121 PATA not recognized correctly
Product: [Fedora] Fedora Reporter: Michael Cronenworth <mike>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: ablishen, beto, jgarzik, john.robinson, kernel-maint, lmedinas, pertusus, sgallagh, wrowe
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 531264 (view as bug list) Environment:
Last Closed: 2008-10-01 06:37:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
lspci output
none
This is my dmesg output
none
This is my dmidecode output
none
This is my lspci output none

Description Michael Cronenworth 2008-07-18 06:11:24 UTC
Description of problem: The PATA Marvell 88SE6121 controller found in many ASUS
motherboards is not being detected correctly on boot. It works properly during
the F9 DVD installer as it installs Fedora just fine, but after boot up into the
real install the DVD drive is no longer detected. pata_marvell is also not
loaded. modprobing pata_marvell results in no detection of anything.


Version-Release number of selected component (if applicable): All F9 kernels.


How reproducible: Always


  
Actual results: Marvell chip is not detected.


Expected results: Chip detection and DVD drive functionality


Additional info: There is a fix for this... if I make a special initrd that
preloads the pata_marvell module everything works great. I used this as a band
aid as I thought a kernel update would fix this, but it's been a few updates and
this problem still exists.

Comment 1 Chuck Ebbert 2008-07-18 16:11:49 UTC
Can you post the output of the command 'lspci -nn'?

Comment 2 Michael Cronenworth 2008-07-18 16:20:00 UTC
Created attachment 312151 [details]
lspci output

This is the output from lspci -nn. I also included the lspci -vv output in the
same file, just in case it comes up.

Comment 3 Michael Cronenworth 2008-07-18 16:20:30 UTC
Fulfilled NEEDINFO.

Comment 4 Stephen Gallagher 2008-08-04 20:08:05 UTC
I'd like to recommend that the priority of this issue be raised. It appears that this bug also affects some MSI boards using the same Marvell 88SE6121 chipset.

Comment 5 Peter Jones 2008-08-04 20:20:29 UTC
The initrd shouldn't be loading this driver; that should happen later.

Comment 6 Alberto Ferrer 2008-08-04 20:32:58 UTC
Created attachment 313399 [details]
This is my dmesg output

Comment 7 Alberto Ferrer 2008-08-04 20:34:22 UTC
Created attachment 313400 [details]
This is my dmidecode output

This is my dmidecode output

Comment 8 Alberto Ferrer 2008-08-04 20:35:32 UTC
Created attachment 313401 [details]
This is my lspci output

This is my lspci output

my mb is an MSI with Marvell drivers

Comment 9 Alberto Ferrer 2008-08-04 20:54:25 UTC
My temporary fix:

Add on /etc/modprobe.d/blacklist

blacklist ahci

save and reboot

Comment 10 William A. Rowe, Jr. 2008-08-06 01:17:00 UTC
Confirming Alberto's observation on blacklisting ahci, with the kernel
build 2.6.25.11-97.fc9.x86_64

Had tried all of the common workarounds and specific hacks proposed
throughout the internet with respect to this problem.

Only blacklisting ahci is successful.  Note that the pata_marvell might
really need exclusive preloading if only to ensure the h/w is initialized 
correctly in the proper order.  Even after blacklisting, ahci is started.  
However I suspect pata_marvell is exclusively loaded, first, giving it the
first shot at owning this device mapping.  The resulting driver group is;

# lsmod | grep ata
pata_marvell           13568  1 
libata                149664  2 ahci,pata_marvell
scsi_mod              150360  5 usb_storage,sr_mod,sg,sd_mod,libata

The affected device map consists of two controllers on the ASUS P5Q Deluxe
motherboard hosting 2 SATA drives, usb memdrives and 1 PATA DVD r/w.  It's
the DVD unit which is not detected with default drivers. 

00:1f.2 SATA controller: Intel Corporation ICH10 6 port SATA AHCI Controller (pr
og-if 01 [AHCI 1.0])
	Subsystem: ASUSTeK Computer Inc. Unknown device 82d4
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step
ping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort
- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin B routed to IRQ 19
	Region 0: I/O ports at 9c00 [size=8]
	Region 1: I/O ports at 9880 [size=4]
	Region 2: I/O ports at 9800 [size=8]
	Region 3: I/O ports at 9480 [size=4]
	Region 4: I/O ports at 9400 [size=32]
	Region 5: Memory at fe7fe800 (32-bit, non-prefetchable) [size=2K]
	Capabilities: [80] Message Signalled Interrupts: Mask- 64bit- Queue=0/4 Enable-
		Address: 00000000  Data: 0000
	Capabilities: [70] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [a8] SATA HBA <?>
	Capabilities: [b0] Vendor Specific Information <?>
	Kernel driver in use: ahci
	Kernel modules: ahci

03:00.0 IDE interface: Marvell Technology Group Ltd. 88SE6121 SATA II Controller
 (rev b1) (prog-if 8f [Master SecP SecO PriP PriO])
	Subsystem: ASUSTeK Computer Inc. Unknown device 8212
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step
ping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- 
<MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 16
	Region 0: I/O ports at dc00 [size=8]
	Region 1: I/O ports at d880 [size=4]
	Region 2: I/O ports at d800 [size=8]
	Region 3: I/O ports at d480 [size=4]
	Region 4: I/O ports at d400 [size=16]
	Region 5: Memory at feaffc00 (32-bit, non-prefetchable) [size=1K]
	Capabilities: [48] Power Management version 2
		Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA PME(D0+,D1+,D2-,D3hot
+,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=1 PME-
	Capabilities: [50] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 
Enable-
		Address: 00000000  Data: 0000
	Capabilities: [e0] Express (v1) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited
, L1 unlimited
			ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupporte
d-
			RlxdOrd- ExtTag- PhantFunc- AuxPwr+ NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPe
nd-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 <
256ns, L1 unlimited
			ClockPM- Suprise- LLActRep- BwNot-
		LnkCtl:	ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive
- BWMgmt- ABWMgmt-
	Kernel driver in use: pata_marvell
	Kernel modules: ata_generic, pata_acpi, pata_marvell, ahci

Comment 11 Chuck Ebbert 2008-08-12 17:04:07 UTC
Looking at the code in ahci.c, it is supposed to only claim the first two ports on the 6121 adapter. (commit c40e7cb89f9d36924131ef708ff1f16a76611add)

According to the dmesg it is doing that:
    ahci 0000:03:00.0: MV_AHCI HACK: port_map 7 -> 3

So there must be some unusual reason why pata_marvell can't find any devices when it loads after ahci.

Comment 12 Alan Cox 2008-08-12 17:20:59 UTC
. I've been complaining about this mess for ages now. I pointed it out when Jeff  broke the marvell support but he didn't revert it and didn't fix it. You can't make it work with current kernels. There is a single PCI device which is owned by the AHCI driver and the PATA port in AHCI mode needs to handled by this driver with some extra mode setting bits.

Jeff I believe has the docs to fix it, which should then be fairly easy to do. If you go back to about 2.6.23 it should all work ok.

Chuck: You need to grab Jeff by a suitable bit of his anatomy and remind him about this. I've tried. If you can get the docs out of him I can probably fix it too.

Alternatively I have a patch he will hate that kicks the chip out of AHCI mode

Comment 13 Alan Cox 2008-08-12 20:44:40 UTC
Reassigned away. I can do nothing about this bug. Jeff has the docs not me.

Comment 14 Arion Blishen 2008-08-27 15:52:54 UTC
Has there been any progress on this ?

Can this be made a higher priority as it prevents installation on a lot of systems ?

I hope this is at least fixed in Fedora 10

Comment 15 Luis Medinas 2008-08-28 22:10:37 UTC
Well i suffer the same problem but i could install f9 and it's running ok except my dvd/cdrom drives doesn't work. I had to regenerate a new initrd with pata_marvell preload to fix my problem.

Comment 16 Chuck Ebbert 2008-09-11 06:48:42 UTC
I've applied the first, simpler patch that unconditionally disables ahci for those adapters. pata_marvell will always be used even with no PATA devices attached.

Comment 17 Fedora Update System 2008-09-14 06:14:20 UTC
kernel-2.6.26.5-39.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/kernel-2.6.26.5-39.fc9

Comment 18 Fedora Update System 2008-09-16 23:21:23 UTC
kernel-2.6.26.5-39.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update kernel'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8089

Comment 19 William A. Rowe, Jr. 2008-09-18 17:29:21 UTC
Confirming #10 is resolved in kernel-2.6.26.5-39.fc9, SATA remain scsi0-5,
PATA are correctly picked up, beginning at scsi6.  Thanks folks.

Comment 20 Michael Cronenworth 2008-09-18 23:00:29 UTC
Confirming fix as well. Thanks for your efforts, Chuck.

Comment 21 Fedora Update System 2008-09-20 06:30:00 UTC
kernel-2.6.26.5-44.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/kernel-2.6.26.5-44.fc9

Comment 22 Fedora Update System 2008-09-25 00:16:57 UTC
kernel-2.6.26.5-45.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update kernel'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8283

Comment 23 Arion Blishen 2008-09-29 12:57:30 UTC
I have an ASUS P5Q Deluxe Motherboard with ICH10R 6 SATA ports and the Marvell with 2 SATA, eSATA and IDE

This kernel update disable the Marvell SATA ports.

The Marvell controller works under Fedora 8

Comment 24 Chuck Ebbert 2008-09-29 23:02:39 UTC
(In reply to comment #23)
> I have an ASUS P5Q Deluxe Motherboard with ICH10R 6 SATA ports and the Marvell
> with 2 SATA, eSATA and IDE
> 
> This kernel update disable the Marvell SATA ports.
> 
> The Marvell controller works under Fedora 8

Which update disabled the Marvell SATA ports?

Comment 25 William A. Rowe, Jr. 2008-09-29 23:16:50 UTC
For background, the 2 Marvell SATA ports had not worked for some time (long before
this fix); I discovered this working around the PATA bug by unsuccesfully
installing a DVDrw drive into one of those SATA ports.  Note that these two are 
entangled in Asus's EZ-Drive BIOS feature and there is quite possibly some 
additional configuration required in order to use them.

This PATA fix has no apparent effect on that SATA flaw either way.

Comment 26 Arion Blishen 2008-09-30 19:03:15 UTC
The update I applied was kernel-2.6.26.5-45.fc9.x86_64

Also I left out Fedora 8 works using the default kernel 2.6.23.1

It should be possible to see what was changed / broken between 2.6.23.1 and 2.6.25

Also 2.6.25 update for Fedora 8 will has the same issues as with Fedora 9 and I expect Fedora 10 as well.

Although there is no option in the BIOS to set ACHI/IDE modes for the Marvell 88SE6121 controller just turn on/off the Silicon Image Sil5723 (Drive Xpert technology) that is connected to the Marvell 88SE6121 controller. The Marvell 88SE6121 controller seems to be set to ACHI.

Also the manual says that Optical SATA drives will not work with the Marvell controller only hard drives.

Comment 27 Fedora Update System 2008-10-01 06:36:48 UTC
kernel-2.6.26.5-45.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 28 John Robinson 2009-08-13 13:26:16 UTC
This bug seems to have reappeared in Enterprise Linux.

I have an Asus P5Q Pro motherboard with Intel ICH10R SATA and Marvell 88SE6121 SATA and IDE ports:
00:1f.2 SATA controller: Intel Corporation 82801JI (ICH10 Family) SATA AHCI Controller
03:00.0 IDE interface: Marvell Technology Group Ltd. 88SE6121 SATA II Controller (rev b2)

In kernel 2.6.18-92.1.22, I can use my IDE DVD-ROM drive, and see the following in the syslog at boot time:

Aug 13 09:12:26 beast kernel: ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 16 (lev
el, low) -> IRQ 16
Aug 13 09:12:26 beast kernel: scsi6 : pata_marvell
Aug 13 09:12:26 beast kernel: scsi7 : pata_marvell
Aug 13 09:12:26 beast kernel: ata7: PATA max UDMA/100 cmd 0xdc00 ctl 0xd880 bmdm
a 0xd400 irq 16
Aug 13 09:12:26 beast kernel: ata8: PATA max UDMA/133 cmd 0xd800 ctl 0xd480 bmdm
a 0xd408 irq 16
Aug 13 09:12:26 beast kernel: BAR5:00:02 01:7F 02:22 03:CA 04:00 05:00 06:00 07:
00 08:00 09:00 0A:00 0B:00 0C:07 0D:00 0E:00 0F:00 
Aug 13 09:12:26 beast kernel: ata7.00: ATAPI: HL-DT-STDVD-RAM GH22NP20, 1.02, ma
x UDMA/66
Aug 13 09:12:26 beast kernel: ata7.00: configured for UDMA/66
Aug 13 09:12:26 beast kernel: BAR5:00:02 01:7F 02:22 03:CA 04:00 05:00 06:00 07:
00 08:00 09:00 0A:00 0B:00 0C:07 0D:00 0E:00 0F:00 
Aug 13 09:12:26 beast kernel:   Vendor: HL-DT-ST  Model: DVD-RAM GH22NP20  Rev: 
1.02
Aug 13 09:12:26 beast kernel:   Type:   CD-ROM                             ANSI 
SCSI revision: 05


But in kernel 2.6.18-128.4.1, I can't, and I see the following instead:

Aug 13 09:21:40 beast kernel: ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 16 (lev
el, low) -> IRQ 16
Aug 13 09:21:40 beast kernel: ahci 0000:03:00.0: controller can't do NCQ, turnin
g off CAP_NCQ
Aug 13 09:21:40 beast kernel: ahci 0000:03:00.0: MV_AHCI HACK: port_map 7 -> 3
Aug 13 09:21:40 beast kernel: ahci 0000:03:00.0: AHCI 0001.0000 32 slots 3 ports
 3 Gbps 0x3 impl IDE mode
Aug 13 09:21:40 beast kernel: ahci 0000:03:00.0: flags: 64bit stag led pmp slum 
part 
Aug 13 09:21:40 beast kernel: scsi6 : ahci
Aug 13 09:21:40 beast kernel: scsi7 : ahci
Aug 13 09:21:40 beast kernel: scsi8 : ahci
Aug 13 09:21:40 beast kernel: ata7: SATA max UDMA/133 abar m1024@0xfafffc00 port
 0xfafffd00 irq 16
Aug 13 09:21:40 beast kernel: ata8: SATA max UDMA/133 abar m1024@0xfafffc00 port
 0xfafffd80 irq 16
Aug 13 09:21:40 beast kernel: ata9: DUMMY
Aug 13 09:21:40 beast kernel: ata7: SATA link down (SStatus 0 SControl 300)
Aug 13 09:21:40 beast kernel: ata8: SATA link down (SStatus 0 SControl 300)


So the AHCI driver is now picking up the Marvell controller, and if it's a choice between its 2 SATA ports which I'm not using or its 1 IDE port which I am, I'd rather have the IDE port.

Is there a workaround to stop the AHCI driver claiming the Marvell controller?

Comment 29 Michael Cronenworth 2009-08-13 13:35:02 UTC
Either (In reply to comment #28)
> 
> Is there a workaround to stop the AHCI driver claiming the Marvell controller?  

Either read my comment in "Additional info" or an alternative is posted in comment #9. Try one or both.

After finding out this hardware doesn't support hotswap the hard way (eSATA) just yesterday (affects Windows, too), I'd be inclined to say stay away from Marvell products. ASUS went cheap on us and put on some low-grade ICs.

Comment 30 John Robinson 2009-08-13 15:10:16 UTC
D'oh! Thanks for that. I wanted a workaround which would stick through kernel updates, and you encouraged me to poke around mkinitrd a little more. I have now created an /etc/sysconfig/mkinitrd/preload-pata_marvell file which contains PREMODS="pata_marvell $PREMODS" and re-run mkinitrd; hopefully this will be included automatically when there's another kernel update.

Comment 31 Arion Blishen 2009-08-22 16:54:27 UTC
This has been fixed in kernel 2.6.27