Subject: NetBSD 3.99.21: ATAPI CDROM takes so long to be recognized
To: None <current-users@NetBSD.org>
From: MKD <claudiomkd@gmail.com>
List: current-users
Date: 07/01/2006 12:11:01
Hi! I'm using NetBSD 3.99.21 (as of yesterday built) and my ATAPI CDROM 
takes like 30 seconds to be recognized by the kernel, it is because of 
the DMA flags.

I had try all different flags, (0x0000, 0x1100, etc) and even 
deactivating it with 0x1111. When I installed NetBSD 3.0 (before 
building -current), the kernel
recognized the ATAPI drive so fast like the rest of the devices.

By the way, I use 0x0001 in the piixide driver, to enable DMA. I don't 
know if this is making the kernel to go slow on the recognition.

Here you are the 'reduced' dmesg output:

piixide0 at pci0 dev 31 function 1
piixide0: Intel 82801DBM IDE Controller (ICH4-M) (rev. 0x03)
piixide0: bus-master DMA support present
piixide0: primary channel configured to compatibility mode
piixide0: primary channel interrupting at irq 14
atabus0 at piixide0 channel 0
piixide0: secondary channel configured to compatibility mode
piixide0: secondary channel interrupting at irq 15
atabus1 at piixide0 channel 1
wd0 at atabus0 drive 0: <FUJITSU MHT2080AT>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 76319 MB, 155061 cyl, 16 head, 63 sec, 512 bytes/sect x 156301488 
sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using 
DMA)
atapibus0 at atabus1: 2 targets
piixide0:1:0: lost interrupt
    type: ata tc_bcount: 512 tc_skip: 0
cd0 at atapibus0 drive 0: <TOSHIBA ODD-DVD SD-R6372, 949H503012, 1030> 
cdrom removable
piixide0:1:0: lost interrupt
    type: ata tc_bcount: 512 tc_skip: 0
piixide0:1:0: lost interrupt
    type: ata tc_bcount: 512 tc_skip: 0
cd0: 32-bit data port
piixide0:1:0: lost interrupt
    type: ata tc_bcount: 0 tc_skip: 0
cd0: drive supports PIO mode 4piixide0:1:0: lost interrupt
    type: ata tc_bcount: 0 tc_skip: 0
, DMA mode 2piixide0:1:0: lost interrupt
    type: ata tc_bcount: 0 tc_skip: 0
, Ultra-DMA mode 2 (Ultra/33)
cd0(piixide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)

And also, here you are the involved options in my kernel configuration:

# IDE and related devices
piixide*     at pci? dev ? function ? flags 0x0001    # Intel IDE 
controllers
atabus* at ata?
wd*    at atabus? drive ? flags 0x0000
atapibus* at atapi?
cd*    at atapibus? drive ? flags 0x0000    # ATAPI CD-ROM drives

Can you please tell me if there is any issue about this?

Thanks in advance!

-- 
Claudio M. Camacho
http://www.claudiocamacho.org