# DMA not working - yet another DMA request (yadmar)

## hunky

I've been reading through all the posts about getting DMA working on a 2.6.x kernel. I've got it working fine no problem on 2.6.7-gentoo-r11 (gentoo-dev-sources), but haven't since on any newer kernel. Latest attempt was 2.6.10-r2. Also tried 2.6.9-r6. (and a few 2.6.8 kernels including love, nitro, ck, etc).  I'm getting tired of recompiling kernels.

<edit> This system is using SATA drives - might be part of the reason for kernel panics when I remove some things from kernel). </edit>

My system is Intel, an Abit IS-7 board with Intel 82865 + 82801 chipsets. P4. Haven't found references to other chips (via?) in the manual but that may just be my dunce-hood. But I have enabled the VIA chipset in the kernel, just in case. HEre's this:

```
linux-ant root # grep DMA /usr/src/linux/.config

CONFIG_GENERIC_ISA_DMA=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_BLK_DEV_IDEDMA_FORCED is not set

CONFIG_IDEDMA_PCI_AUTO=y

# CONFIG_IDEDMA_ONLYDISK is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_IVB is not set

CONFIG_IDEDMA_AUTO=y

```

and here's this:

```
linux-ant root # grep PCI /usr/src/linux/.config

CONFIG_ACPI_PCI=y

# Bus options (PCI, PCMCIA, EISA, MCA, ISA)

CONFIG_PCI=y

# CONFIG_PCI_GOBIOS is not set

# CONFIG_PCI_GOMMCONFIG is not set

# CONFIG_PCI_GODIRECT is not set

CONFIG_PCI_GOANY=y

CONFIG_PCI_BIOS=y

CONFIG_PCI_DIRECT=y

CONFIG_PCI_MMCONFIG=y

# CONFIG_PCI_MSI is not set

CONFIG_PCI_LEGACY_PROC=y

CONFIG_PCI_NAMES=y

# PCI Hotplug Support

# CONFIG_HOTPLUG_PCI is not set

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

CONFIG_IDEDMA_PCI_AUTO=y

# CONFIG_IEEE1394_PCILYNX is not set

CONFIG_NET_PCI=y

# CONFIG_NE2K_PCI is not set

# CONFIG_SERIO_PCIPS2 is not set

# PCI devices

# CONFIG_SND_YMFPCI is not set

# CONFIG_SND_CMIPCI is not set
```

I have tried removing Generic-ide-support (poor memory - please excuse) and I get kernel panics so I must not have something enabled. Here's this:

```
linux-ant root # grep IDE /usr/src/linux/.config

# CONFIG_ACPI_VIDEO is not set

# CONFIG_PARIDE is not set

CONFIG_IDE=y

CONFIG_BLK_DEV_IDE=y

# Please see Documentation/ide.txt for help/info on IDE drives

# CONFIG_BLK_DEV_IDE_SATA is not set

# CONFIG_BLK_DEV_HD_IDE is not set

CONFIG_BLK_DEV_IDEDISK=y

# CONFIG_IDEDISK_MULTI_MODE is not set

CONFIG_BLK_DEV_IDECD=y

# CONFIG_BLK_DEV_IDETAPE is not set

# CONFIG_BLK_DEV_IDEFLOPPY is not set

# CONFIG_BLK_DEV_IDESCSI is not set

# CONFIG_IDE_TASK_IOCTL is not set

# IDE chipset support/bugfixes

CONFIG_IDE_GENERIC=y

CONFIG_BLK_DEV_IDEPNP=y

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_BLK_DEV_IDEDMA_FORCED is not set

CONFIG_IDEDMA_PCI_AUTO=y

# CONFIG_IDEDMA_ONLYDISK is not set

# CONFIG_IDE_ARM is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_IVB is not set

CONFIG_IDEDMA_AUTO=y

# CONFIG_IEEE1394_VIDEO1394 is not set

# CONFIG_VIDEO_DEV is not set

# CONFIG_VIDEO_SELECT is not set

# CONFIG_SND_TRIDENT is not set
```

I do have the Intel PIIXn chipsets support enabled.

When I first emerged the new kernels, I did it by doing the make oldconfig process from my working 2.6.7 kernel.

