Subject: kern/9346: Incorrect pciide driver behaviour
To: None <gnats-bugs@gnats.netbsd.org>
From: None <luke@eed.miee.ru>
List: netbsd-bugs
Date: 02/03/2000 15:21:52
>Number:         9346
>Category:       kern
>Synopsis:       pciide driver finds a non-existent ATAPI device
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb  3 15:20:59 2000
>Last-Modified:
>Originator:     Oleg Polyanski
>Organization:
>Release:        1.4-current
>Environment:
>Description:
	During the boot pciide driver finds non-existent `wd0' (ST 506 
drive to be exact). Such device has never been existed in
system. Below is the output from `dmesg':

NetBSD 1.4Q (TINDERBOX) #5: Thu Feb  3 00:09:11 MSK 2000
    root@dazzle.org:/usr/src/syssrc/sys/arch/i386/compile/TINDERBOX
cpu0: family 6 model 5 step 1
cpu0: Intel Pentium II (Deschutes) (686-class)
total memory = 127 MB
avail memory = 116 MB
using 1659 buffers containing 6636 KB of memory
BIOS32 rev. 0 found at 0xfdb60
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82443BX Host Bridge/Controller (rev. 0x02)
ppb0 at pci0 dev 1 function 0: Intel 82443BX AGP Interface (rev. 0x02)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga1 at pci1 dev 0 function 0: Matrox MGA G100 AGP (rev. 0x02)
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
atapibus0 at pciide0 channel 0
sd0 at atapibus0 drive 1: <IOMEGA  ZIP 100       ATAPI, , 23.D> type 0 direct removable
sd0: drive offline
sd0: 32-bits data port
wd0 at pciide0 channel 0 drive 0: <ST506>
wd0: drive supports 1-sector pio transfers, chs addressing
wd0: 69632 KB, 1024 cyl, 8 head, 17 sec, 512 bytes/sect x 139264 sectors
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 0
sd0(pciide0:0:1): using PIO mode 3
pciide0: secondary channel wired to compatibility mode
atapibus1 at pciide0 channel 1
cd0 at atapibus1 drive 1: <ASUS CD-S340, , V3.10> 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
cd0(pciide0:1:1): 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)
uhci0: interrupting at irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
Intel 82371AB Power Management Controller (PIIX4) (miscellaneous bridge, revision 0x02) at pci0 dev 7 function 3 not configured
ncr0 at pci0 dev 16 function 0: ncr 53c875 fast20 wide scsi
ncr0: interrupting at irq 10
ncr0: minsync=12, maxsync=137, maxoffs=16, 128 dwords burst, large dma fifo
ncr0: single-ended, open drain IRQ driver, using on-chip SRAM
ncr0: restart (scsi reset).
scsibus0 at ncr0: 16 targets, 8 luns per target
ne0 at pci0 dev 17 function 0: Compex Ethernet
ne0: supplying EUI64: 00:80:48:ff:fe:d9:b1:d4
ne0: Ethernet address 00:80:48:d9:b1:d4
ne0: interrupting at irq 9
3Dfx Interactive Voodoo2 (video multimedia, revision 0x02) at pci0 dev 19 function 0 not configured
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
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
lpt0 at isa0 port 0x378-0x37b irq 7
pcppi0 at isa0 port 0x61
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: read port 0x203
isapnp0: No current device for tag, card 1
sb0 at isapnp0 port 0x220/16,0x330/2,0x388/4 irq 5 drq 1,5
sb0: Creative SB AWE64  PnP Audio: dsp v4.16
audio0 at sb0: full duplex, mmap, independent
mpu0 at sb0
midi0 at mpu0: SB MPU-401 MIDI UART
opl0 at sb0: model OPL3
midi1 at opl0: SB Yamaha OPL3
joy0 at isapnp0 port 0x200/8
joy0: Creative SB AWE64  PnP Game
joy0: joystick not connected
isapnp0: <Creative SB AWE64  PnP, CTL0022, , WaveTable> port 0x620/4 not configured
apm0 at mainbus0: Power Management spec V1.2
apm0: A/C state: on
apm0: battery charge state: no battery
biomask fd45 netmask ff45 ttymask ffc7
scsibus0: waiting 2 seconds for devices to settle...
sd1 at scsibus0 targ 1 lun 0: <SEAGATE, ST52160N, 0285> SCSI2 0/direct fixed
sd1(ncr0:1:0): 20.0 MB/s (50 ns, offset 15)
sd1: 2069 MB, 6536 cyl, 4 head, 162 sec, 512 bytes/sect x 4238282 sectors
sd2 at scsibus0 targ 2 lun 0: <SEAGATE, ST36530N, 1206> SCSI2 0/direct fixed
sd2(ncr0:2:0): 20.0 MB/s (50 ns, offset 15)
sd2: 6208 MB, 9006 cyl, 6 head, 235 sec, 512 bytes/sect x 12715920 sectors
ums0 at uhub0 port 1 configuration 1 interface 0
ums0: Logitech N48, rev 1.00/4.01, addr 2, iclass 3/1
ums0: 3 buttons and Z dir.
wsmouse0 at ums0 mux 0
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 512
	c_skip: 0
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 512
	c_skip: 0
pciide0:0:0: recal timed out
wd0d: device timeout reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 512
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 512
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 512
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 512
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 512
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0)
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 512
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 512
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 512
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 512
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 512
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 512
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0)
wd0: dos partition I/O error
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 2048
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 of 0-3 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 2048
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 of 0-3 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 2048
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 of 0-3 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 2048
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 of 0-3 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 2048
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 of 0-3 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
pciide0:0:0: lost interrupt
	type: ata
	c_bcount: 2048
	c_skip: 0
pciide0:0:0: recal drive fault
wd0d: device fault reading fsbn 0 of 0-3 (wd0 bn 0; cn 0 tn 0 sn 0)
boot device: sd2
root on sd2a dumps on sd2b
root file system type: ffs
IP Filter: loaded into slot 29
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25bf, vt100 emulation)
wsmux1: connecting to wsdisplay0
uhci_device_intr_transfer: not done, ii=0xf060e800

	[....]

>How-To-Repeat:
>Fix:
>Audit-Trail:
>Unformatted:
and tries to recognize it as valid block device causing very long
timeouts. 


>System: NetBSD dazzle.org 1.4Q NetBSD 1.4Q (TINDERBOX) #5: Thu Feb 3 00:09:11 MSK 2000 root@dazzle.org:/usr/src/syssrc/sys/arch/i386/compile/TINDERBOX i386