# P5Q Pro Marvell IDE, Doesn't work in 2.6.25-r*

## koan

Hello,

I have a P5Q Pro booting from a Marvell 88SE6111 IDE:

  03:00.0 IDE interface [0101]: Marvell Technology Group Ltd. Device [11ab:6121] (rev b2)

This boots and is recognised fine under 2.6.24-r8, but isn't recognised under 2.6.25-r*.

The only change in the pata_marvell.c is:

```

$ diff linux-2.6.25-gentoo-r8/drivers/ata/pata_marvell.c linux-2.6.24-gentoo-r8/drivers/ata/pata_marvell.c

88,89c88,89

<       ata_bmdma_drive_eh(ap, marvell_pre_reset, ata_std_softreset, NULL,

<                          ata_std_postreset);

---

>       return ata_bmdma_drive_eh(ap, marvell_pre_reset, ata_std_softreset,

>                                 NULL, ata_std_postreset);

```

Would that be enough to stop it I wonder?

Has anyone else got this controller working?

----------

## d2_racing

Hi, can you try the kernel 2.6.26 instead ?

----------

## platojones

I have a P5Q Deluxe and it uses the same controller....(different rev though, b1 instead of b2)

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

I'm using pata-marvell in 2.6.25-gentoo-r8 for a few weeks now...works fine for me.  Is it compiled into the kernel or being loaded by initrd?

----------

## koan

Mine is in-kernel - I am trying to avoid the hassle of initrd.

Where is yours?

----------

## platojones

It's in initrd, being loaded as a module...should not matter as long as it's getting loaded before init tries to mount the root partition....which it would if it is built in.  Did you make any other config changes between 2.6.24-r8 and 2.6.25-r8?  

```

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

<M>   AHCI SATA support

<M>   Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support

<M>   Generic ATA support

<M>   Marvell PATA support via legacy mode

```

That is what I have set in my SATA config portion of the kernel.  Not sure if the Intel ESB module is needed, but I'm pretty sure the others are.  Whether built-in or built as a modules, should not make a difference in this case.

Oh, and are you running LVM or raid?

----------

## koan

Hmm, the only one I didn't have was Generic ATA, but the drive is not recognised with it enabled.

When the PC boots, I can see reference to the drive it is on, but short of reading the console output via serial, I can't tell whether it sees an issue.  When I get to the kernel panic, unable to sync fail, it lists a series of ram disks and my sata drive as the only available boot options.

I am wondering if something is conflicting - there were a bunch of other compiled in pata modules so I am disabling those for the time being.  I'll see if it helps next boot.

----------

## d2_racing

Hi, they need to be builtin I think.

----------

## koan

 *d2_racing wrote:*   

> Hi, they need to be builtin I think.

 

Yes, they do - you cannot boot from a device that has the kernel module loaded, because the kernel wouldn't be able to find the disk with the module on it that it needs to access the disk.  The example above where they are modules is from platojones, who is using an initrd.   I am not so they are built in.

There must be an underlying conflict.  I don't have a pressing need to upgrade but its hard to let it go.  If I have time, I'll try the 2.6.24 module with this kernel and see if it make a difference.  But other than that I may just wait until .26 gets into stable.

----------

## platojones

 *koan wrote:*   

>  *d2_racing wrote:*   Hi, they need to be builtin I think. 
> 
> Yes, they do - you cannot boot from a device that has the kernel module loaded, because the kernel wouldn't be able to find the disk with the module on it that it needs to access the disk.  The example above where they are modules is from platojones, who is using an initrd.   I am not so they are built in.
> 
> There must be an underlying conflict.  I don't have a pressing need to upgrade but its hard to let it go.  If I have time, I'll try the 2.6.24 module with this kernel and see if it make a difference.  But other than that I may just wait until .26 gets into stable.

 

Well, actually, they don't need to be builtin...that's the purpose of initrd.  It gives the kernel access to modules before the root filesystem is available.  If you've built your initrd correctly, then there should be no problems vis-a-vis builtin or modular.

----------

## koan

 *platojones wrote:*   

>  *koan wrote:*   The example above where they are modules is from platojones, who is using an initrd.   I am not so they are built in.
> 
>  
> 
> Well, actually, they don't need to be builtin...that's the purpose of initrd.  It gives the kernel access to modules before the root filesystem is available.  If you've built your initrd correctly, then there should be no problems vis-a-vis builtin or modular.

 

Sure...  I hope I wasn't muddying the water with my reply - I thought it was clear.  What I was saying was that I am not using initrd, so they *must* be built in.

So, I tried the kernel module from 2.6.24 that I am able to boot with, with the 2.6.25 kernel, but still the disk is not discovered.  I am not surprised because the difference between these modules are trivial.

I booted in quiet mode and saw that I was getting ACPI errors "ACPI Error attaching device data", which the .24 kernel does not do. I am working through the kernel bugs to see if I can find clues.  Turning ACPI off doesn't help.

----------

## platojones

 *koan wrote:*   

>  *platojones wrote:*    *koan wrote:*   The example above where they are modules is from platojones, who is using an initrd.   I am not so they are built in.
> 
>  
> 
> Well, actually, they don't need to be builtin...that's the purpose of initrd.  It gives the kernel access to modules before the root filesystem is available.  If you've built your initrd correctly, then there should be no problems vis-a-vis builtin or modular. 
> ...

 

