# a IDE problem and a sound question about ICH5

## bomek

Hello there! 

I've got a board with the 875P chipset and i have a DMA problem with IDE on it. My installation seem to use the Generic driver for ide even if i activated the good driver in (PIIx) the kernel (not as module) (kernel 2.6.7 dev source)

```
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

hda: IBM-DPTA-372050, ATA DISK drive

hdb: CD-RW CR52, ATAPI CD/DVD-ROM drive

ide1: I/O resource 0x170-0x177 not free.

ide1: ports already in use, skipping probe

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hda: max request size: 128KiB

hda: 40088160 sectors (20525 MB) w/1961KiB Cache, CHS=39770/16/63

 /dev/ide/host0/bus0/target0/lun0: p1 p2

hdb: ATAPI 40X CD-ROM CD-R/RW CD-MRW drive, 2048kB Cache

Uniform CD-ROM driver Revision: 3.20

libata version 1.02 loaded.

ata_piix version 1.02

ata_piix: combined mode detected

ata: 0x1f0 IDE port busy

PCI: Setting latency timer of device 0000:00:1f.2 to 64

ata1: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xF008 irq 15

ata1: dev 0 cfg 49:2f00 82:7c6b 83:7f09 84:4003 85:7c69 86:3e01 87:4003 88:207f

ata1: dev 0 ATA, max UDMA/133, 398297088 sectors: lba48

ata1: dev 0 configured for UDMA/133

scsi0 : ata_piix

  Vendor: ATA       Model: Maxtor 6Y200M0    Rev: YAR5

  Type:   Direct-Access                      ANSI SCSI revision: 05

SCSI device sda: 398297088 512-byte hdwr sectors (203928 MB)

SCSI device sda: drive cache: write back

 /dev/scsi/host0/bus0/target0/lun0: p1 p2 p3

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
```

As you can see, SATA is working perfectly, but my hd/CDRW is using the generic interface.

Do i have to disable scsi sata drivers?

Also, why the integrate sound card don't allow me to use /dev/dsp with more than one program? Like my old sblive did? (I'm using alsa by the way)

Thanks a lot!

----------

## kauschovar

*bump* I'm having the same issue with DMA for my IDE CD-RW on an Abit IC7-Max3 (also i875P).

About the sound card:  As I understand it, the SB Live/Audigy (emu10k1) has a hardware mixer whereas most other cards such as those built-in to our motherboards do not.  I read in another thread somewhere about using software mixers (dmix and arts IIRC), but I havne't gotten around to trying that yet.  The DMA issue is more urgent for me.

----------

## sn4ip3r

