Bug 103923 - Can't disable DMA for CompactFlash-IDE
Can't disable DMA for CompactFlash-IDE
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
9
i586 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-09-07 13:20 EDT by Kazutoshi Morioka
Modified: 2007-04-18 12:57 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-30 11:41:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kazutoshi Morioka 2003-09-07 13:20:49 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686) Gecko/20030610 Galeon/1.3.7

Description of problem:
I want to use CompactFlash with CF-IDE interface adapter.
My CF-card was probed as CFA DISK

> hdc: TOSHIBA THNCF128MMA, CFA DISK drive

But I got this message after IDE-probe.

>hdc: attached ide-disk driver.
>hdc: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error }
>hdc: task_no_data_intr: error=0x04 { DriveStatusError }
>hdc: 250368 sectors (128 MB) w/2KiB Cache, CHS=978/8/32, BUG
... snip ...
>Partition check:
> hda: hda1 hda2 hda3 hda4
> hdc:<4>hdc: dma_timer_expiry: dma status == 0x21
>hdc: error waiting for DMA
>hdc: dma timeout retry: status=0x51 { DriveReady SeekComplete Error }
>hdc: dma timeout retry: error=0x04 { DriveStatusError }
> hdc1

So, I try to disable DMA with hdparm, and I got this error

># /sbin/hdparm -d0 /dev/hdc
>/dev/hdc:
> setting using_dma to 0 (off)
> HDIO_SET_DMA failed: Operation not permitted
> using_dma    =  1 (on)

Then, I try to use /proc/ide interface, but it's ignored.

># grep using_dma /proc/ide/hdc/settings
>using_dma        1        0       1        rw
># echo "using_dma:0" >/proc/ide/hdc/settings
># grep using_dma /proc/ide/hdc/settings
>using_dma        1        0       1        rw

I put kernel parameter "ide=nodma", but it made no effect; same problem.
I can't disable IDE-DMA in any way. This is very stupid situation.

Version-Release number of selected component (if applicable):
kernel-2.4.20-20.9

How reproducible:
Always

Steps to Reproduce:
1. Use CompactFlash-IDE adapter.
2. Set CompactFlash card to the adapter.
3. Boot Linux.
    

Actual Results:  CompactFlash makes DMA error, and is not work.

Expected Results:  CompactFlash will work as IDE-disk.
If DMA related problem is occur, DMA can be disabled as workaround.

Additional info:

# /sbin/lspci
00:00.0 Host bridge: Intel Corp. 430HX - 82439HX TXC [Triton II] (rev 01)
00:07.0 ISA bridge: Intel Corp. 82371SB PIIX3 ISA [Natoma/Triton II]
00:07.1 IDE interface: Intel Corp. 82371SB PIIX3 IDE [Natoma/Triton II]

# /sbin/hdparm /dev/hdc

/dev/hdc:
 multcount    =  0 (off)
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)
 geometry     = 978/8/32, sectors = 250368, start = 0

# /sbin/hdparm -i /dev/hdc
 
/dev/hdc:
 
 Model=TOSHIBA THNCF128MMA, FwRev=3.10, SerialNo=STCB21M83007R95414A8
 Config={ HardSect NotMFM Removeable DTR>10Mbs nonMagnetic }
 RawCHS=978/8/32, TrkSize=16896, SectSize=528, ECCbytes=4
 BuffType=1Sect, BuffSize=2kB, MaxMultSect=1, MultSect=off
 CurCHS=978/8/32, CurSects=250368, LBA=yes, LBAsects=250368
 IORDY=no
 PIO modes:  pio0 pio1 pio2
 AdvancedPM=no

Each time I use hdparm, "dma timeout retry" was occur.
Comment 1 Kazutoshi Morioka 2003-09-13 11:14:48 EDT
This patch works for me.

--- ide-probe.c.orig    2003-09-14 00:12:15.000000000 +0900
+++ ide-probe.c 2003-09-13 20:12:07.000000000 +0900
@@ -880,6 +880,8 @@
                        if (drive->media != ide_disk)
                                enable_dma = 0;
 #endif
+                       if (drive->is_flash || drive->ata_flash)
+                               enable_dma = 0;
                        /*
                         * MAJOR HACK BARF :-/
                         *
Comment 2 Alan Cox 2003-09-13 11:37:55 EDT
Can you attach /proc/ide/hdc/identify for me to look at. I'm not sure what is
going on here but it should always be allowing you to disable DMA.
Comment 3 Kazutoshi Morioka 2003-09-19 05:36:23 EDT
Thanks. This is /proc/ide/hdc/identify.
848a 03d2 0000 0008 4200 0210 0020 0003
d200 0000 5354 4342 3231 4d38 3330 3037
5239 3534 3134 4138 0001 0004 0004 332e
3130 2020 2020 544f 5348 4942 4120 5448
4e43 4631 3238 4d4d 4120 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 0001
0000 0200 0000 0200 0000 0001 03d2 0008
0020 d200 0003 0101 d200 0003 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Comment 4 Kazutoshi Morioka 2004-02-20 22:28:54 EST
It may be a hardware specific problem.
I moved my harddisk and CF-card and CF-adapter to new machine,
then, the problem is gone.
New machine has Celeron and VIA PLE133 chipset.
$ /sbin/lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT8601 [Apollo ProMedia]
(rev 05)
00:01.0 PCI bridge: VIA Technologies, Inc. VT8601 [Apollo ProMedia AGP]
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super
South] (rev 40)
00:07.1 IDE interface: VIA Technologies, Inc.
VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE (rev 06)
00:07.4 Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI]
(rev 40)
Comment 5 Bugzilla owner 2004-09-30 11:41:31 EDT
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem
persists.

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/

Note You need to log in before you can comment on or make changes to this bug.