LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can't Enable DMA (https://www.linuxquestions.org/questions/slackware-14/cant-enable-dma-522167/)

alkos333 01-23-2007 05:36 PM

Can't Enable DMA
 
I'm running kernel 2.6.19.1(Reiserfs) on Slackware 11. On every boot-up I get a message saying that DMA is turned off which might slow down the fsck process. I tried to enable it, but:

Code:

root@alkos333:~# hdparm -d1 /dev/hda

/dev/hda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)

I googled, but haven't found a solution yet. Here is some info:

lspci:

Code:

root@alkos333:~# lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
02:00.0 Ethernet controller: Intel Corporation 82573L Gigabit Ethernet Controller
03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
15:00.0 CardBus bridge: Texas Instruments PCI1510 PC card Cardbus Controller

hdparm /dev/hda

Code:

root@alkos333:~# hdparm /dev/hda

/dev/hda:
 multcount    = 16 (on)
 IO_support  =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly    =  0 (off)
 readahead    = 256 (on)
 geometry    = 16383/255/63, sectors = 195371568, start = 0

hdparm -i /dev/hda

Code:

root@alkos333:~# hdparm -i /dev/hda

/dev/hda:

 Model=HTS721010G9SA00, FwRev=MCZIC10H, SerialNo=MPCZH1Y0GR89JD
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=DualPortCache, BuffSize=7538kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=195371568
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2
 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-7 T13 1532D revision 1:  ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6 ATA/ATAPI-7

 * signifies the current active mode

hdparm -tT /dev/hda (without any processes running):

Code:

root@alkos333:~# hdparm -tT /dev/hda

/dev/hda:
 Timing cached reads:  4416 MB in  2.00 seconds = 2209.68 MB/sec
 Timing buffered disk reads:    6 MB in  3.37 seconds =  1.78 MB/sec

dmesg output: http://alkos333.net/dmesg
lsmod output: http://alkos333.net/lsmod
kernel .config: http://alkos333.net/kernel-config

I read in this threadthat it could be that I'm not able to load dma because of not using initrd with Reiserfs. I currently have reiserfs compiled into the kernel and things work, except the dma. I tried compiling it as a module, ran mkinitrd -c -k 2.6.19.1 -m reiserfs, but then I get a kernel panic error. I'm not clear on this whole reiserfs issue, but maybe it has nothing to do with this at all.


Update: People told me that filesystem has absolutely nothing to do with this issue. Some suggested that it was a bad hard drive and SATA didn't support DMA. Well I booted windows on the same computer, and installed HD tune. It showed that not only was my buffered read speed 47.6 or in upper 30s on average, but my sata hd supported UDMA mode5 and was currently running on it in windows.
Here are the snap shots: http://alkos333.net/stat0.jpg http://alkos333.net/stat1.jpg

As you can see, hdparm -i doesn't even show that my hd supports udma5 which is weird, so there is definitely something wrong with kernel config that I can't figure out.

pbhj 01-23-2007 06:45 PM

Check dmesg and look for lines like:

Quote:

ide: failed opcode was: unknown
hdb: task_in_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdb: task_in_intr: error=0x10 { SectorIdNotFound }, LBAsect=39167615, sector=39102336
Then do a search on some of those strings if (when!) you find them (you could search on "pbhj" too, might help). These sorts of problems can be caused by not having tmpfs in your kernel or not having reiserfs in your mkinitrd (make-initial-ram-disk). There are docs included with Slackware that tell you what to do to install a mkinitrd.

Note: none of the solutions I've tried has worked but I haven't yet recompiled and enabled the tmpfs as it's a PITA to reconfigure my NVIDIA geForce2 GTS card each time.

alkos333 01-24-2007 01:48 AM

I tried searching for the things you mentioned, but didn't find anything. As far as initrd and tmpfs. What's tmpfs? I have reiserfs compiled into the kernel. I tried compiling it as a module and running initrd, but get a kernel panic ( I followed README.initrd in /boot directory). Could you please be more specific as to what tmpfs is and what I should do for intird besides what I've done already?

SqdnGuns 01-30-2007 03:12 AM

Did you compile your Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 02) into the kernel or as a module? I havce read that it needs to be compiled into the kernel.

SqdnGuns 01-30-2007 03:37 AM

Take a gander at this, http://thomer.com/howtos/dma_on_sata_dvd.html , it may have your answer.

Good Luck!

EDIT:

I had the same problem as you did, that's how I found your post. I just recompiled my kernel with the appropriate ATA and DMA Engines and what a difference!!

/dev/hda:
setting using_dma to 1 (on)
using_dma = 1 (on)
root@JARHEAD:/home/sqdnguns# hdparm /dev/hda

/dev/hda:
multcount = 0 (off)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 1 (on)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 65535/16/63, sectors = 78140160, start = 0
root@JARHEAD:/home/sqdnguns# hdparm -i /dev/hda

/dev/hda:

Model=TOSHIBA MK4026GAX, FwRev=PA102D, SerialNo=25HG1735T
Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=48
BuffType=unknown, BuffSize=0kB, MaxMultSect=16, MultSect=off
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78140160
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=yes: unknown setting WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-1 ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6

* signifies the current active mode

root@JARHEAD:/home/sqdnguns# hdparm -tT /dev/hda

/dev/hda:
Timing cached reads: 2008 MB in 2.00 seconds = 1004.12 MB/sec
Timing buffered disk reads: 102 MB in 3.00 seconds = 33.95 MB/sec


Start recompiling my friend!!

alkos333 01-31-2007 10:39 AM

I tried setting my BIOS to AHCI (in which case XP can't load, but it's alright) and I have everything they are mentioning built-in, including PIIX. Yet, when it loads, I get a kernel panic error. I would appreciate if you could post your kernel here as well. Here is mine: http://alkos333.net/kernel-config If you need more info, there are pastes in the first post. Thank you so much for assisting me on this issue.

SqdnGuns 01-31-2007 09:49 PM

Quote:

Originally Posted by alkos333
I tried setting my BIOS to AHCI (in which case XP can't load, but it's alright) and I have everything they are mentioning built-in, including PIIX. Yet, when it loads, I get a kernel panic error. I would appreciate if you could post your kernel here as well. Here is mine: http://alkos333.net/kernel-config If you need more info, there are pastes in the first post. Thank you so much for assisting me on this issue.

Leaving for Bangkok in a few hours and not sure when I will have access to Internet again. As soon as I do, I will post my .config

Off to the "Land of Smiles".............................

alkos333 02-01-2007 02:26 PM

Success!!!
 
I have finally resolved the problem. I pulled out my Slackware 11 installation CD and loaded huge26.s (2.6.17.13) and ran fdisk -l to see if it found my hd on /dev/sda and it did. I then ran hdparm -tT /dev/sda to see the buffer disk read speed and it was 50 mb/s instead of 1.73 which proved that it could be done. I modified /etc/fstab and /etc/lilo.conf to replace hda with sda. Then I ran lilo. After that I had to recompile my kernel to disable the CONFIG_IDE support because it interfered with the SCSI controller on boot-up. For ThinkPad T60, leave the SATA Mode on Compatibility, don't change to AHCI. Then I rebooted my system and everything worked! :)


All times are GMT -5. The time now is 09:34 AM.