# accessing cdrom slows down the system [SOLVED]

## ham_se17

As the topic says, when I put a DVD/CD in my drive:

```

# hdparm -i /dev/hdc

/dev/hdc:

 Model=SONY DVD RW AW-G630A, FwRev=1.00, SerialNo=

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

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

 BuffType=unknown, BuffSize=0kB, MaxMultSect=0

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

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

 PIO modes:  pio0 pio1 pio2 pio3 pio4

 DMA modes:  mdma0 mdma1 mdma2

 UDMA modes: udma0 udma1 *udma2

 AdvancedPM=no

 * signifies the current active mode

# hdparm /dev/hdc

/dev/hdc:

 IO_support   =  0 (default 16-bit)

 unmaskirq    =  0 (off)

 using_dma    =  0 (off)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 HDIO_GETGEO failed: Inappropriate ioctl for device

```

the system gets VERY SLOW.

Mouse starts lagging, "auto-completion" in terminals gets very slow, beryl gets very very slow to.

It's a brand new laptop, with:

- core 2 duo 2 Ghz

- 2 gb ram

- 512 mb nvidia 7600 go

- 160 gb sata hdd

running gentoo ~amd64

What can be the problem?Last edited by ham_se17 on Fri Apr 20, 2007 7:41 pm; edited 1 time in total

----------

## RiBBiT

Try to enable DMA and possibly some other features such as unmaskirq and 32 bit IO-support depending on your setup.

```
# hdparm /dev/hda 

/dev/hda:

 IO_support   =  1 (32-bit)

 unmaskirq    =  1 (on)

 using_dma    =  1 (on)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    = 256 (on)

 HDIO_GETGEO failed: Inappropriate ioctl for device
```

----------

## ham_se17

I can't enable DMA  :Sad: 

```

# hdparm -d1 /dev/hdc

/dev/hdc:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

```

Here's benchmark:

```

# hdparm -tT /dev/hdc

/dev/hdc:

 Timing cached reads:   5002 MB in  2.00 seconds = 2505.95 MB/sec

BLKFLSBUF failed: Function not implemented

 Timing buffered disk reads:   20 MB in  3.01 seconds =   6.65 MB/sec

BLKFLSBUF failed: Function not implemented

```

----------

## RiBBiT

Is your kernel configured to support your chipset?

----------

## psomas

check that you compile your kernel with the options "Generic PCI bus-master DMA support " and "Use PCI DMA by default when available",and of course the driver for your chipset...

----------

## ham_se17

 *psomas wrote:*   

> check that you compile your kernel with the options "Generic PCI bus-master DMA support " and "Use PCI DMA by default when available",and of course the driver for your chipset...

 

Here is the DMA support:

```

     -> Device Drivers

       -> ATA/ATAPI/MFM/RLL support

         -> ATA/ATAPI/MFM/RLL support (IDE [=y])

           -> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support (BLK_DEV_IDE [=y])

             -> PCI IDE chipset support (BLK_DEV_IDEPCI [=y])

               -> Generic PCI bus-master DMA support (BLK_DEV_IDEDMA_PCI [=y])  

     -> Device Drivers                                                                                                    

       -> ATA/ATAPI/MFM/RLL support                                                                                       

         -> ATA/ATAPI/MFM/RLL support (IDE [=y])

           -> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support (BLK_DEV_IDE [=y])

             -> PCI IDE chipset support (BLK_DEV_IDEPCI [=y]) 

```

Here is the driver i use:

```

     -> Device Drivers

       -> Serial ATA (prod) and Parallel ATA (experimental) drivers

       [*] ATA device support

         [*]   Intel PIIX/ICH SATA support

         [*]   Intel PATA MPIIX support 

```

My chipset:

```

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 02) (prog-if 80 [Master])

        Subsystem: Inventec Corporation Unknown device 0040

        Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 19

        I/O ports at 01f0 [size=8]

        I/O ports at 03f4 [size=1]

        I/O ports at 0170 [size=8]

        I/O ports at 0374 [size=1]

        I/O ports at 18b0 [size=16]

        Capabilities: [70] Power Management version 2

```

anyone? It drives me crazy that i cant use the system while I access the drive  :Sad: 

----------

## ham_se17

any suggestions?

----------

## wynn

You don't appear to have a SATA DVD-RW as, in your first post, it appeared as /dev/hdc.

You have Intel PATA MPIIX support enabled in your kernel config but it isn't the right driver as, otherwise, the DVD-RW would appear as /dev/sr0 or /dev/sr1.

Would you post the lspci for your plain IDE controller, please? I can't see what kernel you are running, at a guess, it's 2.6.19-gentoo-r5: the SATA controller (82801GBM/GHM) uses the ata_piix driver which you have enabled.

pata_mpiix which you have enabled for your DVD-RW is for the "430MX - 82371MX Mobile PCI I/O IDE Xcelerator (MPIIX)" (no, I've never heard of it either   :Smile:  )

----------

## ham_se17

 *wynn wrote:*   

> You don't appear to have a SATA DVD-RW as, in your first post, it appeared as /dev/hdc.
> 
> You have Intel PATA MPIIX support enabled in your kernel config but it isn't the right driver as, otherwise, the DVD-RW would appear as /dev/sr0 or /dev/sr1.
> 
> Would you post the lspci for your plain IDE controller, please? I can't see what kernel you are running, at a guess, it's 2.6.19-gentoo-r5: the SATA controller (82801GBM/GHM) uses the ata_piix driver which you have enabled.
> ...

 

here is my lspci:

```

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)

00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express PCI Express Root Port (rev 03)

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)

00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)

00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)

00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)

00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02)

00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 02)

00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 02)

00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 02)

00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)

00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 02)

00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)

01:00.0 VGA compatible controller: nVidia Corporation G70 [GeForce Go 7600] (rev a1)

02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Unknown device 8168 (rev 01)

07:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

09:04.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev d1)

09:06.0 CardBus bridge: Texas Instruments Unknown device 8039

09:06.1 FireWire (IEEE 1394): Texas Instruments Unknown device 803a

09:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)

09:06.3 Generic system peripheral [0805]: Texas Instruments Unknown device 803c

```

hope it can help you  :Smile: 

I'm running: 2.6.20-gentoo-r6

----------

## NeddySeagoon

ham_se17,

The Intel ICH7 is a problem in a mixed SATA/PATA installation.

It comes from some of the registers controlling the chip set up being shared between the two interfaces.

There are many posts reporting your problem here and a few with the solution, which unfortunately, I don't remember.

I really hate to say search the forums but thats all I can think of right now.

Use google, not Quick Search - put site:forums.gentoo.org in googles search box, after your search terms to restrict the search. Like this 

```
ICH7 +DMA site:forums.gentoo.org
```

there is lots of hits.

You do not want the IDE PIIX driver, thats only useful up to ICH6 chipsets - that much I do recall.

This post suggests you use SCSI emulation for your IDE CDROM.

----------

## wynn

Hmmm, checkmated!

No IDE controller as such, it must be provided by "82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE".

Hmmm, tricky: it looks as if you need

```
-> Device Drivers

     -> Serial ATA (prod) and Parallel ATA (experimental) drivers

     [*] ATA device support

     <*>   Intel PIIX/ICH SATA support
```

to get the IDE part of the controller working.

This may not work (it's Parallel ATA (experimental)   :Smile:  ) in which case you need to take it out and put in

```
<*>         Intel PIIXn chipsets support
```

from "ATA/ATAPI/MFM/RLL support" instead.

----------

## ham_se17

 *NeddySeagoon wrote:*   

> ham_se17,
> 
> The Intel ICH7 is a problem in a mixed SATA/PATA installation.
> 
> It comes from some of the registers controlling the chip set up being shared between the two interfaces.
> ...

 

your search string helped me to this post: https://forums.gentoo.org/viewtopic.php?t=460566 which solved my issue, I don't know if this is the "right" way, but i can access it without the system gets unavailable.

Solution:

1) Remove support for for the IDE bus. Deselect the following option

```
Device Drivers -->

   ATA/ATAPI/MFM/RLL Support -->

      ATA/ATAPI/MFM/RLL Support
```

This will remove all ide interfaces from the kernel and your DVD drive will not be recognized at rebooting. This is what you want to do.

Without doing this, DVD playback is inadequate.

2) Add SATA support and the Intel SSCSI Device Support -->

```
   SCSI Low Level Drivers -->

      Serial ATA support -->

         and chose support for your controller in my case it is ----> Intel PIIX/ICH SATA support
```

