Subject: kern/7372: ATAPI cd-rom drive only found when CD present
To: None <gnats-bugs@gnats.netbsd.org>
From: Arne H Juul <arnej@math.ntnu.no>
List: netbsd-bugs
Date: 04/13/1999 22:17:59
>Number:         7372
>Category:       kern
>Synopsis:       ATAPI cd-rom drive only found when CD present
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 13 10:05:01 1999
>Last-Modified:
>Originator:     Arne Juul
>Organization:
	Norwegian University of Technology and Science
>Release:        NetBSD-current as of Apr 13, 1999
>Environment:
	
System: NetBSD fimfpc30.math.ntnu.no 1.4_ALPHA NetBSD 1.4_ALPHA (GENERIC) #1: Tue Apr 13 17:41:06 CEST 1999 root@fimfpc30.math.ntnu.no:/usr/src/sys/arch/i386/compile/GENERIC i386

Hardware: AOpen AX6BC motherboard with AOpen 36x IDE CD-rom drive.

>Description:

On some of our machines, NetBSD-current (1.4_ALPHA as of today)
has problems finding the CD-rom drive, but only when it's empty!
If the drive contains something (a music CD works fine) it is
found during autoconfig, and then it also works OK.

NetBSD 1.3.3 does not have the problem.

This is the boot messages when a CD is present in the drive,
as you can see the CD-rom is the master on the second IDE bus,
alone on the bus.
	[version number, memory, etc... snipped]
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o enabled, memory enabled
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82443BX Host Bridge/Controller (rev. 0x03)
ppb0 at pci0 dev 1 function 0: Intel 82443BX AGP Interface (rev. 0x03)
pci1 at ppb0 bus 1
pci1: i/o enabled, memory enabled
vga1 at pci1 dev 0 function 0: ATI Technologies product 0x4742 (rev. 0x5c)
wsdisplay0 at vga1: console (80x25, vt100 emulation)
pcib0 at pci0 dev 7 function 0
pcib0: Intel 82371AB PCI-to-ISA Bridge (PIIX4) (rev. 0x02)
pciide0 at pci0 dev 7 function 1: Intel 82371AB IDE controller (PIIX4)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <FUJITSU MPC3064AT>
wd0: drive supports 16-sector pio transfers, lba addressing
wd0: 6187MB, 13410 cyl, 15 head, 63 sec, 512 bytes/sect x 12672450 sectors
wd0: 32-bits data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
pciide0: primary channel interrupting at irq 14
pciide0: secondary channel wired to compatibility mode
atapibus0 at pciide0 channel 1
cd0 at atapibus0 drive 0: <CD-ROM 36X/AKU, , U21I> type 5 cdrom removable
cd0: 32-bits data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
pciide0: secondary channel interrupting at irq 15
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
uhci0 at pci0 dev 7 function 2: Intel 82371AB USB Host Controller (PIIX4) (rev. 0x01)
pci_intr_map: no mapping for pin D
uhci0: couldn't map interrupt
Intel 82371AB Power Management Controller (PIIX4) (miscellaneous bridge, revision 0x02) at pci0 dev 7 function 3 not configured
ESS Technology Inc product 0x1968 (audio multimedia) at pci0 dev 9 function 0 not configured
fxp0 at pci0 dev 11 function 0: Intel EtherExpress Pro 10+/100B Ethernet
isa0 at pcib0
	[isa devices, etc... snipped]

when the drive is empty, all that appears in the messages is this:

[...]
pciide0: secondary channel wired to compatibility mode
atapibus0 at pciide0 channel 1
pciide0: disabling secondary channel (no drives)
[...]

NetBSD 1.3.3 works OK whether the drive is empty or not and says:

[...]
wdc1 at isa0 port 0x170-0x177 irq 15
atapibus1 at wdc1
cd0 at atapibus1 drive 0: <CD-ROM 36X/AKU, , U21I> type 5 cdrom removable
[...]

>How-To-Repeat:
	Try NetBSD 1.4_ALPHA on this hardware configuration.
>Fix:
	unknown :-(
>Audit-Trail:
>Unformatted: