I'm running a Mac Pro with Fedora Core 6 Test 3.  I've noticed several people 
have had problems with IDE/SATA and their DVD drives under Linux.  I have 
been working to resolve some of these issues, and have had good success, as 
well as making some compromises.

First, there seems to be an issue with the standard Linux IDE DMA drive and 
the Intel 5000X chipset.  Upon loading of the driver, the kernel gets hit 
with interrupts with IRQ #90, which is the legacy IDE controller on the ESB2 
chip.  The kernel usually ends up disabling the IRQ, and any hope of 
accessing any device on the controller.  This affects all DVD or CDROM 
devices hooked up, not just the Superdrive that comes with it.

The workaround at install time is to add the kernel command line parameters:

acpi=force irqpoll

This works for the Fedora Core 6 installer, other distros maybe, maybe not.  
Gentoo 6.06 didn't work.  And the irqpoll setting seems to screw up the CPU 
spinlocks when booting an SMP kernel.  So that won't work after installation.

Once you do get Linux installed either via DVD or HD image, then there's 
another issue.  The ESB2 is detected as the 4 port SATA device in the ICH6, 
not the 6 port SATA controller it really is.  ESB2 is an offshoot of one of 
the ICHes.

For this, two things must be done.  First is to edit and re-build the AHCI 
driver.  Edit the file ahci.c and add the following line in the Dev ID list:

{ PCI_VENDOR_ID_INTEL, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0,          
board_ahci }, /* ESB2 */

This will tell the driver to claim Dev ID 0x2680, which is the AHCI controller 
ID in the Mac Pros.  According to the ESB2 datasheet, the ID could be 0x2680, 
0x2681, 0x2682, or 0x2683 depending on the fusing options.  In this case, 
0x2680 was not claimed by default in the AHCI driver.

Also, when you rebuild the AHCI driver, it's a good idea to either not build 
the ata_piix driver in your kernel, or delete the module altogether.  It 
won't work, and it's really the wrong driver for the ESB2 chips.  We only 
need the AHCI driver here, the ata_piix is for older chipsets like ICH5, 
ICH5, etc.  The ata_piix tries to claim the 0x2680 Dev ID, which is the ID 
presented in these older chipsets for their 2 or 4 port SATA controllers.

Now rebooting with the fixed AHCI driver should report all 6 SATA ports on 
boot, yea!!!!  Those two SATA connectors on the motherboard just below the 
first hard drive bay are now usable.

Now for the second major problem.  The DVD drive still won't work on the IDE 
controller.  The kernel reports:

ESB2: 100% native mode on irq 90

I think the IDE controller is not getting set to the legacy or compatible 
mode, and thus the IDE driver is trying to set it up incorrectly.  Also, I 
don't know how to change the mode in the EFI firmware.

Until we get a driver fix for this in the kernel or an EFI update, here's two 
things you can do.  First is to swap it out with a SATA DVD drive.  OS X will 
see it and use one just fine, and you can use one of the extra SATA 
connectors on the motherboard to hook it up.  

Alternatively, (and much cheaper) you can buy a SATA to IDE bridge card that 
will allow you to connect an IDE device to one of the extra SATA connectors.  
I did this, but be careful to make sure the bridge card you buy physically 
fits between the DVD and the power supply.  There's only about 2 inches of 
room in there.  I had to bend the IDE 40 pin connector up to a 45 degree 
angle to get it to fit.

Let me know if you have more specific questions, or you have some other ideas 
that have worked for you.

Dave Maurer

Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
Mactel-linux-users mailing list

Reply via email to