Your DVD drive should not even be recognized at this point! Please note that the below will only work with kernels newer than 2.6.14.

Now add the following to your kernel line in grub.conf :

```
libata.atapi_enabled=1
```

Now reboot and you should see /dev/sr0 being created.

```

sdparm /dev/sr0

    /dev/sr0: SONY      DVD RW AW-G630A   1.00  [cd/dvd]

Read write error recovery mode page:

  AWRE        1  [cha: y, def:  1]

  ARRE        0  [cha: y, def:  0]

  PER         0  [cha: n, def:  0]

Write parameters (MMC) mode page:

  BUFE        0  [cha: y, def:  1]

  WR_T        3  [cha: y, def:  0]

  MULTI_S     0  [cha: y, def:  3]

```

[/profile]

----------

## NeddySeagoon

ham_se17,

Yes, thats the right way - you use only the SATA driver to configure the ICH7 disk interface. Not both the SATA and PATA drivers, which doesn't work.

What you have done is similar to the post I suggested that proposed emulated SCSI which is depreciated. I'll bookmark your post so I can refer others to it. 

Thank you.

----------

## wynn

ham_se17: are you in the mood for a little experimentation? Perhaps having just got your DVD-RW working properly, you aren't.

However, if you are: the libata module parameter atapi_enable has been set to 1 (on) by default in the code since 2.6.16 so it doesn't look as if adding libata.atapi_enabled=1 to the kernel command line changes anything, would you like to try booting without it and see if DMA still works?

----------

## sonicbhoc

Hey, I was just about to ask this same question. Thanks.   :Cool: 

----------

## wynn

 *sonicbhoc wrote:*   

> Hey, I was just about to ask this same question.

 Good.

(Psst ... did you want to ask about "combined=" too?

Documentation/kernel-parameters.txt:

```
combined_mode=  [HW] control which driver uses IDE ports in combined

   mode: legacy IDE driver, libata, or both (in the libata case,

   libata.atapi_enabled=1 may be useful as well).  Note that using the

   ide or libata options may affect your device naming (e.g. by changing

   hdc to sdb).

   Format: combined (default), ide, or libata
```

)

----------

## NeddySeagoon

wynn,

When you choose the PIX SATA driver in the kernel, you get combined for free too.

You will need to look with make xconfig or in the .config file itself to see it.

----------

## wynn

Yes, I saw SATA_INTEL_COMBINED which (your "for free"?) is selected automatically

```
depends on IDE=y && !BLK_DEV_IDE_SATA && (SATA_AHCI || ATA_PIIX)
```

though, it seems, you must have "ATA/ATAPI/MFM/RLL support" selected to get "IDE=y".

In looking around for libata, I saw combined= and just wondered if it was relevant.

----------

## NeddySeagoon

wynn,

Well spotted. I missed the need to have IDE=Y.

Yes, thats my  for free. This is one of the examples where you should never edit .config by hand as one kernle config option can change several flags in the .config file.

----------

## wynn

Well, while you're here, Neddy, thanks for the tip *Quote:*   

> Use google, not Quick Search - put site:forums.gentoo.org in googles search box, after your search terms to restrict the search. Like this
> 
> ```
> ICH7 +DMA site:forums.gentoo.org
> ```
> ...

 and all the other tips, like "nopaste" that I've picked up from your posts.

----------

## sonicbhoc

So, does this mean that I should install ATA/ATAPI/MFM/RLL Support after all?

EDIT: By the way, just to make sure I'm not missing anything, my lspci is like so:

```

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)

00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)

00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)

00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)

00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)

00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)

00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)

00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)

00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)

00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)

00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)

03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

04:00.0 IDE interface: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 02)

05:01.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller

05:01.1 Generic system peripheral [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)

05:01.2 System peripheral: Ricoh Co Ltd Unknown device 0843 (rev 01)

05:01.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 0a)

05:07.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet (rev 10)

```

Is there anything else I'll need? The JMicron IDE interface looks like it could need some extra stuff. Pretty much everything else works but I haven't tested the card Ricoh reader or firewire yet.

----------

## wynn

 *sonicbhoc wrote:*   

> So, does this mean that I should install ATA/ATAPI/MFM/RLL Support after all?

 No, (I believe) it was just for the case where there is a single Intel SATA controller which has to provide both IDE and SATA.

 *sonicbhoc wrote:*   

