[Mageia-dev] IDE/SATA driver ordering [was Re: Please test dracut (mkinitrd replacement)]

JA Magallon jamagallon at ono.com
Mon Oct 24 00:00:50 CEST 2011


On Sun, 23 Oct 2011 07:17:33 +0300
Anssi Hannula <anssi.hannula at iki.fi> wrote:

> On 22.10.2011 16:05, Colin Guthrie wrote:
> > 'Twas brillig, and David W. Hodgins at 22/10/11 03:10 did gyre and gimble:
> >> On Thu, 20 Oct 2011 19:29:46 -0400, Colin Guthrie
> >> <mageia at colin.guthr.ie> wrote:
> >>
> >>> sudo -i (or su -)
> >>> urpmi dracut
> >>> cd /boot
> >>> mv initrd-3.1.0-desktop-0.rc10.1.mga2.img initrd-old.img
> >>> /sbin/installkernel -N 3.1.0-desktop-0.rc10.1.mga2
> >>
> >> Worked ok here with lvm for /usr, /home, etc. Still affected by
> >> https://bugs.mageia.org/show_bug.cgi?id=1525#c73
> >> just like mkinitrd, putting the loading of pata_acpi before
> >> the loading of pata_via, which makes my dvd drive unusable
> >> till I edit the initrd to reverse the load order.
> >>
> >> What controls the order it chooses for the loading of modules?
> > 
> > Not 100% sure what determines the order or priority here, but hopefully
> > the same fix will affect both. Not 100% sure tho'.
> 
> Didn't look at this issue specifically, but automatically loaded modules
> should be loaded in the order specified in
> /lib/modules/foo/modules.order (which I think is used by depmod to
> generate the dep entries in the correct order for modprobe), which
> correctly contains pata_acpi after pata_via.
> 

I have a smimilar problem with all boxes with IDE drives. Up to kernels
3.0.x, thay just worked with ata-piix, and drives were named as sdx.
With kernel 3.1.x, they get driven by old IDE driver, and named as hdX.
Don't know which is the reason.
Looking at that modules.order, they look the same for both kernels.
IDE drivers are listed first in modules.order.

I have two equal boxes, in one of them I re-made initrds with --preload=ata-piix.
Then it boots as before, sdX drives.
In the 'good' box, lsinitrd | grep ata gives:

bran:/boot# lsinitrd initrd-3.1.0-desktop-0.rc10.1.mga2.img | grep ata
-rw-r--r--   1 root     root        99345 Oct 18 07:31 lib/modules/3.1.0-desktop-0.rc10.1.mga2/libata.ko.gz
-rw-r--r--   1 root     root         3108 Oct 18 07:31 lib/modules/3.1.0-desktop-0.rc10.1.mga2/ata_generic.ko.gz
-rw-r--r--   1 root     root         8838 Oct 18 07:31 lib/modules/3.1.0-desktop-0.rc10.1.mga2/ata_piix.ko.gz
-rw-r--r--   1 root     root         2747 Oct 18 07:31 lib/modules/3.1.0-desktop-0.rc10.1.mga2/pata_acpi.ko.gz
echo "Loading ata-piix module"
modprobe -q ata-piix
echo "Loading libata module"
modprobe -q libata
echo "Loading pata_acpi module"
modprobe -q pata_acpi
echo "Loading ata_generic module"
modprobe -q ata_generic
echo "Loading ata_piix module"
modprobe -q ata_piix
init

In the 'bad' one:

lugh:/boot# lsinitrd initrd-3.1.0-desktop-0.rc10.1.mga2.img | grep ata
-rw-r--r--   1 root     root        99345 Oct 18 07:31 lib/modules/3.1.0-desktop-0.rc10.1.mga2/libata.ko.gz
-rw-r--r--   1 root     root         2747 Oct 18 07:31 lib/modules/3.1.0-desktop-0.rc10.1.mga2/pata_acpi.ko.gz
-rw-r--r--   1 root     root         8838 Oct 18 07:31 lib/modules/3.1.0-desktop-0.rc10.1.mga2/ata_piix.ko.gz
-rw-r--r--   1 root     root         3108 Oct 18 07:31 lib/modules/3.1.0-desktop-0.rc10.1.mga2/ata_generic.ko.gz
echo "Loading libata module"
modprobe -q libata
echo "Loading ata_generic module"
modprobe -q ata_generic
echo "Loading pata_acpi module"
modprobe -q pata_acpi
echo "Loading ata_piix module"
modprobe -q ata_piix