I had the exact same problem with sblive (as I've already described in several other posts), the solution seems to be to upgrade to the latest kernel (possibly -mm or -love, but I don't think that's absolutely neccessary).

----------

## Gentii

I'm having the same troubles. My hard drives are on sata too, and the mobo chipset is a i875p. And I can't enable dma on my ide cdrom drive. Maybe the i875p isn't well supported...

----------

## baak6

I have the same problem...Abit IC7 mobo and no DMA on my CD-ROM. Worked great when I had my MSI mobo, it had 875 chipset aswell...and my hdd's are all SATA

----------

## miseiler

Uh oh.

I have an IC7-MAX3 (i875P) and DMA on my IDE DVD-ROM drive appears to work just fine.

```
bash-2.05b# hdparm -i /dev/hdc

/dev/hdc:

 Model=Pioneer DVD-ROM ATAPIModel DVD-106S 011, FwRev=E1.14, SerialNo=

 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }

 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0

 BuffType=13395, BuffSize=64kB, MaxMultSect=0

 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0

 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}

 PIO modes:  pio0 pio1 pio2 pio3 pio4

 DMA modes:  sdma0 sdma1 sdma2 mdma0 mdma1 mdma2

 UDMA modes: udma0 udma1 udma2 udma3 *udma4

 AdvancedPM=no

 Drive conforms to: device does not report version:

 * signifies the current active mode
```

Here are the relevant sections of my /etc/conf.d/hdparm:

```
disc0_args="-d1 -A1 -a64 -m16 -u1 -c1"

disc1_args="-d1"

cdrom0_args="-d1"
```

I'd post my dmesg results, but apparently that buffer is chock-full of ATI driver errors...gonna need to take a look at that.

And of course the relevant (as far as I'm aware) sections of my kernel config:

```
<*> ATA/ATAPI/MFM/RLL support                                                      ? ?

  ? ?        <*>   Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support                          ? ?

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

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

  ? ?        [ ]     Use old disk-only driver on primary interface                              ? ?

  ? ?        <*>     Include IDE/ATA-2 DISK support                                             ? ?

  ? ?        [*]       Use multi-mode by default                                                ? ?

  ? ?        <M>     Include IDE/ATAPI CDROM support                                            ? ?

 ...

<*>     generic/default IDE chipset support                                        ? ?

  ? ?        [ ]     CMD640 chipset bugfix/support                                              ? ?

  ? ?        [*]     PCI IDE chipset support                                                    ? ?

  ? ?        [*]       Sharing PCI IDE interrupts support                                       ? ?

  ? ?        [ ]       Boot off-board chipsets first support                                    ? ?

  ? ?        <*>       Generic PCI IDE Chipset Support                                          ? ?

  ? ?        < >       OPTi 82C621 chipset enhanced support (EXPERIMENTAL)                      ? ?

  ? ?        < >       RZ1000 chipset bugfix/support                                            ? ?

  ? ?        [*]       Generic PCI bus-master DMA support                                       ? ?

  ? ?        [ ]         Force enable legacy 2.0.X HOSTS to use DMA                             ? ?

  ? ?        [*]         Use PCI DMA by default when available                                  ? ?

...

        <*>         Intel PIIXn chipsets support                                           ? ?

...

```

I'm using kernel-2.6.8.1-nitro6 currently, but as far as I'm aware DMA has always been enabled for my cdrom drive.  I'll post the dmesg info as soon as I'm able.

----------

## miseiler

Aaaand my dmesg results:

```
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

ICH5: IDE controller at PCI slot 0000:00:1f.1

ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 18

ICH5: chipset revision 2

ICH5: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:pio

hda: WDC WD800JB-00ETA0, ATA DISK drive

hdb: IC35L040AVER07-0, ATA DISK drive

Using cfq io scheduler

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hdc: Pioneer DVD-ROM ATAPIModel DVD-106S 011, ATAPI CD/DVD-ROM drive

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 1024KiB

hda: 156301488 sectors (80026 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(100)

hda: cache flushes supported

 /dev/ide/host0/bus0/target0/lun0: p1 p2 < p5 p6 > p3 p4

hdb: max request size: 128KiB

hdb: 80418240 sectors (41174 MB) w/1916KiB Cache, CHS=65535/16/63, UDMA(100)

hdb: cache flushes supported

 /dev/ide/host0/bus0/target1/lun0: p1 p2 < p5 >

```

Finds my ICH5 just fine, uses ACPI to set the IRQ, looks to the BIOS for DMA settings...

Then I guess hdparm loads the cdrom.ko module and sets DMA, though given the above information the kernel would appear to have no trouble doing it itself, though I'm far to lazy to recompile my kernel to find out   :Wink: 

Either way, when it's loaded dmesg says this:

```
hdc: ATAPI 40X DVD-ROM drive, 256kB Cache, UDMA(66)

Uniform CD-ROM driver Revision: 3.20

```

Again, not a problem.  Let me know if anyone can't duplicate this and I'll do some more digging.

----------

## baak6

It seems like the Intel SATA drivers are conflicting with the Intel IDE chipset drivers...so if you don't have SATA disks, normally DMA would work fine for you...at least I think so  :Razz: 

----------

## Gentii

Damn, I've to switch on the intel sata controller, because my box didn't want to boot when my 2 sata drivers were on the promise sata raid controller. I couldn't even see the drives in the bios.

In order to see it, the drives must be on the intel controller, and I've to set compatible mode in the bios :p

----------

## E001754

I've got the same problem : my mobo is an Abit IS7G (i865PE) and my HDC (which is my DVD drive) is not detected, exactly as described.

The boot sequence gives me following :

 *Quote:*   

>  ide0 : I/O resource 0x1F0-0x1F7 not free
> 
>  ide0 : ports already in use, skipping probe
> 
> 

 

BUT WHY ARE ALL MY DRIVES WORKING PERFECTLY WITH THE LIVECD (Gentoo Live CD, Mandrake Install CD, Suse Install CD, Fedora Install CD) ???

There should be a little something in a litlle somewhere that fucks everything up...

 :Shocked: 

*sigh*

1 SATA Drive

My CD/DVD is plugged on the legacy IDE port, as IDE3 and IDE4.

Got an SCSI chain as well.

----------

## sn4ip3r

 *E001754 wrote:*   

> ...
> 
> BUT WHY ARE ALL MY DRIVES WORKING PERFECTLY WITH THE LIVECD (Gentoo Live CD, Mandrake Install CD, Suse Install CD, Fedora Install CD) ???
> 
> There should be a little something in a litlle somewhere that fucks everything up...
> ...

 

Try another kernel. -mm is a patchset to start with.

----------

## E001754

I think I've found the bug : if the 1st IDE drive on the second channel is spinning when the kernel tries to probe it, the kernel doesn't detect it (saying the resource is not free and so on).

If I wait 30 seconds at the grub start, this let the time for the drive to stop spindling and then the drive is detect flawlessly.

TO WHAT GUY COULD I TELL THIS, IN ORDER FOR HIM TO BE ABLE TO TRACK DOWN THE BUG ???

If anybody as a idea.

Report the bug at kernel.org ??

----------

## sn4ip3r

 *E001754 wrote:*   

> I think I've found the bug : if the 1st IDE drive on the second channel is spinning when the kernel tries to probe it, the kernel doesn't detect it (saying the resource is not free and so on).
> 
> If I wait 30 seconds at the grub start, this let the time for the drive to stop spindling and then the drive is detect flawlessly.
> 
> TO WHAT GUY COULD I TELL THIS, IN ORDER FOR HIM TO BE ABLE TO TRACK DOWN THE BUG ???
> ...

 

If this happens with the latest linux -rc and also with the latest -mm then I suggest mailing linux kernel mailinglist.

----------

## gnychis

was this problem ever solved?

i too have this problem with my ic7-max3

----------

## matttions

I have this problem too.

```
 ide0 : I/O resource 0x1F0-0x1F7 not free

ide0 : ports already in use, skipping probe 
```

The gentoo live cd 2005.1 doesn't recognise any of my two SATA Disk (MAXTOR)

There is something possible to do with that?

I'm also enable to get the 

```
/dev/mapper/control
```

Anyone has any hint or has resolved and would show us ?

----------

## bollucks

Fiddle with your bios settings to disable enhanced mode on the IDE driver. The combination of sata and IDE with enhanced mode seems to cause issues. After changing this you may also need to reprobe for what drives are attached in your bios after a reboot because it changes their ordering (ie which one is IDE1 etc). Anyway try fiddling with your "enhanced" mode settings for p-ata in bios.

----------

## matttions

@bollucks thank you ...

Can I set up a functionally RAID0 system just follow thi how-to ?

http://gentoo-wiki.com/HOWTO_Gentoo_Install_on_Software_RAID

Anyone has done it with success ?

----------

