Skip to contentSkip to conversation

DMA not works in Linux 2.6.12, but in Windows works fine.

DISCUSSION Ivan G 6 participants 8 messages May 23, 2005 – May 25, 2005 libata

lore
Share & tools
lore

Ivan G

author
#0 lore raw

Problem descrition:

DMA not works in Linux 2.6.12, but in Windows works fine.

DMA not works with HDD and CD drives connected by 80-conductor cable to secondary IDE port (ide1).

Hardware description:

1) Motherboard has chipset Intel, Giga-byte
2) HDD Seagate ST3160023AS (Serial ATA)
3) HDD Seagate ST3200822A (IDE ATA)
4) SONY CD-RW CRX320E, IDE ATAPI CD/DVD-ROM

Hardware connections:

ST3160023AS ---> SATA0 ---> BIOS mapping ---> ide0 Pri master
(hda)

                   SATA1 ---> BIOS mapping ---> ide0 Pri slave

CRX320E --------------------------------> ide1 Sec master
(hdc)
ST3200822A --------------------------------> ide1 Sec slave
(hdd)

==============================================================================
=== hdparm output ============================================================

# hdparm -V
hdparm v5.5
# hdparm -d1 /dev/hdd
/dev/hdd:
  setting using_dma to 1 (on)
  HDIO_SET_DMA failed: Operation not permitted
  using_dma    =  0 (off)
# hdparm -d1 /dev/hdc
/dev/hdd:
  setting using_dma to 1 (on)
  HDIO_SET_DMA failed: Operation not permitted
  using_dma    =  0 (off)
# hdparm -I /dev/hdd

/dev/hdd:

ATA device, with non-removable media

        Model Number:       ST3200822A
        Serial Number:      5LJ1JK9L
        Firmware Revision:  3.01
Standards:
        Used: ATA/ATAPI-6 T13 1410D revision 2
        Supported: 6 5 4 3
Configuration:
        Logical         max     current
        cylinders       16383   65535
        heads           16      1
        sectors/track   63      63
        --
        CHS current addressable sectors:    4128705
        LBA    user addressable sectors:  268435455
        LBA48  user addressable sectors:  390721968
        device size with M = 1024*1024:      190782 MBytes
        device size with M = 1000*1000:      200049 MBytes (200 GB)

Capabilities:
LBA, IORDY(can be disabled)
bytes avail on r/w long: 4 Queue depth: 1
Standby timer values: spec'd by Standard, no device specific
minimum
R/W multiple sector transfer: Max = 16 Current = 16 Recommended acoustic management value: 128, current value: 0
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=240ns IORDY flow
control=120ns
Commands/features:
Enabled Supported:
* READ BUFFER cmd
* WRITE BUFFER cmd
* Host Protected Area feature set
* Look-ahead
* Write cache
* Power Management feature set
Security Mode feature set
SMART feature set
* FLUSH CACHE EXT command
* Mandatory FLUSH CACHE command
* Device Configuration Overlay feature set
* 48-bit Address feature set
SET MAX security extension
* DOWNLOAD MICROCODE cmd
* SMART self-test
* SMART error logging
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
not supported: enhanced erase
HW reset results:
CBLID- above Vih
Device num = 1 determined by CSEL
Checksum: correct

==============================================================================
=== some lines from .config ==================================================

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

==============================================================================
=== Some lines from lspci -v output ========================================

0000:00:00.0 Host bridge: Intel Corp. 82865G/PE/P Processor to I/O Controller (rev 02)
Subsystem: Giga-byte Technology: Unknown device 2570
Flags: bus master, fast devsel, latency 0
Memory at e0000000 (32-bit, prefetchable)
Capabilities: [e4] #09 [1106]

0000:00:1e.0 PCI bridge: Intel Corp. 82801BA/CA/DB/EB PCI Bridge (rev c2) (prog-if 00 [Normal decode])

        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=32
        I/O behind bridge: 0000a000-0000afff
        Memory behind bridge: f8000000-f80fffff

