# Marvell 88SE6111 IDE Controller

## Draradech

Hello,

I'm running kernel 2.6.21-gentoo (self-compiled, config excerpt follows) and it won't recognize the Marvell 88SE6111 IDE controller, which is on my Mainboard (MSI P965 Neo2). My primary hard drive is connected to one of the ICH8 SATA ports, so no problem there, but my DVD writer is connected to the Marvell controller. Did I do something wrong configuring the kernel, or is this controller just not supported?

lspci:

```
00:00.0 Host bridge: Intel Corporation Memory Controller Hub (rev 02)

00:01.0 PCI bridge: Intel Corporation PCI Express Root Port (rev 02)

00:1a.0 USB Controller: Intel Corporation USB UHCI Controller #4 (rev 02)

00:1a.1 USB Controller: Intel Corporation USB UHCI Controller #5 (rev 02)

00:1a.7 USB Controller: Intel Corporation USB2 EHCI Controller #2 (rev 02)

00:1b.0 Audio device: Intel Corporation HD Audio Controller (rev 02)

00:1c.0 PCI bridge: Intel Corporation PCI Express Port 1 (rev 02)

00:1c.5 PCI bridge: Intel Corporation PCI Express Port 6 (rev 02)

00:1d.0 USB Controller: Intel Corporation USB UHCI Controller #1 (rev 02)

00:1d.1 USB Controller: Intel Corporation USB UHCI Controller #2 (rev 02)

00:1d.2 USB Controller: Intel Corporation USB UHCI Controller #3 (rev 02)

00:1d.7 USB Controller: Intel Corporation USB2 EHCI Controller #1 (rev 02)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev f2)

00:1f.0 ISA bridge: Intel Corporation LPC Interface Controller (rev 02)

00:1f.2 IDE interface: Intel Corporation SATA Controller 1 IDE (rev 02)

00:1f.3 SMBus: Intel Corporation SMBus Controller (rev 02)

00:1f.5 IDE interface: Intel Corporation SATA Controller 2 IDE (rev 02)

01:00.0 VGA compatible controller: nVidia Corporation Unknown device 0193 (rev a2)

03:00.0 IDE interface: Marvell Technology Group Ltd. Unknown device 6121 (rev b1)

04:02.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Unknown device 8167 (rev 10)

04:03.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev c0)
```

part of kernel config (not shown = not enabled)

```
#

# ATA/ATAPI/MFM/RLL support

#

CONFIG_IDE=y

CONFIG_BLK_DEV_IDE=y

#

# Please see Documentation/ide.txt for help/info on IDE drives

#

CONFIG_BLK_DEV_IDEDISK=y

CONFIG_BLK_DEV_IDECD=y

CONFIG_BLK_DEV_IDEACPI=y

#

# IDE chipset support/bugfixes

#

CONFIG_IDE_GENERIC=y

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_BLK_DEV_GENERIC=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

CONFIG_BLK_DEV_IDEDMA=y

#

# Serial ATA (prod) and Parallel ATA (experimental) drivers

#

CONFIG_ATA=y

CONFIG_ATA_PIIX=y

CONFIG_SATA_MV=y

CONFIG_SATA_INTEL_COMBINED=y

CONFIG_SATA_ACPI=y

CONFIG_PATA_MARVELL=y
```

----------

## wynn

The Marvell 88SE6111 IDE Controller doesn't appear to be supported, in fact, the Device ID (0x6121) is so new it isn't in the current pci.ids table just downloaded.

Only "6101  88SE6101 single-port PATA133 interface" and "6145  88SE6145 SATA II PCI-E controller" are supported by pata_marvell.

As you've probably found out, there is no Marvell driver in the old PATA set.

----------

## sylvain

Hello,

i have a similar problem with the controller Marvell 88SE614x on the MotherBoard ASUS P5WDG2-WS-Pro.

Linux see not the disks, in Raid1 or not, on this controller.

I have include in my kernel the driver for SATA-MARVEL and the PATA-MARVEL for 88SE614x card, and doesn't work!

Some body can help me ?

Best Regards

----------

## Draradech

@wynn:

Any chance at getting this running with some kind of generic ide driver, or via some sort of legacy "emulation" from the bios?

I'm asking, because I find it a bit odd, that WinXP supports that thing without an additional driver, while I can't access it from Gentoo...

----------

## wynn

 *Draradech wrote:*   

> @wynn:
> 
> Any chance at getting this running with some kind of generic ide driver, or via some sort of legacy "emulation" from the bios?
> 
> I'm asking, because I find it a bit odd, that WinXP supports that thing without an additional driver, while I can't access it from Gentoo...

 Well there is

```
<*>     generic/default IDE chipset support
```

under ATA/ATAPI/MFM/RLL support.

The setup for IDE under this heading is

```
   Device Drivers  --->

    ATA/ATAPI/MFM/RLL support  --->

<*> ATA/ATAPI/MFM/RLL support

<*>   Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support

<*>     Include IDE/ATA-2 DISK support

[*]     Use multi-mode by default

<*>     Include IDE/ATAPI CDROM support

<*>     generic/default IDE chipset support

[*]     CMD640 chipset bugfix/support

[*]     PCI IDE chipset support

[*]       Sharing PCI IDE interrupts support

<*>       Generic PCI IDE Chipset Support

<*>       RZ1000 chipset bugfix/support

[*]       Generic PCI bus-master DMA support

[*]         Use PCI DMA by default when available
```

plus the chipset specific driver.

To get around the lack of a driver for the JMicron chipset, people put "all-generic-ide" on the kernel command line.

This allowed the chipset to be used but DMA couldn't be set â it can only be set if the driver specific to the chipset is in use.

