DMA for IDE doesn't work in hardy on nforce2

Asked by Boris Toloknov

I installed hardy( betta ) several days ago and upgrated the kernel to the current version 2.6.24-16-generic. Now I'm unable to turn DMA on for my IDE HDD ( and IDE DVD as well ). hdparm shows a message about insufficient permission. Please note: this kernel doesn't have amd74xx. I tried to reorder (ata|ide) modules in /etc/initramfs-tools/modules in several ways. No luck.
Any ideas ?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Evert van Grootheest
Solved:
Last query:
Last reply:
Revision history for this message
Boris Toloknov (tlknv) said :
#1

Here is my lsmod with untouched /etc/initramfs-tools/modules
Module Size Used by
isofs 36388 1
udf 88612 0
ipv6 267780 8
af_packet 23812 2
rfcomm 41744 2
l2cap 25728 13 rfcomm
bluetooth 61156 4 rfcomm,l2cap
ppdev 10372 0
cpufreq_powersave 2688 0
cpufreq_stats 7104 0
cpufreq_userspace 5284 0
cpufreq_ondemand 9740 0
cpufreq_conservative 8712 0
freq_table 5536 2 cpufreq_stats,cpufreq_ondemand
video 19856 0
output 4736 1 video
container 5632 0
sbs 15112 0
sbshc 7680 1 sbs
dock 11280 0
battery 14212 0
iptable_filter 3840 0
ip_tables 14820 1 iptable_filter
x_tables 16132 1 ip_tables
ext3 136712 1
jbd 48404 1 ext3
mbcache 9600 1 ext3
ac 6916 0
sbp2 24072 0
lp 12324 0
snd_mpu401 9448 0
snd_mpu401_uart 9728 1 snd_mpu401
evdev 13056 3
analog 13600 0
gameport 16008 1 analog
snd_intel8x0 35356 3
snd_ac97_codec 101028 1 snd_intel8x0
ac97_bus 3072 1 snd_ac97_codec
snd_pcm_oss 42144 0
snd_mixer_oss 17920 1 snd_pcm_oss
snd_pcm 78596 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_seq_dummy 4868 0
parport_pc 36260 1
parport 37832 3 ppdev,lp,parport_pc
serio_raw 7940 0
button 9232 0
snd_seq_oss 35584 0
psmouse 40336 0
snd_seq_midi 9376 0
snd_rawmidi 25760 2 snd_mpu401_uart,snd_seq_midi
snd_seq_midi_event 8320 2 snd_seq_oss,snd_seq_midi
snd_seq 54224 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer 24836 2 snd_pcm,snd_seq
snd_seq_device 9612 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
i2c_nforce2 7680 0
i2c_core 24832 1 i2c_nforce2
nvidia_agp 9628 1
shpchp 34452 0
pci_hotplug 30880 1 shpchp
agpgart 34760 1 nvidia_agp
snd 56996 19 snd_mpu401,snd_mpu401_uart,snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_dummy,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore 8800 1 snd
snd_page_alloc 11400 2 snd_intel8x0,snd_pcm
pcspkr 4224 0
reiserfs 239616 3
ide_cd 32544 1
cdrom 37408 1 ide_cd
ide_disk 17536 6
ata_generic 8324 0
pata_amd 14212 0
floppy 59588 0
ohci1394 33584 0
pata_acpi 8320 0
ieee1394 93752 2 sbp2,ohci1394
libata 159344 3 ata_generic,pata_amd,pata_acpi
ehci_hcd 37900 0
ohci_hcd 25348 0
scsi_mod 151436 2 sbp2,libata
forcedeth 51980 0
usbcore 146028 3 ehci_hcd,ohci_hcd
ide_generic 2176 0 [permanent]
ide_core 113996 3 ide_cd,ide_disk,ide_generic
thermal 16796 0
processor 36872 1 thermal
fan 5636 0
fbcon 42912 0
tileblit 3456 1 fbcon
font 9472 1 fbcon
bitblit 6784 1 fbcon
softcursor 3072 1 bitblit
fuse 50580 1

Revision history for this message
Jan Evert van Grootheest (j-e-van-grootheest) said :
#2

Boris,

It is using ide_generic to drive your nforce2. I'm not enitrely sure which driver should drive it, since you didn't yet include an lspci overview.

You could try matching the PCI id with the ide modules yourself, modinfo is your friend.
Don't forget to check the ata drivers as well. Those are in /lib/modules/.../kernel/drivers/ata. There's a pata_amd that might be able to drive your chipset.

NOTE THAT THIS NEXT SUGGESTION CAN STOP YOUR SYSTEM FROM BOOTING!
You could try to rename ide-generic.ko to something else and recreate the initrd.

In case your system doesn't boot without ide_generic, in grub you can edit the boot configuration. Change the initrd to use the previous one (that still contains ide_generic). Normally this is saved adding .bak to the filename. Better still is to make a copy of the working initrd so that you can use that to recover.

Revision history for this message
Boris Toloknov (tlknv) said :
#3

Thanks for the answer. lspci says that my IDE controller is 10de:0065. I already tried to add pata_amd into /etc/initramfs-tools/modules ( and ran update-initramfs ). Boot process hangs for a while and I get into busybox at initramfs. I see that pata_amd is loaded before ide_generic and uses scsi(0|1). ide_generic sees that the resources is busy. What is a correct method to use pata_amd instead of/before ide_generic ? Is ide_generic able to work with my nforce2 (10de:0065) in DMA mode ? pata_amd is the only module that claims 10de:0065.

Revision history for this message
Jan Evert van Grootheest (j-e-van-grootheest) said :
#4

Sorry, I should've mentioned this from the start.
If pata_amd claimed the ide, then your old /dev/hda has become /dev/sdx. Take a look at the prints when you get to the shell (use <shift>+<pgup> to scroll back).
So you will need to replace /dev/hdx on the root= kernel parameter with /dev/sday (x and y can be different, but generally not).

You may run into the same problems with /etc/fstab. I know that ubuntu generally uses UUIDs in /etc/fstab so it shouldn't be a problem, but you may want to check for /dev/hdx in there.

Revision history for this message
Best Jan Evert van Grootheest (j-e-van-grootheest) said :
#5

Oops, I see I made a typo.
So you will need to replace /dev/hdx with /dev/sdy.
Of course there's a partition involved, but those number don't change. For example, root=/dev/hda1 (on one of my machines) had to be replaced with /dev/sdc1.

Revision history for this message
Boris Toloknov (tlknv) said :
#6

Thanks a lot. It works great now ! By the way I found another way to pass root=XXX using labels: root=LABEL=this_partition_label.

Revision history for this message
Boris Toloknov (tlknv) said :
#7

Thanks janevert, that solved my question.