0000:00:1f.0 ISA bridge: Intel Corp. 82801EB LPC Interface Controller (rev 02)
Flags: bus master, medium devsel, latency 0

0000:00:1f.2 IDE interface: Intel Corp. 82801EB Ultra ATA Storage Controller (rev 02) (prog-if 8a [Master SecP PriP])
Subsystem: Giga-byte Technology: Unknown device 24d1
Flags: bus master, 66Mhz, medium devsel, latency 0, IRQ 18
I/O ports at <unassigned>
I/O ports at <unassigned>
I/O ports at <unassigned>
I/O ports at <unassigned>
I/O ports at f000 [size=16]

0000:00:1f.3 SMBus: Intel Corp. 82801EB SMBus Controller (rev 02)
Subsystem: Giga-byte Technology: Unknown device 24d2
Flags: medium devsel, IRQ 9
I/O ports at 1400 [size=32]

==============================================================================
=== Some lines of kernel-bool messages =======================================

Linux version 2.6.12-rc2 (root@wcm-5) (gcc version 3.3.3 (SuSE Linux)) #1 SMP Mon May 23 11:05:23 EEST 2005 Kernel command line: BOOT_IMAGE=Linux-2.6.12 ro root=806 resume=/dev/sda5 ide1=dma
ide_setup: ide1=dma -- OBSOLETE OPTION, WILL BE REMOVED SOON!
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ide0: I/O resource 0x1F0-0x1F7 not free.
ide0: ports already in use, skipping probe
Probing IDE interface ide1...
hdc: SONY CD-RW CRX320E, ATAPI CD/DVD-ROM drive
hdd: ST3200822A, ATA DISK drive
Probing IDE interface ide2...
Probing IDE interface ide3...
Probing IDE interface ide4...
Probing IDE interface ide5...
ide1 at 0x170-0x177,0x376 on irq 15
hdd: max request size: 1024KiB
hdd: 390721968 sectors (200049 MB) w/8192KiB Cache, CHS=24321/255/63
hdd: cache flushes supported
hdd: hdd1 hdd2
hdc: ATAPI 52X DVD-ROM CD-R/RW drive, 2048kB Cache
Uniform CD-ROM driver Revision: 3.20
libata version 1.10 loaded.
ata_piix version 1.03
ata_piix: combined mode detected
ACPI: PCI Interrupt 0000:00:1f.2[A] -> GSI 18 (level, low) -> IRQ 18
ata: 0x170 IDE port busy
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ata1: SATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0xF000 irq 14
ata1: dev 0 cfg 49:2f00 82:346b 83:7d01 84:4003 85:3468 86:3c01 87:4003 88:207f
ata1: dev 0 ATA, max UDMA/133, 312579695 sectors: lba48
ata1: dev 0 configured for UDMA/133
scsi0 : ata_piix
Vendor: ATA Model: ST3160023AS Rev: 3.00
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sda: 312579695 512-byte hdwr sectors (160041 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 312579695 512-byte hdwr sectors (160041 MB)
SCSI device sda: drive cache: write back
sda: sda1 sda2 < sda5 sda6 > sda3 sda4
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0

==============================================================================
==============================================================================

Please, help!

p.s. I am not in mailing-list, so please add me to CC.

#1 lore raw
Quoted 22 lines · On Mon, 23 May 2005 14:25:32 +0400 Ivan G wrote:

DMA not works in Linux 2.6.12, but in Windows works fine.

DMA not works with HDD and CD drives connected by 80-conductor cable to secondary IDE port (ide1).

Hardware description:

1) Motherboard has chipset Intel, Giga-byte
2) HDD Seagate ST3160023AS (Serial ATA)
3) HDD Seagate ST3200822A (IDE ATA)
4) SONY CD-RW CRX320E, IDE ATAPI CD/DVD-ROM