As you've probably found out, Google doesn't show anything for a 88SE6111 Linux driver.

----------

## blurp

is there any updates on this? i can't find much info on the development of this driver except:

someone tried to do a patch but seems that it doesn't work (http://www.ussg.iu.edu/hypermail/linux/kernel/0612.2/0221.html)

someone else who tried the patch said it works (http://www.ussg.iu.edu/hypermail/linux/kernel/0701.1/2025.html)

someone else suggested using the ahci driver instead (http://www.ussg.iu.edu/hypermail/linux/kernel/0612.2/0122.html)

I can't try these now because I have no access to the box yet.

----------

## waudu

has anyone gotten this to work by now?

i have a marvell 88se6145, which should be supported by CONFIG_PATA_MARVELL but the cdrom drives connected do not show up.

----------

## blurp

 *waudu wrote:*   

> has anyone gotten this to work by now?
> 
> i have a marvell 88se6145, which should be supported by CONFIG_PATA_MARVELL but the cdrom drives connected do not show up.

 

I am now using ubuntu 7.10, kernel 2.6.22 and everything works out of the box. You can probably try "all-generic-ide" in the kernel boot parameter.

my ata_generic module version is 0.2.12 and pata_marvell module version is 0.1.4.

----------

## jac_goudsmit

Just to let you know I got an ASUS P5K WS with Marvell 6121 and I was successful in making it run Gentoo. I'm using a Q6700 (quad core 2.66GHz) CPU and I'm running in amd64 (X86_64/EM64T) mode.

I used a USB-to-IDE converter to connect a PATA CD-ROM drive to the system first (to bootstrap Gentoo), and I used a PCI ATA controller for the harddisk to install Gentoo-amd64. If you don't have a PCI (S)ATA controller laying around, you can do this on another PC or you can install to a USB drive (if you're patient). Or if you have a lot of memory (and you're brave enough to know that you're not going to screw up), you can do the kernel patching without harddisk: just unpack a stage3 and portage-snapshot to /mnt/gentoo, mount proc on /mnt/gentoo/proc and bind-mount /dev on /mnt/gentoo/dev, copy /etc/resolv.conf to /mnt/gentoo/etc, chroot to /mnt/gentoo and you're living in RAM.

I emerged gentoo-sources (2.6.24-gentoo-r4) and genkernel (3.4.9) as part of the install. Then I downloaded the Linux drivers from ASUS website (http://dlsvr03.asus.com/pub/ASUS/misc/sata/Marvell6121_V1009_linux.rar). I unpacked the rar on a Windows system with winrar (shareware, www.rarlabs.com). The RAR file contains a number of .tgz files, all of them contain a floppy image that can be used with redhat or suse (12 different floppy images for two linuxes... silly binary distros!) but also one tarball with an open-source driver. I copied that tarball "61xx-nonraid-source-1.0.0.9.tgz" from the Windows PC to the Linux PC and unpacked it there. The "nonraid" in the name indicates that it won't support RAID -- I don't mind about that.

When I tried to run 'make KERNEL_SRC=/usr/src/linux' to see if it would build as module without problems, I ran into a problem: error: 'struct scatterlist' has no member named 'page'. A quick Google search for the error message resulted in a page where it was explained that some other piece of code in the kernel with the exact same problem was fixed by replacing "sg->page" by "sg_page(sg)" so that's what I did and the module built successfully. A CD-ROM drive connected to the PATA port on the Marvell showed up correctly after I ran "insmod ./mv61xx.ko".

I wanted to patch the kernel so that I could boot from the Marvell so I ran 'make KERNEL_SRC=/usr/src/linux kbuild' as per instructions in the tarball. It said it patched the kernel correctly, but when I did a 'genkernel --menuconfig all', all drivers in the Device Drivers->SCSI Device Support->SCSI low-level drivers were gone! A quick perusal of /usr/src/linux/drivers/scsi/Kconfig showed that the patch had gone slightly wrong: the new lines that were needed to select the drivers had been inserted ABOVE the "if SCSI_LOWLEVEL" instead of below. After I fixed the Kconfig, I did 'genkernel --menuconfig all' again, selected the Marvell Storage Controller 6121/6122/6141/6145 from the menu and voila, the compiled kernel recognized the Marvell. So now I could put the harddisk on the Marvell and boot from it there.

Good luck!  :Smile: 

===Jac

----------

## emerald

I posted a link to a patch for 2.6.25 in another thread: https://forums.gentoo.org/viewtopic-p-5165677.html#5165677.

----------

## Monogram

I just wanted to give my thanks... great job: emerald... I was trying to resolve this issue for over a week now without much luck - till I came across this posting. I applied all patches and now I got my optical drive on Marvell 6121 controller working fine. 

refer to: https://forums.gentoo.org/viewtopic-t-705323.html

May I inquire as to how you achieved this? / how you edited / patched the drivers? I'd love to know.

Thanks again.

----------

## emerald

The drivers from ASUS (done by a Marvell guy) were for older kernel (2.6.18 tested) so i just incorporated the in-kernel-changes up to 2.6.25, cleaned up a bit and thats all, so the effort was not so much.

It's just, why keep the work for myself when several other people have the same problem i had (with the new ASUS mainboard i got)  :Wink: 

----------

## Dew

Does this patch also work with newer kernels? Like 2.6.26-r1 I got for example  :Razz: 

----------

## emerald

Have a look here:

https://forums.gentoo.org/viewtopic-p-5213724.html#5213724

The patches generally work for the all kernel versions 2.6.xx.yy: all yy values except if there's a newer one posted for a special version (and onwards) (e.g. 2.6.26 version works vor 2.6.26, 2.6.26.1, ...).

----------