> EDIT: By the way, just to make sure I'm not missing anything, my lspci is like so:
> 
> ```
> 00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
> 
> ...

 The Intel 82801GBM/GHM SATA support is provided by ata_piix under "Serial ATA ...", JMicron 20360/20363 support is provided by pata_jmicron in the same group. There is also an old PATA driver, jmicron, under ATA/ATAPI/MFM/RLL if the new PATA one doesn't work.

Firewire should be generic (I think), the Intel Wireless 3945ABG you will have to dig through the Forums for. NeddySeagoon's tip using " 3945 site:forums.gentoo.org" with Google should make it painless   :Smile:  (had to try the tip, found ipw3945 wireless drivers which says ther's an ebuild)

The driver for Realtek's RTL-8110SC/8169SC is r8169.

I think you know your way around menuconfig so you shouldn't need more detail, should you?

----------

## ham_se17

 *wynn wrote:*   

> ham_se17: are you in the mood for a little experimentation? Perhaps having just got your DVD-RW working properly, you aren't.
> 
> However, if you are: the libata module parameter atapi_enable has been set to 1 (on) by default in the code since 2.6.16 so it doesn't look as if adding libata.atapi_enabled=1 to the kernel command line changes anything, would you like to try booting without it and see if DMA still works?

 

YUP, true  :Smile: 

Yo don't need the libata.atapi_enabled=1, it works fine without  :Smile: 

----------

## sonicbhoc

Well, the main reason I want this solved is that, after a while, hald freezes the ENTIRE system, taking up all the ram and 100% on both CPUs, and spamming dmesg with this:

```
hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

ipw3945: Microcode SW error detected.  Restarting.

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

ipw3945: Error sending LEDS_CMD: time out after 500ms.

ipw3945: Can't stop Rx DMA.

ipw3945: Detected geography ABG (11 802.11bg channels, 13 802.11a channels)

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

hdd: status timeout: status=0xd0 { Busy }

ide: failed opcode was: unknown

hdd: drive not ready for command

```

ignore the ipw3945 line, that works fine. I won't tinker with that... what bothers me is the hdd status stuff. That could definitely be a problem...

----------

## wynn

 *sonicbhoc wrote:*   

> 
> 
> ```
> hdd: status timeout: status=0xd0 { Busy }
> 
> ...

 The best reference I can find on this is [SEMI-SOLVED] hdc: status timeout: status=0xd0 { Busy }Error which seems to point to hald as the culprit.

What kernel release are you running? The JMicron code has had a lot of changes recently.

----------

## sonicbhoc

Yes, it was hald's fault but after fixing this it doesn't happen anymore. Thank you!

Also, should I enable jmicron support, and if I should, I don't know which driver is right for my hardware...

----------

## wynn

From the previous post: JMicron 20360/20363 support is provided by pata_jmicron in the same group ["Serial ATA ..."]. There is also an old PATA driver, jmicron, under ATA/ATAPI/MFM/RLL if the new PATA one doesn't work. 

There are two entries in /usr/share/misc/pic.ids for JMicron 20360/20363

```
        2360  JMicron 20360/20363 AHCI Controller

        2363  JMicron 20360/20363 AHCI Controller
```

pata_jmicron and jmicron only support the second, "2363", the other, "2360", is probably an old version of the chipset which is no longer around but you could check with "lspci -n".

----------

## sonicbhoc

lspci -n | grep 236 returned:

```
04:00.0 0106: 197b:2360 (rev 02)
```

So, mine is old. But, everything works just fine, so I don't care about it.   :Laughing: 

----------

## wynn

That's odd. It seems to overthrow a few dearly held theories.

What kernel are you running?

[Edit] Nope, can't make it out: according to my bible (Greg Kroah-Hartman's "Linux Kernel in a Nutshell") "All PCI drivers contain a list of the different devices they support. That list is contained in a structure of struct pci_device_id values".

In the jmicron old PATA driver from 2.6.19-gentoo-r5, the first with either jmicron.c or pata_jmicron.c, the list is

```
static const struct pci_device_id jmicron_pci_tbl[] = {

   { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB361), 361},

   { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB363), 363},

   { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB365), 365},

   { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB366), 366},

   { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB368), 368},

   { }   /* terminate list */

};
```

which shows that only the JMicron controllers with Device IDs 2361, 2363, 2365, 2366 or 2368 should be supported. But your controller says it is 2360.

One last request: could you run

```
cat /sys/bus/pci/devices/0000:04:00.0/device
```

it will probably say the same as lspci but it would be interesting to know, if you can spare the time.

[Edit] If you're minded to do a last request could you cancel that one and do this instead?

I am assuming you have your optical drive(s) plugged into the JMicron controller.

If you run "ls -l /sys/block" you will get a list of the block devices on your system: your SATA disk or disks will be sdX and your optical drive or drives will be hdX, if an old PATA driver has got hold of them, or sr0, sr1, if a new PATA driver has them.

Could you run the following on the optical drive device

```
udevinfo -a -p /sys/block/hda | grep DRIVER
```

(replace hda by the appropriate device name) and post the output?

Thanks.

----------

## sonicbhoc

 *wynn wrote:*   

>  *sonicbhoc wrote:*   So, does this mean that I should install ATA/ATAPI/MFM/RLL Support after all? No, (I believe) it was just for the case where there is a single Intel SATA controller which has to provide both IDE and SATA.
> 
>  *sonicbhoc wrote:*   EDIT: By the way, just to make sure I'm not missing anything, my lspci is like so:
> 
> ```
> ...

 

I already had all that working, though, just the ATA thing was giving me a headache. I think, with your help, I figured it out. However, the last time I tried to burn a CD, my computer went haywire: GkrellM showed everything normal, but the GUI was completely unresponsive. I could view events just fine, but I couldn't interface with anything (no clicking, no keyboards, I couldn't switch to a VT, I didn't have sshd on so I couldn't save the system...). The problem is probably that I mucked with some of the CD settings that warned me not to change them in the kernel config, and maybe I should turn on support for that jmicron thing? I'll post my device information after I reboot the computer...

Here it is:

```
0x2360
```

Does this mean that the driver will not work on my controller or what?

----------

## wynn

The edit to my last post and your new post crossed.

I think it will sort things out if you could run that last last request: *Quote:*   

> I am assuming you have your optical drive(s) plugged into the JMicron controller.
> 
> If you run "ls -l /sys/block" you will get a list of the block devices on your system: your SATA disk or disks will be sdX and your optical drive or drives will be hdX, if an old PATA driver has got hold of them, or sr0, sr1, if a new PATA driver has them.
> 
> Could you run the following on the optical drive device
> ...

 This should show what driver the CD/DVD writer is using, please post the /sys/block/xxx, the device name, which you have used. This would be another clue to what is going on.

----------

## sonicbhoc

 *wynn wrote:*   

> The edit to my last post and your new post crossed.
> 
> I think it will sort things out if you could run that last last request: *Quote:*   I am assuming you have your optical drive(s) plugged into the JMicron controller. 
> 
> (I still don't know what a JMicron controller is)
> ...

 

Every drive in my computer (two of them) use the ati_piix driver.

----------

## wynn

In your lspci you have

```
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)

04:00.0 IDE interface: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 02)
```

The second one is the JMicron controller, although it says "AHCI" it does both SATA and PATA.

From posts I've seen, it appears that this controller is used on the motherboard to provide PATA.

Therefore I assumed that your PATA optical drive would be plugged into this controller but, from what you say, there is an old-type IDE socket which is connected to the Intel SATA IDE controller.

If that is so, this Intel controller is capable of providing both and you are in the same position as the original poster, ham_se17, and the solution he posted should work for you.

With the corrections that have appeared since that post, the solution is:

1) Enable "ATA/ATAPI/MFM/RLL support", you need CONFIG_IDE=y in your config but you don't need anything else under this heading. This contradicts ham_se17's first point but it is required.

2) Add SATA support under "Serial ATA ..." for Intel PIIX/ICH SATA support (which you already have)

3) You don't need to add "libata.atapi_enabled=1" to the kernel command line as it is already enabled by default.

The last step you have already verified, you've got a /dev/sr0: could you please post the output from

```
udevinfo -a -p /sys/block/sr0 | grep DRIVER
```

If everything is seizing up when you try and write a CD, it shows that DMA is not enabled on the CD writer but, if you have all the above points, your result should be the same as ham_se17's.

Can you check /var/log/messages to see if it is setting DMA in the CD writer?

Other posts have suggested running sdparm on the device to check that DMA is enabled.

----------