Hardware connections:

   ST3160023AS ---> SATA0 ---> BIOS mapping ---> ide0 Pri master 
 (hda)
                    SATA1 ---> BIOS mapping ---> ide0 Pri slave

CRX320E --------------------------------> ide1 Sec master
(hdc)
ST3200822A --------------------------------> ide1 Sec slave
(hdd)

[skip]

Quoted 11 lines

ide0: I/O resource 0x1F0-0x1F7 not free.
ide0: ports already in use, skipping probe
Probing IDE interface ide1...
hdc: SONY CD-RW CRX320E, ATAPI CD/DVD-ROM drive
hdd: ST3200822A, ATA DISK drive
Probing IDE interface ide2...
Probing IDE interface ide3...
Probing IDE interface ide4...
Probing IDE interface ide5...
ide1 at 0x170-0x177,0x376 on irq 15
hdd: max request size: 1024KiB

Quoted 8 lines

hdd: 390721968 sectors (200049 MB) w/8192KiB Cache, CHS=24321/255/63
hdd: cache flushes supported
hdd: hdd1 hdd2
hdc: ATAPI 52X DVD-ROM CD-R/RW drive, 2048kB Cache Uniform CD-ROM driver Revision: 3.20
libata version 1.10 loaded.
ata_piix version 1.03
ata_piix: combined mode detected

[skip]

This is a known problem - if the Intel ICH5/6 controller is used in combined mode (SATA mapped to legacy IDE ports), DMA for PATA devices does not work. If you reconfigure the controller in BIOS to not use the combined mode (so that the SATA part becomes a separate PCI device), DMA for PATA devices will work fine.

To IDE developers: Is something planned to work around this problem? AFAIK, there are some machines where BIOS does not provide an option to turn off the combined mode.

#2 lore raw
Quoted 3 lines · Sergey Vlasov

To IDE developers: Is something planned to work around this problem? AFAIK, there are some machines where BIOS does not provide an option to turn off the combined mode.

This limitation exists because two drivers (drivers/ide and libata) want to use different parts of the same hardware.

Once libata can do ATAPI 100%, when we can just let libata handle both PATA and SATA, which will enable DMA again.

Jeff

#3 lore raw

Note to others:

If you are brave and pull down Jeff's libata-dev tree, then it already has ATAPI DMA working (mostly) therein.

That's what I've done on my newest ICH6M machine here, and both the PATA HD and PATA DVD-RW are working just fine in "combined mode" using ata_piix. After applying a bugfix patch for ATAPI error handling (which Jeff has just posted here today somewhere for general comments).

Cheers.

#4 lore raw
In reply to Sergey Vlasov

2005/5/23, Sergey Vlasov <[email protected]>:

Quoted 10 lines

This is a known problem - if the Intel ICH5/6 controller is used in combined mode (SATA mapped to legacy IDE ports), DMA for PATA devices does not work. If you reconfigure the controller in BIOS to not use the combined mode (so that the SATA part becomes a separate PCI device), DMA for PATA devices will work fine.

To IDE developers: Is something planned to work around this problem? AFAIK, there are some machines where BIOS does not provide an option to turn off the combined mode.

Hi there,
Got similar looking problem here,
i cant change sata modes or something alike...

I get *disabling irq* message with Intel ICH 4 / SIL 3112 A rev 01 SATA Controller on Asus P4G8X Deluxe board (P4 Northwood, Intel *granite bay* E702 Chipsets) at distros which using newer kernel than 2.6.5, manual installation of kernel >= 2.6.7 fails
(well i think udev isnt creating devices or something cause after i did try compile the kernel on my own etc...
kernel modules found the sata controller, the devices and the partitions, but hangsup with an *waiting for /dev/sda3 (my root disk) to appear*)

