After upgrading to kernel 2.4.21 using make oldconfig, with no tuning of IDE support parameters, hdparm fails to set DMA: root@triffid etc # hdparm -d1 /dev/hda /dev/hda: setting using_dma to 1 (on) HDIO_SET_DMA failed: Operation not permitted using_dma = 0 (off) root@triffid etc # This operation worked under kernel 2.4.20. Relevant /user/src/linux/.config excerpt: # # ATA/IDE/MFM/RLL support # CONFIG_IDE=y # # IDE, ATA and ATAPI Block devices # CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # # CONFIG_BLK_DEV_HD_IDE is not set # CONFIG_BLK_DEV_HD is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_IDEDISK_STROKE is not set CONFIG_BLK_DEV_IDECD=m # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set CONFIG_BLK_DEV_IDESCSI=m # CONFIG_IDE_TASK_IOCTL is not set # # IDE chipset support/bugfixes # # CONFIG_BLK_DEV_CMD640 is not set 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 is not set # 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_PCI_WIP is not set # CONFIG_BLK_DEV_ADMA100 is not set # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set # CONFIG_BLK_DEV_AMD74XX is not set # CONFIG_BLK_DEV_CMD64X is not set # CONFIG_BLK_DEV_TRIFLEX is not set # CONFIG_BLK_DEV_CY82C693 is not set # CONFIG_BLK_DEV_CS5530 is not set # CONFIG_BLK_DEV_HPT34X is not set # CONFIG_BLK_DEV_HPT366 is not set # CONFIG_BLK_DEV_PIIX is not set # CONFIG_BLK_DEV_NS87415 is not set # CONFIG_BLK_DEV_OPTI621 is not set # CONFIG_BLK_DEV_PDC202XX_OLD is not set # CONFIG_BLK_DEV_PDC202XX_NEW is not set # CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_SC1200 is not set # CONFIG_BLK_DEV_SVWKS is not set # CONFIG_BLK_DEV_SIIMAGE is not set # CONFIG_BLK_DEV_SIS5513 is not set # CONFIG_BLK_DEV_SLC90E66 is not set # CONFIG_BLK_DEV_TRM290 is not set # CONFIG_BLK_DEV_VIA82CXXX is not set CONFIG_IDEDMA_AUTO=y # CONFIG_IDEDMA_IVB is not set # CONFIG_DMA_NONPCI is not set CONFIG_BLK_DEV_IDE_MODES=y # CONFIG_BLK_DEV_ATARAID is not set Motherboard is Asus A7N266-VM with nVidia nForce MCP-D south bridge chipset, relevant /proc/pci excerpt: Bus 0, device 9, function 0: IDE interface: nVidia Corporation nForce IDE (rev 195). Master Capable. No bursts. Min Gnt=3.Max Lat=1. I/O at 0xb800 [0xb80f]. The hdparm is the latest ebuild, unchanged from working system: root@triffid proc # hdparm -V hdparm v5.3 root@triffid proc # There seems to be no difficulty recognising the drive at boot: relevant dmesg excerpt: Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx hda: Maxtor 6E020L0, ATA DISK drive hdc: SAMSUNG CD-R/RW SW-248F, ATAPI CD/DVD-ROM drive ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 ide1 at 0x170-0x177,0x376 on irq 15 hda: attached ide-disk driver. hda: host protected area => 1 hda: 40718160 sectors (20848 MB) w/2048KiB Cache, CHS=2534/255/63 Have I missed a trick here in configuring the new kernel? This reduces my hard disc throughput by a factor of five. Reproducible: Always Steps to Reproduce: 1. boot. if hdparm is in boot runlevel, it is apparently ignored. from /etc/conf.d/hdparm: disc0_args="-X66 -d1 -u1 -m16 -c3" 2. check: root@triffid rick # 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 = 8 (on) geometry = 2534/255/63, sectors = 40718160, start = 0 3. Try setting DMA manually: root@triffid etc # hdparm -d1 /dev/hda /dev/hda: setting using_dma to 1 (on) HDIO_SET_DMA failed: Operation not permitted using_dma = 0 (off) root@triffid etc # root@triffid proc # emerge --info Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4) ================================================================= System uname: 2.4.21 i686 AMD Athlon(tm) Processor GENTOO_MIRRORS="ftp://ftp.oregonstate.edu/pub/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://gentoo.oregonstate.edu http://distro.ibiblio.org/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/home/portage_tmp" PORTDIR_OVERLAY="" USE="tetex java guile esd imlib scanner x86 oss 3dfx 3dnow acpi alsa apm arts avi berkdb cdr crypt cups encode gdbm gif gpm gtk imlibjava jpeg kde -gnome libg++ libwww mikmod mmx motif mpeg mozilla ncurses nls oggvorbis opengl pam perl pdflib png python qt qtmt quicktime readline sdl slang spell sse ssl svga tcltk tcpd truetype usb X xml2 xmms xv zlib" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon -O3 -pipe" CXXFLAGS="-march=athlon -O3 -pipe" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.ca.gentoo.org/gentoo-portage/" FEATURES="sandbox ccache distcc userpriv" root@triffid proc #
I stupidly forgot to mention:- New kernel from vanilla-sources, distfile linux-2.4.21.tar.bz root@triffid rick # cat /proc/version Linux version 2.4.21 (root@triffid) (gcc version 3.2.2) #7 Tue Jun 17 17:17:36 MDT 2003
# CONFIG_BLK_DEV_AMD74XX is not set set it...
Thanks. This works, of course. I feel really silly wasting your time with an ill-configured kernel - please accept my apologies. Previously, in kernel 2.4.20 dma was apparently set depite this missing configuration, and with dma disk transfer rate increased from 6Mb/s to 30Mb/s. Under 2.4.21, with the proper configuration, I get 50Mb/s. Clearly, somebody tuned the driver, to good effect. The option in xconfig which sets this configuration variable is called "AMD Viper support". Unless one reads the help, it is less than transparently clear that this also enables nVidia nForce chip support. I'll be more careful in future.