NetBSD Problem Report #7372

Received: (qmail 18658 invoked from network); 13 Apr 1999 16:54:46 -0000
Message-Id: <199904131654.SAA00562@fimfpc30.math.ntnu.no>
Date: Tue, 13 Apr 1999 18:54:41 +0200 (CEST)
From: Arne H Juul <arnej@math.ntnu.no>
Reply-To: arnej@math.ntnu.no
To: gnats-bugs@gnats.netbsd.org
Subject: ATAPI cd-rom drive only found when CD present
X-Send-Pr-Version: 3.95

>Number:         7372
>Category:       kern
>Synopsis:       ATAPI cd-rom drive only found when CD present
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bouyer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 13 10:05:01 +0000 1999
>Closed-Date:    Tue Jun 01 14:16:19 +0000 1999
>Last-Modified:  Wed Sep 05 01:29:05 +0000 2001
>Originator:     Arne H. Juul
>Release:        NetBSD-current as of Apr 13, 1999
>Organization:
	Norwegian University of Technology and Science
>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 :-(
>Release-Note:
>Audit-Trail:

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: arnej@math.ntnu.no
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/7372: ATAPI cd-rom drive only found when CD present
Date: Wed, 14 Apr 1999 13:34:29 +0200

 --UugvWAfsgieZRqgk
 Content-Type: text/plain; charset=us-ascii

 Hi,
 could you try out the attache patch ?
 It makes the 1s timeout be really 1s, and not 1ms ...

 --
 Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
 --

 --UugvWAfsgieZRqgk
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=wdc_diff

 Index: wdc.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/ic/wdc.c,v
 retrieving revision 1.66.2.1
 diff -u -r1.66.2.1 wdc.c
 --- wdc.c	1999/04/12 09:14:30	1.66.2.1
 +++ wdc.c	1999/04/14 11:22:51
 @@ -1023,7 +1023,7 @@
  	bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh,
  	    WDSD_IBM | (drive << 4));
  	if (wdcwait(chp, wdc_c->r_st_bmask, wdc_c->r_st_bmask,
 -	    wdc_c->timeout) != 0) {
 +	    wdc_c->timeout * 1000) != 0) {
  		wdc_c->flags |= AT_TIMEOU;
  		__wdccommand_done(chp, xfer);
  		return;
 @@ -1056,7 +1056,7 @@
  	WDCDEBUG_PRINT(("__wdccommand_intr %s:%d:%d\n",
  	    chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive), DEBUG_INTR);
  	if (wdcwait(chp, wdc_c->r_st_pmask, wdc_c->r_st_pmask,
 -	     (irq == 0)  ? wdc_c->timeout : 0)) {
 +	     (irq == 0)  ? wdc_c->timeout * 1000 : 0)) {
  		if (irq && (xfer->c_flags & C_TIMEOU) == 0) 
  			return 0; /* IRQ was not for us */
  		wdc_c->flags |= AT_TIMEOU;

 --UugvWAfsgieZRqgk--

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: arnej@math.ntnu.no, gnats-bugs@gnats.netbsd.org
Cc:  Subject: Re: kern/7372: ATAPI cd-rom drive only found when CD present
Date: Wed, 14 Apr 1999 14:11:32 +0200

 On Apr 14, Manuel Bouyer wrote
 > Hi,
 > could you try out the attache patch ?

 Please forget it, it's totally bogus.
 The timeout was really 1s, this patch makes it 1000s.
 You can still try to increase these timeouts but not that much !

 Sorry, the solution is not that simple.

 --
 Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
 --
Responsible-Changed-From-To: kern-bug-people->bouyer 
Responsible-Changed-By: hwr 
Responsible-Changed-When: Sat May 8 02:13:20 PDT 1999 
Responsible-Changed-Why:  
Manuel shoudl know this code best 
State-Changed-From-To: open->feedback 
State-Changed-By: bouyer 
State-Changed-When: Mon May 10 07:01:34 PDT 1999 
State-Changed-Why:  
this should be fixed in 1.4, isn't it ? Could you confirm ? 
State-Changed-From-To: feedback->closed 
State-Changed-By: bouyer 
State-Changed-When: Tue Jun 1 07:16:19 PDT 1999 
State-Changed-Why:  
No anserw from the author :( But as Jonathan Stone had the exact same problem 
which was fixed by the hchanges I commited before 1.4, I'll assume this 
is solved as well. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.