2.4.21 can't set IDE DMA on harddrive (HDIO_SET_DMA failed: Operation not permitted)
Hi,
I'm now using kernel 2.4.20-13.8 (from RH8) and 2.4.21-ck1 (from Con Kolivas based on 2.4.21-rc6) and I'm unable to set the dma for my harddrive with hdparm:
# hdparm -d1 /dev/hda
/dev/hda:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)
Before these kernels I was using the 2.4.18 (from RH8 too) and 2.4.20-ck1 and setting DMA was working.
I checked my logs and found that the 2.4.21 kernel use E-IDE version 7.00beta[34]-.2.4 and the 2.4.20 one use version 6.31.
Looks like something went wrong in the IDE code regarding DMA settings ?
Here is the output from 'lspci' for my IDE controler (Toshiba Satellite 2540CDT):
--8<--
00:10.0 IDE interface: Toshiba America Info Systems: Unknown device 0102 (rev 34) (prog-if f0)
Subsystem: Toshiba America Info Systems: Unknown device 0002
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop-ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort-<TAbort-<MAbort- >SERR- <PERR-
Latency: 64 (500ns min, 10000ns max)
Region 4: I/O ports at 1800 [size=16]
-->8--
and the IDE 7.00beta3-.2.4 messages from /var/log/messages:
--8<--
May 26 12:54:10 satellite kernel: Uniform Multi-Platform E-IDE driver Revision: 7.00beta3-.2.4 May 26 12:54:10 satellite kernel: ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx May 26 12:54:10 satellite kernel: hda: TOSHIBA MK4309MAT, ATA DISK drive May 26 12:54:10 satellite kernel: hdc: CD-224E, ATAPI CD/DVD-ROM drive May 26 12:54:10 satellite kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 May 26 12:54:10 satellite kernel: ide1 at 0x170-0x177,0x376 on irq 15 May 26 12:54:11 satellite kernel: hda: attached ide-disk driver. May 26 12:54:11 satellite kernel: hda: host protected area => 1 May 26 12:54:11 satellite kernel: hda: 8452080 sectors (4327 MB), CHS=526/255/63
-->8--
and the IDE 6.31 messages:
--8<--
May 12 11:41:52 satellite kernel: Uniform Multi-Platform E-IDE driver Revision: 6.31 May 12 11:41:52 satellite kernel: ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx May 12 11:41:52 satellite kernel: PCI_IDE: unknown IDE controller on PCI bus 00 device 80, VID=1179, DID=0102 May 12 11:41:52 satellite kernel: PCI_IDE: chipset revision 52 May 12 11:41:53 satellite kernel: PCI_IDE: not 100%% native mode: will probe irqs later May 12 11:41:53 satellite kernel: ide0: BM-DMA at 0x1800-0x1807, BIOS settings: hda:DMA, hdb:pio May 12 11:41:53 satellite kernel: ide1: BM-DMA at 0x1808-0x180f, BIOS settings: hdc:pio, hdd:pio May 12 11:41:53 satellite kernel: hda: TOSHIBA MK4309MAT, ATA DISK drive May 12 11:41:53 satellite kernel: hdc: CD-224E, ATAPI CD/DVD-ROM drive May 12 11:41:53 satellite kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 May 12 11:41:53 satellite kernel: ide1 at 0x170-0x177,0x376 on irq 15 May 12 11:41:53 satellite kernel: blk: queue c03a7604, I/O limit 4095Mb (mask 0xffffffff) May 12 11:41:53 satellite kernel: hda: 8452080 sectors (4327 MB), CHS=526/255/63, UDMA(33) May 12 11:41:53 satellite kernel: hdc: ATAPI 24X CD-ROM drive, 128kB Cache, DMA
-->8--
Thanks.
Quoted 5 lines · Jérôme Augé
Hi,
I'm now using kernel 2.4.20-13.8 (from RH8) and 2.4.21-ck1 (from Con Kolivas based on 2.4.21-rc6) and I'm unable to set the dma for my harddrive with hdparm:
Feel free to blame me, but I haven't formally released 2.4.21-ck1, and you should really try the vanilla 2.4.21-rc kernel. Then you can post a bug report that the actual IDE developers can look at. Mine is a non-standard kernel tree and bug reports with that branch should just be directed to me.
Con
Quoted 12 lines · Con Kolivas
Quoted 5 lines · Jérôme Augé
Hi,
I'm now using kernel 2.4.20-13.8 (from RH8) and 2.4.21-ck1 (from Con Kolivas based on 2.4.21-rc6) and I'm unable to set the dma for my harddrive with hdparm:
Feel free to blame me, but I haven't formally released 2.4.21-ck1, and you should really try the vanilla 2.4.21-rc kernel. Then you can post a bug report that the actual IDE developers can look at. Mine is a non-standard kernel tree and bug reports with that branch should just be directed to me.
I just tried a vanilla 2.4.21-rc6 and I get the same error messages when trying to activate the DMA with hdparm.
I guess this is related to the new E-IDE code 7.00 in the 2.4.21 kernel
...
Here is the IDE config of this 2.4.21-rc6 kernel:
--8<--
#
# ATA/IDE/MFM/RLL support
#CONFIG_IDE=y
#
# IDE, ATA and ATAPI Block devices
#CONFIG_BLK_DEV_IDE=y
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not setCONFIG_BLK_DEV_IDEDISK=yCONFIG_IDEDISK_MULTI_MODE=y
# CONFIG_IDEDISK_STROKE is not set
# CONFIG_BLK_DEV_IDECS is not setCONFIG_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 setCONFIG_BLK_DEV_CMD640=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not setCONFIG_BLK_DEV_IDEPCI=y
# CONFIG_BLK_DEV_GENERIC is not setCONFIG_IDEPCI_SHARE_IRQ=yCONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_BLK_DEV_IDEDMA_FORCED is not setCONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not setCONFIG_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_WDC_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_AMD74XX_OVERRIDE 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_HPT34X_AUTODMA 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_PDC202XX_BURST 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_IDE_CHIPSETS is not setCONFIG_IDEDMA_AUTO=y
# CONFIG_IDEDMA_IVB is not set
# CONFIG_DMA_NONPCI is not setCONFIG_BLK_DEV_IDE_MODES=y
# CONFIG_BLK_DEV_ATARAID is not set
# CONFIG_BLK_DEV_ATARAID_PDC is not set
# CONFIG_BLK_DEV_ATARAID_HPT is not set
# CONFIG_BLK_DEV_ATARAID_SII is not set
-->8--
Quoted 7 lines · Jérôme Augé
I checked my logs and found that the 2.4.21 kernel use E-IDE version 7.00beta[34]-.2.4 and the 2.4.20 one use version 6.31.
Looks like something went wrong in the IDE code regarding DMA settings ?
Here is the output from 'lspci' for my IDE controler (Toshiba Satellite 2540CDT):
It used to be caught by the generic DMA driver that would just run with BIOS settings. This approach unfortunately also tended to grab devices that didn't work with just BIOS settings so I took it out and just left a table of known OK devices.
I'll add the toshiba one back and I've also pinged Toshiba to see if they will give me the docs to support it properly.
Alan