Well, I think we can both agree that builtin or modular is not the issue here...I can only share my experience with you...btw, did you make sure that your bios is set to 'SATA Configuration:  Enhanced" and "Configure SATA AS   IDE" ?  If you have it set the AHCI, it will try to use pure AHCI no matter what your kernel is configured for...and will fail.

----------

## koan

I am booting off the Marvell IDE interface, not the Intel SATA  - the SATA works fine, and if my boot partition was there, I wouldn't have any problems.

In any case, I am not changing the bios between booting from .24 and .25 kernels.  I am fairly sure I have the SATA interface defined as SATA rather than IDE.

As a bit of an aside - in alsamixer, are you seeing a "master" channel under .25?

----------

## platojones

 *koan wrote:*   

> I am booting off the Marvell IDE interface, not the Intel SATA  - the SATA works fine, and if my boot partition was there, I wouldn't have any problems.
> 
> In any case, I am not changing the bios between booting from .24 and .25 kernels.  I am fairly sure I have the SATA interface defined as SATA rather than IDE.
> 
> As a bit of an aside - in alsamixer, are you seeing a "master" channel under .25?

 

I think I understand what you are saying now.  Is the Marvell SATA module in your initrd?  That's the question.  It may not be getting loaded at all (and d2racing is using it now, with the latest kernel, so it should work).  If that is the case, then that's the lead you need to follow.

----------

## koan

I am not using initrd, the modules are built in.

And it is the marvell_pata module that provides access to the drive, which I have built in to both the .24 and .25 versions of the kernel.

----------

## platojones

 *koan wrote:*   

> I am not using initrd, the modules are built in.
> 
> And it is the marvell_pata module that provides access to the drive, which I have built in to both the .24 and .25 versions of the kernel.

 

Ok, now you are confusing me again....exactly what modules have you built into your kernel...and exactly what are your bios settings...and what do you mean by this:

 *Quote:*   

> 
> 
> I am booting off the Marvell IDE interface, not the Intel SATA - the SATA works fine, and if my boot partition was there, I wouldn't have any problems. 
> 
> 

 

----------

## d2_racing

I think he is using the compatible mode.

----------

## platojones

 *d2_racing wrote:*   

> I think he is using the compatible mode.

 

Thanks d2...if that's the case, then it's matter of determining what modules are actually compiiled in the kernel...I know this stuff works...I am using it now (unless there's something about the P5Q Pro that is fundamentally different from the P5Q Deluxe...but I doubt that is the case).

----------

## koan

I am not sure how this has become so confused!  It is like everything I have written before is invisible.

Let me start from the beginning.

1) I am booting from the Marvel IDE controller - not the Intel SATA controller, so AHCI, SATA as IDE, or compatibility mode are not relevant.

2) IDE is PATA, and so the correct module is the pata_marvell.c kernel module.

3) I am NOT using initrd so all modules require for booting are built in.

platojones, if you are actually using this stuff, by which you mean you have a working drive in the *IDE* controller and are running 2.6.25, and are still willing to help, please could you do the following:

1) Determine which block device is your IDE drive

2) type "dmesg | grep -i marvell" - you should see something like: 

```
scsi6 : pata_marvell
```

3) If you have /sys, then take a look in 

```
 /sys/class/scsi_disk/[the scsci device matching the previous step]/device/
```

 and confirm you have a directory called 

```
block:[the block device from the first step]
```

4) Confirm that 

```
/sys/class/scsi_host/host[the scsi host from step 1]/proc_name
```

 contains pata_marvell

And no more talk of SATA  :Smile: 

What I am trying to do with the above is confirm that it is genuinely the marvell_pata module that is driving the ide controller, or whether the generic driver got it

----------

## platojones

Ok, turns out that I was confused...in thinking that marvell_pata was playing a role on my system at all.  Turns out it is not.  The module is being loaded, but the driver that is being used by my disks is actually the ata_piix driver...which is the generic intel compatibility driver.

UPDATED:

To give you the other info though:

dmesg gives:

scsi4 : ata_piix

scsi5 : ata_piix

catting /sys/class/scsi_host/host4/proc_name

ata_piix

and the block directory is there in /sys/class/scsi_disk

So I'm not sure if any of this helps.

----------

## d2_racing

So, he is not using at all the SATA plug.

I tought that he was using the SATA plug but with the compatible SATA mode.

----------

## platojones

 *d2_racing wrote:*   

> So, he is not using at all the SATA plug.
> 
> I tought that he was using the SATA plug but with the compatible SATA mode.

 

Yes, I see now...plus I was confused about the role of pata_marvell on my system...I'm not even using it...it's only for IDE compatibility.

----------

## koan

Thanks guys.

If the deluxe has the Marvell IDE, then I would expect the module to get loaded and show up in dmesg - udev would see the controller and load the driver even if nothing was plugged in.  Did you see no mention of marvell in the dmesg?

That would confirm my suspicion that the module is not getting set up at boot.

----------

## platojones

I see that the pata_marvell is being loaded on my system, but no mention of it whatsoever in my dmesg output..both my drives are using the ati_piix module.

----------