So for some reason ata-generic is put before SATA (reverse order from modules.order ???),
and probably it pulls ATA piix.ko module on harware detection.
Should not ata-piix be tried before, and use ata-generic for whatever remains without
a responsible driver ?
I think the initrd generation is putting the load of specific drivers _after_ the generic ones.

Boot log in the good box:

SCSI subsystem initialized
libata version 3.00 loaded.
ata_piix 0000:00:1f.1: version 2.13
ata_piix 0000:00:1f.1: PCI INT A -> GSI 18 (level, low) -> IRQ 18
ata_piix 0000:00:1f.1: setting latency timer to 64
scsi0 : ata_piix
scsi1 : ata_piix
ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xf000 irq 14
ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xf008 irq 15
ata_piix 0000:00:1f.2: PCI INT A -> GSI 18 (level, low) -> IRQ 18
ata_piix 0000:00:1f.2: MAP [ P0 -- P1 -- ]
ata_piix 0000:00:1f.2: setting latency timer to 64
scsi2 : ata_piix
scsi3 : ata_piix
ata3: SATA max UDMA/133 cmd 0xc000 ctl 0xc400 bmdma 0xd000 irq 18
ata4: SATA max UDMA/133 cmd 0xc800 ctl 0xcc00 bmdma 0xd008 irq 18
ata2.00: ATAPI: CD-232E, 1.0A, max UDMA/33
ata2.00: configured for UDMA/33
ata1.00: ATA-6: ST3120022A, 3.06, max UDMA/100
ata1.00: 234441648 sectors, multi 16: LBA48 
ata1.00: configured for UDMA/100
scsi 0:0:0:0: Direct-Access     ATA      ST3120022A       3.06 PQ: 0 ANSI: 5
scsi 1:0:0:0: CD-ROM            TEAC     CD-232E          1.0A PQ: 0 ANSI: 5
Uniform Multi-Platform E-IDE driver
ide-gd driver 1.18
sd 0:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/111 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2 sda3
sd 0:0:0:0: [sda] Attached SCSI disk


In the bad one:

Uniform Multi-Platform E-IDE driver
ide-gd driver 1.18
SCSI subsystem initialized
libata version 3.00 loaded.
pata_acpi 0000:00:1f.1: PCI INT A -> GSI 18 (level, low) -> IRQ 18
pata_acpi 0000:00:1f.1: setting latency timer to 64
pata_acpi 0000:00:1f.1: PCI INT A disabled
pata_acpi 0000:00:1f.2: PCI INT A -> GSI 18 (level, low) -> IRQ 18
pata_acpi 0000:00:1f.2: setting latency timer to 64
pata_acpi 0000:00:1f.2: PCI INT A disabled
piix 0000:00:1f.1: IDE controller (0x8086:0x24db rev 0x02)
PIIX_IDE 0000:00:1f.1: PCI INT A -> GSI 18 (level, low) -> IRQ 18
piix 0000:00:1f.1: not 100% native mode: will probe irqs later
PIIX_IDE 0000:00:1f.1: setting latency timer to 64
    ide0: BM-DMA at 0xf000-0xf007
    ide1: BM-DMA at 0xf008-0xf00f
Probing IDE interface ide0...
hda: ST3120022A, ATA DISK drive
hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hda: UDMA/100 mode selected
Probing IDE interface ide1...
hdc: CD-232E, ATAPI CD/DVD-ROM drive
hdc: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hdc: UDMA/33 mode selected
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 512KiB
hda: 234441648 sectors (120034 MB) w/2048KiB Cache, CHS=16383/255/63
hda: cache flushes supported
 hda: hda1 hda2 hda3

lspcidrake lists ata-piix for the controller in both boxes.
I have tried adding ata-piix in modprobe.preload, but no luck.
Where can I put the preload for mkinitrd ?

TIA


More information about the Mageia-dev mailing list