my messages are known i think... but for completion:
(i did copied it from net this isn exactly my error
cause i dont know how to copy the error, after failed boot...)
ata1: SATA max UDMA/100 cmd 0xE09FC080 ctl 0xE09FC08A bmdma 0xE09FC000 irq 11
ata2: SATA max UDMA/100 cmd 0xE09FC0C0 ctl 0xE09FC0CA bmdma 0xE09FC008 irq 11
irq 11: nobody cared!

[<c012fbea>] __report_bad_irq+0x2a/0x90
[<c012f5a0>] handle_IRQ_event+0x30/0x70
[<c012fcdc>] note_interrupt+0x6c/0xd0
[<c012f710>] __do_IRQ+0x130/0x160
[<c01042b9>] do_IRQ+0x19/0x30
[<c010289a>] common_interrupt+0x1a/0x20
[<c0117830>] __do_softirq+0x30/0x90
[<c01178b6>] do_softirq+0x26/0x30
[<c012f564>] irq_exit+0x34/0x40
[<c01042be>] do_IRQ+0x1e/0x30
[<c010289a>] common_interrupt+0x1a/0x20
[<c01005f0>] default_idle+0x0/0x30
[<c0100613>] default_idle+0x23/0x30
[<c010068a>] cpu_idle+0x3a/0x60
[<c03ca767>] start_kernel+0x147/0x160
[<c03ca360>] unknown_bootoption+0x0/0x1b0

handlers:
[<c0273770>] (usb_hcd_irq+0x0/0x70)
[<e0a65460>] (ata_interrupt+0x0/0x1c0 [libata]) Disabling IRQ #11
ata1: dev 0 cfg 49:2f00 82:346b 83:7f21 84:4003 85:3469 86:3c01 87:4003 88:203f
ata1: dev 0 ATA, max UDMA/100, 390721968 sectors: lba48

i got that problem after a new installation of my system, before that it worked with a 2.6.10 kernel on same system (something about 4 weeks ago dont know settings anymore sorry...)

well im trying some different partition style layouts, cause i just get that message with an seperate boot partition formated with ext3,
if i set up a blank installation without that */boot* it works fine, even with newer version's...

if u got an idea, need some logs infos etc message me :-)

greets
Helge Pomorin
Berlin, Germany

#5 lore raw
Quoted 8 lines · Helge Pomorin

2005/5/23, Sergey Vlasov <[email protected]>:

Quoted 6 lines

This is a known problem - if the Intel ICH5/6 controller is used in combined mode (SATA mapped to legacy IDE ports), DMA for PATA devices does not work. If you reconfigure the controller in BIOS to not use the combined mode (so that the SATA part becomes a separate PCI device), DMA for PATA devices will work fine.

Quoted 7 lines
Quoted 4 lines

To IDE developers: Is something planned to work around this problem? AFAIK, there are some machines where BIOS does not provide an option to turn off the combined mode.

Hi there,
Got similar looking problem here,

It's completely different.

Quoted 1 line

i cant change sata modes or something alike...

That doesn't matter under SATA.

Quoted 3 lines

I get *disabling irq* message with Intel ICH 4 / SIL 3112 A rev 01 SATA Controller on Asus P4G8X Deluxe board (P4 Northwood, Intel *granite bay* E702 Chipsets) at distros which using newer kernel than

This is a totally different problem.

Jeff

#6 lore raw
In reply to Sergey Vlasov
Quoted 3 lines · Sergey Vlasov

To IDE developers: Is something planned to work around this problem? AFAIK, there are some machines where BIOS does not provide an option to turn off the combined mode.

Yeah, like on my Dell Inspiron 9300.

#7 lore raw
In reply to Ivan G
Quoted 6 lines · Ivan G

Problem descrition:

DMA not works in Linux 2.6.12, but in Windows works fine.

DMA not works with HDD and CD drives connected by 80-conductor cable to secondary IDE port (ide1).

This is expected behavior.

This is a limitation of "combined mode". Turn off combined mode (sometimes called 'legacy' mode) in your BIOS, if your BIOS lets you.

Jeff