I'm probably overlooking something simple and would greatly appreciate if anyone could take the time to help walk me through a few steps to get this working. Be happy to provide more info - hate to post the whole config here but maybe I can get it on my website or something. Or I can post it here - be easier for me.

cheers, hunky

----------

## hunky

I've posted the complete .config file here:

.config

And in case, here's the complete dmesg:

dmesg

I've got a few things enabled that I probably shouldn't - I'm a noob when it comes to kernel configs (as well as other things). If anyone spots things that shouldn't be, I would appreciate the comments.

This computer does have a scsi card for my scsi scanner. It has two SATA drives. It has a Matrox G550 (?) video card.  Not sure what other info is required,  but have to wait til this evening my time before I could post it (unless from memory).

cheers, hunky

----------

## dsd

please post "lspci" and "lspci -n" output

----------

## hunky

```
linux-ant root # lspci

0000:00:00.0 Host bridge: Intel Corp. 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)

0000:00:01.0 PCI bridge: Intel Corp. 82865G/PE/P PCI to AGP Controller (rev 02)

0000:00:1d.0 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)

0000:00:1d.1 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)

0000:00:1d.2 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #3 (rev 02)

0000:00:1d.3 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)

0000:00:1d.7 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)

0000:00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev c2)

0000:00:1f.0 ISA bridge: Intel Corp. 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)

0000:00:1f.2 IDE interface: Intel Corp. 82801EB (ICH5) SATA Controller (rev 02)

0000:00:1f.3 SMBus: Intel Corp. 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)

0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)

0000:01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G550 AGP (rev 01)

0000:02:01.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)

0000:02:02.0 Ethernet controller: 3Com Corporation 3c940 10/100/1000Base-T [Marvell] (rev 12)

0000:02:06.0 Multimedia audio controller: VIA Technologies Inc. ICE1712 [Envy24] PCI Multi-Channel I/O Controller (rev 02)

0000:02:09.0 SCSI storage controller: Advanced Micro Devices [AMD] 53c974 [PCscsi] (rev 10)
```

```
linux-ant root # lspci -n

0000:00:00.0 Class 0600: 8086:2570 (rev 02)

0000:00:01.0 Class 0604: 8086:2571 (rev 02)

0000:00:1d.0 Class 0c03: 8086:24d2 (rev 02)

0000:00:1d.1 Class 0c03: 8086:24d4 (rev 02)

0000:00:1d.2 Class 0c03: 8086:24d7 (rev 02)

0000:00:1d.3 Class 0c03: 8086:24de (rev 02)

0000:00:1d.7 Class 0c03: 8086:24dd (rev 02)

0000:00:1e.0 Class 0604: 8086:244e (rev c2)

0000:00:1f.0 Class 0601: 8086:24d0 (rev 02)

0000:00:1f.2 Class 0101: 8086:24d1 (rev 02)

0000:00:1f.3 Class 0c05: 8086:24d3 (rev 02)

0000:00:1f.5 Class 0401: 8086:24d5 (rev 02)

0000:01:00.0 Class 0300: 102b:2527 (rev 01)

0000:02:01.0 Class 0c00: 104c:8024

0000:02:02.0 Class 0200: 10b7:1700 (rev 12)

0000:02:06.0 Class 0401: 1412:1712 (rev 02)

0000:02:09.0 Class 0100: 1022:2020 (rev 10)
```

----------

## dsd

you should try the libata SATA driver (the PIIX one is outdated for sata..)

Device Drivers  --->

SCSI device support  --->

<*>   SCSI disk support 

 SCSI low-level drivers  ---> 

[*] Serial ATA (SATA) support

<*>   Intel PIIX/ICH SATA support

bear in mind that your disk will now be /dev/sda - you will have to update your boot parameters and fstab accordingly.

----------

## hunky

Ok - I can give it another shot. Do I need to uncheck any of the ide, or which of the ide, choices as well? Maybe someone could let me know.

I know when I first installed Gentoo, on 2.6.1 something, I had a heck of time getting the kernel to get past panic and boot - when using sata anything in the kernel. The only success I had was getting away from anything sata. (Even though I have the sata drives). But things must have changed.

I think I will get some time this evening to try it. Appreciate the help!! Thanks.

