Jump to content

Troubleshooting DMA


Guest Uitlander
 Share

Recommended Posts

Guest Uitlander

Hi,

 

I'm relatively new to Linux, and have cut my teeth setting up a Mandrake 8.2 server using an old Toshiba 320CDT laptop (P233MMX) with 96 MB RAM and a new 40 GB HDD. Various reasons for going with 8.2, mainly to do with it correctly detecting hardware and working straight from install (unlike 9, 10, and assorted other distros). Since doing that I've updated the kernel to 2.4.27, and in the process managed to improve its performance. My one remaining issue is an apparently inability to get DMA working. I'd particularly like to do this as I want to use the system for streaming audio into my stereo, and at the moment any audio is interrupted during disc access, which rather ruins the end user experience! AFAIK all the necessary DMA related options are set in the kernel .config, and I have tried to turn it on manually with hdparm. My .config looks like this:

 

# ATA/IDE/MFM/RLL support

#

CONFIG_IDE=y

 

# IDE, ATA and ATAPI Block devices

#

CONFIG_BLK_DEV_IDE=y

CONFIG_BLK_DEV_IDEDISK=y

CONFIG_IDEDISK_MULTI_MODE=y

CONFIG_IDEDISK_STROKE=y

CONFIG_BLK_DEV_IDECS=m

CONFIG_BLK_DEV_IDECD=y

CONFIG_BLK_DEV_IDEFLOPPY=y

CONFIG_BLK_DEV_CMD640=y

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_BLK_DEV_GENERIC=y

CONFIG_IDEPCI_SHARE_IRQ=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

CONFIG_BLK_DEV_OFFBOARD=y

CONFIG_BLK_DEV_IDEDMA_FORCED=y

CONFIG_IDEDMA_PCI_AUTO=y

CONFIG_IDEDMA_ONLYDISK=y

CONFIG_BLK_DEV_IDEDMA=y

CONFIG_BLK_DEV_AMD74XX=y

CONFIG_BLK_DEV_PIIX=y

CONFIG_IDE_CHIPSETS=y

CONFIG_IDEDMA_AUTO=y

 

This is what I see when I try to use hdparm:

 

$> hdparm -d /dev/hda

 

/dev/hda:

using_dma = 0 (off)

 

$> hdparm -d 1 /dev/hda

 

/dev/hda:

setting using_dma to 1 (on)

HDIO_SET_DMA failed: Operation not permitted

using_dma = 0 (off)

 

Fairly extensive googling indicates that Toshiba 320CDTs are DMA capable under Linux, and I haven't run across anyone else having this issue. The most likely suggestion I've heard so far is that I need to add chipset specific support into the kernel. However, the only info I've been able to find on the 320CDT chipset is that its a proprietary one with no published info. Can anyone suggest another approach?

Link to comment
Share on other sites

Guest Uitlander

Not a stupid question at all, I hadn't thought to look. I'm not very familiar with BIOS settings, so please bear with me. As far as I can see the only mention of DMA in it relates to the parallel port, and that is set to 'channel 3'. The BIOS is ACPI 7.20. I feel more googling coming on. Thank you for the suggestion.

Link to comment
Share on other sites

again, check the bios. i'm not an expert with hdparm. i just know enough to keep myself out of trouble. :P

 

to read all about hdparm (including DMA settings) check out This Article.

 

or, you can do man hdparm in terminal as root.

 

Chris

Edited by chris z
Link to comment
Share on other sites

Guest Uitlander

Thanks for the hdparm link, thats helped explain a bit more about what you can do with it.

 

I've checked my BIOS, and upgraded it to the latest version. As before the only entry that explicitly mentions DMA is for the parallel port, and thats turned on. Still stumped by this one I'm afraid.

Link to comment
Share on other sites

Another long shot to try. ACPI can still cause a lot of troubles. You can try booting with it disablesd by hitting the Esc key as soon as you see the lilo selection screen which will take you to a boot prompt. At the prompt, type:

 

<lable name of boot entry> noapic, nolapic

 

If that doesn't help, it's probably a kernel config issue. The first thing you want to try and do is identify the motherboard chipset. You can start by examining the output of:

 

$ lspci

 

Once you know the chipset, you can google more effectively for known issues with that kernel. Also, 2.4.28 should be coming out very shortly; it's already at rc-3. It might be worth giving that a try.

Link to comment
Share on other sites

Use /etc/sysconfig/harddisks to set DMA and other hdparm options.

 

If you want to set options for hda, copy/etc/sysconfig/harddisks to /etc/sysconfig/harddiskhda and then edit the file to enable the options you want.

 

My memory is not as good as it used to be, but I think they used the harddisks file in 8.2

Edited by Germ
Link to comment
Share on other sites

One thing you can check in BIOS, is if there is an option for Load Optimized Defaults. In most Bioses, this turns on 32 bit access for your IDE. Sometimes there is an actual option for 32 bit. I think it also turns on DMA support for the IDE channels.

 

If the bios has the optimized defaults option, then you need to change the hdd parameters from Auto (which defaults to CHM, which is bad for linux) to LBA before you save and exit bios.

 

I hope this helps.

Link to comment
Share on other sites

Along with the other hints and tips, have a look at /var/log/dmesg to see if it actually tries to turn on the dma, and if it fails, why.

 

I once had shoddy dvd playback, which was due to lack of dma, which was due to an unrecognised chipset on my Asus a7v333 - which was at that point the bleeding edge (March 2002?).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...