NetBSD Problem Report #8245
Received: (qmail 5159 invoked from network); 20 Aug 1999 18:37:24 -0000
Message-Id: <199908201837.NAA00783@dahan.metonymy.com>
Date: Fri, 20 Aug 1999 13:37:05 -0500 (CDT)
From: Dave Huang <khym@bga.com>
Reply-To: khym@bga.com
To: gnats-bugs@gnats.netbsd.org
Subject: pool wdcspl: reentrancy at file wdc.c (plus, CDROM doesn't work)
X-Send-Pr-Version: 3.95
>Number: 8245
>Category: kern
>Synopsis: pool wdcspl: reentrancy at file wdc.c (plus, CDROM doesn't work)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bouyer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Aug 20 11:50:01 +0000 1999
>Closed-Date: Wed Jan 26 08:18:21 +0000 2000
>Last-Modified: Wed Jan 26 08:18:32 +0000 2000
>Originator: Dave Huang
>Release: NetBSD-current as of August 15, 1999
>Organization:
Name: Dave Huang | Mammal, mammal / their names are called /
INet: khym@bga.com | they raise a paw / the bat, the cat /
FurryMUCK: Dahan | dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 23 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Environment:
System: NetBSD dell.metonymy.com 1.4J NetBSD 1.4J (DELL) #7: Sun Aug 15 00:46:11 CDT 1999 khym@dahan.metonymy.com:/usr/src.local/sys/arch/i386/compile/DELL i386
NetBSD 1.4J (DELL) #7: Sun Aug 15 00:46:11 CDT 1999
khym@dahan.metonymy.com:/usr/src.local/sys/arch/i386/compile/DELL
cpu0: family 5 model 2 step 5
cpu0: Intel Pentium (P54C) (586-class)
total memory = 32384 KB
avail memory = 27932 KB
using 430 buffers containing 1720 KB of memory
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 2
pci0: i/o enabled, memory enabled
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82434LX/NX PCI, Cache and Memory Controller (PCMC) (rev. 0x11)
pciide0 at pci0 dev 1 function 0: PC Technology RZ1000 (rev. 0x01)
pciide0: hardware does not support DMA
pciide0: primary channel wired to compatibility mode
pciide0: primary channel interrupting at irq 14
wd0 at pciide0 channel 0 drive 0: <ST31720A>
wd0: drive supports 16-sector pio transfers, lba addressing
wd0: 1625MB, 3303 cyl, 16 head, 63 sec, 512 bytes/sect x 3329424 sectors
wd0: drive supports PIO mode 4, DMA mode 2
wd1 at pciide0 channel 0 drive 1: <Conner Peripherals 1080MB - CFS1081A>
wd1: drive supports 16-sector pio transfers, lba addressing
wd1: 1032MB, 2097 cyl, 16 head, 63 sec, 512 bytes/sect x 2114180 sectors
wd1: drive supports PIO mode 4, DMA mode 2
pciide0: secondary channel wired to compatibility mode
pciide0: secondary channel ignored (other hardware responding at addresses)
pcib0 at pci0 dev 2 function 0
pcib0: Intel 82378ZB System I/O (SIO) (rev. 0x43)
vga0 at pci0 dev 6 function 0: Number 9 Computer Company Imagine-128 (rev. 0x00)
wsdisplay0 at vga0: console (80x25, vt100 emulation)
fxp0 at pci0 dev 12 function 0: Intel i82557 Ethernet, rev 5
fxp0: interrupting at irq 10
fxp0: Ethernet address 00:90:27:13:0b:30, 10/100 Mb/s
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 0
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
wdc1 at isa0 port 0x170-0x177 irq 15
atapibus0 at wdc1 channel 0
cd0 at atapibus0 drive 0: <ATAPI CD-ROM DRIVE 32X MAXIMUM, , 323P> type 5 cdrom removable
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
lpt0 at isa0 port 0x378-0x37b irq 7
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0: no ISA Plug 'n Play devices found
>Description:
This machine is an old Dell Dimension XPS P90, with what looks
to be a rather strange IDE system. The motherboard has two IDE
connectors; one labelled "PCI IDE," the other "ISA IDE." NetBSD agrees
with this, attaching the drives on the "PCI IDE" connector to pciide0
and the CDROM on the "ISA IDE" connector to wdc1. BTW, that CDROM is
an Acer of some sort... Acer 632 perhaps, but I'm not positive (I can
look it up if needed). The machine also has an extremely annoying
BIOS... it assigns all PCI cards the same IRQ (which you can set in
the CMOS setup utility). Anyways, all that is to say that the hardware
seems pretty weird and lame. However, Windows works just fine on it :)
The problem is that the CDROM doesn't work. If I try to mount a disc
or do a "disklabel cd0" (either with or without a CD in the drive), I
get:
wdc1:0:0: lost interrupt
type: atapi
c_bcount: 32
c_skip: 0
three times. The drive doesn't spin up or anything.
Normally, I see those messages every day from the /etc/daily script
trying to do a disklabel on the drive, but nothing really bad happens.
However, this morning, I saw:
[ a couple of the wdc1:0:0: lost interrupt messages ]
pool wdcspl: reentrancy at file ../../../../dev/ic/wdc.c line 1305
previous entry at file ../../../../dev/ic/wdc.c line 1286
panic: pr_enter
Stopped in disklabel at Debugger+0x4: leave
A stack trace shows the following functions:
Debugger+0x4
panic+0x55
_pool_put+0x52
wdc_free_xfer+0x80
wdc_ata_bio_done+0x8b
wdc_ata_bio_intr+0x42c
wdcintr+0x54
pciide_compat_intr+0x1e
Xintr14+0x70
--- interrupt ---
_pool_get+0x550
wdc_get_xfer+0x27
wdc_atapi_send_cmd+0x4b
scsipi_execute_xs+0x3c
atapi_scsipi_cmd+0x9a
scsipi_test_unit_ready+0x3c
cdopen+0xbb
spec_open+0x162
vn_open+0x341
sys_open+0xd0
syscall+0x1ed
--- syscall (number 5) ---
>How-To-Repeat:
I don't know how to reproduce the panic, but see above for the
"lost interrupt" message.
>Fix:
>Release-Note:
>Audit-Trail:
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: Dave Huang <khym@bga.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/8245: pool wdcspl: reentrancy at file wdc.c (plus, CDROM doesn't work)
Date: Wed, 25 Aug 1999 19:15:51 +0200
On Fri, Aug 20, 1999 at 01:37:05PM -0500, Dave Huang wrote:
> >Description:
> This machine is an old Dell Dimension XPS P90, with what looks
> to be a rather strange IDE system. The motherboard has two IDE
> connectors; one labelled "PCI IDE," the other "ISA IDE." NetBSD agrees
> with this, attaching the drives on the "PCI IDE" connector to pciide0
> and the CDROM on the "ISA IDE" connector to wdc1. BTW, that CDROM is
> an Acer of some sort... Acer 632 perhaps, but I'm not positive (I can
> look it up if needed). The machine also has an extremely annoying
> BIOS... it assigns all PCI cards the same IRQ (which you can set in
> the CMOS setup utility). Anyways, all that is to say that the hardware
> seems pretty weird and lame. However, Windows works just fine on it :)
>
> The problem is that the CDROM doesn't work. If I try to mount a disc
> or do a "disklabel cd0" (either with or without a CD in the drive), I
> get:
> wdc1:0:0: lost interrupt
> type: atapi
> c_bcount: 32
> c_skip: 0
> three times. The drive doesn't spin up or anything.
Sounds like IRQ 15 is not routed. Are you sure irq15 is not used by something
else (check BIOS) and that, under windows, the second controller is really on
IRQ 15 ?
Another thing to try is to disable features like read-ahead if the bios support
it. Old controllers don't support read-ahead with ATAPI devices.
From what I know of the rz1000, it's really a dual-channel controller.
I can't explain why the second channel is not on the rz1000 too.
Linux seems to do some weird thing for rz1000's but I don't know what exactly.
This seems to be related to irq problems with SMP.
FreeBSD doesn't do anything.
>
> Normally, I see those messages every day from the /etc/daily script
> trying to do a disklabel on the drive, but nothing really bad happens.
> However, this morning, I saw:
> [ a couple of the wdc1:0:0: lost interrupt messages ]
> pool wdcspl: reentrancy at file ../../../../dev/ic/wdc.c line 1305
> previous entry at file ../../../../dev/ic/wdc.c line 1286
> panic: pr_enter
> Stopped in disklabel at Debugger+0x4: leave
I just commited a fix for this one. pool_* operations need to be done with
bio irq disabled (to avoid reentrency).
I though the pool_* functions took care of this, it's not clear from the man
page that they are not reentrant (but the code is obvious :).
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--
From: Dave Huang <khym@bga.com>
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/8245: pool wdcspl: reentrancy at file wdc.c (plus, CDROM
doesn't work)
Date: Wed, 25 Aug 1999 14:44:13 -0500 (CDT)
On Wed, 25 Aug 1999, Manuel Bouyer wrote:
> Sounds like IRQ 15 is not routed. Are you sure irq15 is not used by
> something else (check BIOS) and that, under windows, the second
> controller is really on IRQ 15 ?
No, nothing else seems to be on irq15... I didn't see any mention of
irq15 in the BIOS. Using Win98's Device Manager in the "View devices by
connection" mode, I see that attached to the PCI bus is a "PC Tech PCI
IDE Single or Dual Port Controller", using I/O ports 0x1f0-0x1f7, 0x3f6
and IRQ 14. Attached to that is "Primary IDE controller (single fifo)",
which uses the same I/O ports and IRQ. Attached to "Computer" is
"Standard IDE/ESDI Hard Disk Controller", using I/O ports 0x170-0x177,
0x376 and IRQ 15. It's possible that the IRQ isn't being routed; I've
had problems with the ethernet card not getting an IRQ (even under
Windows) when doing a warm reboot. Rebooting using the reset button has
always fixed that problem, but it didn't fix the CDROM problem. There
isn't any "PNP OS" setting in this BIOS, and I have the latest one
(which is from October 1997).
> Another thing to try is to disable features like read-ahead if the
> bios support it. Old controllers don't support read-ahead with ATAPI
Didn't see anything like that in the BIOS...
> I just commited a fix for this one. pool_* operations need to be done with
> bio irq disabled (to avoid reentrency).
Great, thanks!
Responsible-Changed-From-To: kern-bug-people->bouyer
Responsible-Changed-By: hwr
Responsible-Changed-When: Fri Sep 3 04:36:27 PDT 1999
Responsible-Changed-Why:
Manuel is the pci ide guru
State-Changed-From-To: open->closed
State-Changed-By: thorpej
State-Changed-When: Wed Jan 26 00:18:21 PST 2000
State-Changed-Why:
This has been fixed.
>Unformatted:
(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.