cheers, Hunky

----------

## hunky

Well, I made the changes and was able to boot into the kernel if I commented out the second hard drive sdb3 in fstab. If I didn't comment it out, it would hang on "replaying journal".

Then, if I mounted sdb3 and tried to access it in konqueror I would get a hard crash and have to do cold reboot.

DMA seems to be working but if I check, I get this:

```

linux-ant root # hdparm -cdi /dev/sda

/dev/sda:

 IO_support   =  0 (default 16-bit)

 HDIO_GET_IDENTITY failed: Inappropriate ioctl for device

```

Not sure if that is wrong syntax.

During boot I noticed the DMA could not be set on /dev/discs/disc0  and disc1 or /dev/cdroms/cdrom0. I was able to get grip to play a cd, so I have access.

grub.conf:

```
title=gentoo-dev-2.6.10-r2

root (hd0,0)

kernel (hd0,0)/boot/kernel-2.6.10-r2 root=/dev/sda5 gentoo=nodevfs

```

fstab: (not sure if this stuff is right but best I could do with the manual at the time and was sort of working)

```
# <fs>                  <mountpoint>    <type>          <opts>                  <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/sda1               /boot           ext2            noauto,noatime          1 1

/dev/sda5               /               reiserfs        noatime                 0 1

/dev/sda2               none            swap            sw                      0 0

/dev/sda6               /var            reiserfs        defaults                1 2

/dev/sda7               /usr            reiserfs        defaults                1 2

/dev/sda8               /home           reiserfs        defaults                1 2

none                    /tmp            tmpfs           defaults                0 0

# /dev/sdb3             /mnt/bakdisk    reiserfs        defaults                0 2

/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro,user,unhide   0 0

/dev/fd0                /mnt/floppy     auto            noauto,user             0 0

# NOTE: The next line is critical for boot!

none                    /proc           proc            defaults                0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

# Adding the following line to /etc/fstab should take care of this:

none                    /dev/shm        tmpfs           defaults                0 0

```

<edit> So basically I don't know where to go from here. I need that other disk to work. It is actually an ide (ata) disk with an serielle 2 adapter on it to make it work on an sata channel. Not sure that is the problem though, but perhaps could be. </edit>

----------

## dsd

ok, sounds like material for a bug report.

if you dont mind, you could go back into the kernel config and disable the SCSI SATA drivers again. under the ATA/ATAPI section, enable these (the top one probably being the one you missed before) :

```
[*]     Support for SATA (deprecated; conflicts with libata SATA driver)

[*]     PCI IDE chipset support 

<*>         Intel PIIXn chipsets support
```

you'll need to change your boot parameters and fstab back to how they were (sorry!) 

please let me know if this helps

----------

## hunky

Woo hoo - that did it. It sure seems like when I was first installing - which looking back was actually on 2.4.20 and then 2.6.0-r11, that deprecated support for sata was causing me kernel panic. But that may have been a different problem - just not sure. But I've avoided it since because of that.

However, as it is deprecated it will be going away so .. 

About filing that bug.. you think I ought to? I'm afraid my grasp of all this may not be up to the task - but I will do it if you think I should.

cheers, and thanks much. Let me know if you need more info.

----------

## dsd

could you please development-sources-2.6.10-rc2 with the libata/SCSI sata driver and see if the issue exists there?

if it does, then we can gather more info and submit a bug report

----------

## hunky

Yes, that is the kernel I have been using for this go-round.

I will have to wait for lunch or this evening before I can give much more info as I am away from the computer now. cheers.

----------

## dsd

ok, here's what you should do:

file a bug report at http://bugzilla.kernel.org

put it under: IO/Storage --> Serial ATA

write a quick summary etc.

after posting the bug, upload (as attachment) your dmesg output from running 2.6.10-rc2 after experiencing the mount problem, plus your .config file

be sure to mention that it works ok under the older PIIX IDE driver when configured for deprecated sata support

----------

## hunky

Will do.

Not sure how to handle the sdb3 problem though. It won't boot with it in fstab, and if I mount it after booting, I get a hard crash.

<edit> as far as getting a dmesg - how could one? </edit>

Thanks for your help. Cheers, Hunky

----------

