Subject: Re: isp driver issues
To: Thomas T. Thai <tom@minnesota.com>
From: Andreas Wrede <andreas@planix.com>
List: current-users
Date: 11/11/2004 00:43:43
--Apple-Mail-1--561943948
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed


On 10-Nov-04, at 6:24 PM, Thomas T. Thai wrote:
> Adaptect SCSISelect Util showed:
>
>    Adaptec AIC-7899 Channel A IRQ 11
>    Adaptec AIC-7899 Channel B IRQ 10
>
> Qlogic FastUtil! showed the 2200 fibre card using IRQ 10 as well.


I have a similar situation:

isp0 at pci1 dev 2 function 0: QLogic FC-AL and Fabric HBA
isp0: interrupting at ioapic0 pin 18 (irq 15)
scsibus0 at isp0: 256 targets, 8 luns per target
[SNIP]
esiop0 at pci1 dev 4 function 0: Symbios Logic 53c895 (ultra2-wide scsi)
esiop0: using on-board RAM
esiop0: interrupting at ioapic0 pin 18 (irq 15)
scsibus1 at esiop0: 16 targets, 8 luns per target
[SNIP]
isp1 at pci0 dev 9 function 0: QLogic FC-AL and Fabric HBA
isp1: interrupting at ioapic0 pin 17 (irq 5)
scsibus2 at isp1: 256 targets, 8 luns per target

Booting with devices attached to both fibre channels results in:

atapibus0 at atabus0: 2 targets
cd0 at atapibus0 drive 0: <CD-224E, , 1.5A> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2
cd0(piixide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data  
transfers)
isp0: Interrupting Mailbox Command (0x69) Timeout
isp0: Mailbox Command 'GET FW STATE' failed (TIMEOUT)
isp1: Interrupting Mailbox Command (0x69) Timeout
isp1: Mailbox Command 'GET FW STATE' failed (TIMEOUT)
isp0: Interrupting Mailbox Command (0x69) Timeout
isp0: Mailbox Command 'GET FW STATE' failed (TIMEOUT)
isp1: Interrupting Mailbox Command (0x69) Timeout
isp1: Mailbox Command 'GET FW STATE' failed (TIMEOUT)
probe(esiop0:0:0:0): command timeout, CDB: 0x12 00 00 00 24 00

and the machine hangs - debugger shows:

Stopped at      netbsd:cpu_Debugger+0x4:        leave
db{1}> bt
cpu_Debugger(c071ac20,0,400040,0,fffffffe) at netbsd:cpu_Debugger+0x4
comintr(c0eea400,0,10,30,10) at netbsd:comintr+0x6f2
Xintr_ioapic_edge4() at netbsd:Xintr_ioapic_edge4+0xa4
--- interrupt ---
netbsd:mpidle:


If I detach both fibre channels, tha machine boots fine:

cd0: drive supports PIO mode 4, DMA mode 2
cd0(piixide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data  
transfers)
sd0 at scsibus1 target 0 lun 0: <HP, 9.10GB A 80-F309, > disk fixed
sd0: 8678 MB, 9827 cyl, 5 head, 361 sec, 512 bytes/sect x 17773524  
sectors
sd0: sync (25.00ns offset 31), 16-bit (80.000MB/s) transfers, tagged  
queueing
sd1 at scsibus1 target 1 lun 0: <HP, 9.10GB A 80-F309, > disk fixed
sd1: 8678 MB, 9827 cyl, 5 head, 361 sec, 512 bytes/sect x 17773524  
sectors
sd1: sync (25.00ns offset 31), 16-bit (80.000MB/s) transfers, tagged  
queueing
warning: double match for boot device (sd0, sd1)
boot device: sd0
root on sd0a dumps on sd0b
root file system type: ffs
cpu1: CPU 0 running

I then can connect the XServe RAID controllers and run

# scsictl /dev/scsibus0 scan any any
sd2 at scsibus0 target 0 lun 0: <APPLE, Xserve RAID, 1.21> disk fixed
sd2: 1035 GB, 132522 cyl, 128 head, 128 sec, 512 bytes/sect x  
2171240448 sectors
# scsictl /dev/scsibus2 scan any any
sd3 at scsibus2 target 0 lun 0: <APPLE, Xserve RAID, 1.21> disk fixed
sd3: 1035 GB, 132522 cyl, 128 head, 128 sec, 512 bytes/sect x  
2171240448 sectors
#

sd2 and sd3 now work as expected - disklabel, newfs, mount and  
read/write without further error messages from the controller.


I did experience a hard lock-up of the system during a large write  
operation to the filesystem on sd2. I could not even enter the  
debugger.


> List of IRQ usage on my system grep from dmesg:
>
> isp0: interrupting at ioapic1 pin 7 (irq 10)
> amr0: interrupting at ioapic1 pin 9 (irq 11)
> isp1: interrupting at ioapic1 pin 5 (irq 5)
> ahc1: interrupting at ioapic1 pin 1 (irq 11)
> ahc2: interrupting at ioapic1 pin 2 (irq 10)
> fxp0: interrupting at ioapic1 pin 10 (irq 5)
> rccide0: primary channel interrupting at ioapic0 pin 14 (irq 14)
> rccide0: secondary channel interrupting at ioapic0 pin 15 (irq 15)
> ohci0: interrupting at ioapic1 pin 15 (irq 11)
> lpt0 at isa0 port 0x378-0x37b irq 7
> com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
> com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
> pckbc0: using irq 1 for kbd slot
> pckbc0: using irq 12 for aux slot
> fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2


piixide0: primary channel interrupting at ioapic0 pin 14 (irq 14)
uhci0: interrupting at ioapic0 pin 19 (irq 11)
isp0: interrupting at ioapic0 pin 18 (irq 15)
skc0 at pci1 dev 3 function 0: ioapic0 pin 19 (irq 11)
esiop0: interrupting at ioapic0 pin 18 (irq 15)
amr0: interrupting at ioapic0 pin 16 (irq 10)
isp1: interrupting at ioapic0 pin 17 (irq 5)
lpt0 at isa0 port 0x378-0x37b irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2

For completeness:

 >> NetBSD/i386 BIOS Boot, Revision 3.1
 >> (root@woffi.planix.com, Mon Jan 12 15:02:22 EST 2004)
 >> Memory: 635/261056 k
Press return to boot now, any other key for boot menu
booting hd0a:netbsd - starting in 0
6286572+141516+573752 [354720+320757]=0x753b28
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
     The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
     The Regents of the University of California.  All rights reserved.

NetBSD 2.0_RC4 (PLANIX.MP) #8: Fri Oct  8 01:26:41 EDT 2004
          
root@willy.wrede.pvt:/u1/netbsd-2.0/obj/sys/arch/i386/compile.i386/ 
PLANIX.MP
total memory = 255 MB
avail memory = 242 MB
BIOS32 rev. 0 found at 0xfd83c
mainbus0 (root)
mainbus0: Intel MP Specification (Version 1.4) (HP       LPr         )
cpu0 at mainbus0: apid 1 (boot processor)
cpu0: Intel Pentium III (686-class), 698.85 MHz, id 0x681
cpu0: features 387fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features 387fbff<PGE,MCA,CMOV,PAT,PSE36,PN,MMX>
cpu0: features 387fbff<FXSR,SSE>
cpu0: I-cache 16 KB 32B/line 4-way, D-cache 16 KB 32B/line 4-way
cpu0: L2 cache 256 KB 32B/line 8-way
cpu0: ITLB 32 4 KB entries 4-way, 2 4 MB entries fully associative
cpu0: DTLB 64 4 KB entries 4-way, 8 4 MB entries 4-way
cpu0: serial number 0000-0681-0003-9C42-8463-DD55
cpu0: calibrating local timer
cpu0: apic clock running at 99 MHz
cpu0: 8 page colors
cpu1 at mainbus0: apid 0 (application processor)
cpu1: starting
cpu1: Intel Pentium III (686-class), 698.81 MHz, id 0x681
cpu1: features 387fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu1: features 387fbff<PGE,MCA,CMOV,PAT,PSE36,PN,MMX>
cpu1: features 387fbff<FXSR,SSE>
cpu1: I-cache 16 KB 32B/line 4-way, D-cache 16 KB 32B/line 4-way
cpu1: L2 cache 256 KB 32B/line 8-way
cpu1: ITLB 32 4 KB entries 4-way, 2 4 MB entries fully associative
cpu1: DTLB 64 4 KB entries 4-way, 8 4 MB entries 4-way
cpu1: serial number 0000-0681-0000-B7E3-AF6D-2265
mpbios: bus 0 is type PCI
mpbios: bus 1 is type PCI
mpbios: bus 2 is type PCI
mpbios: bus 3 is type ISA
ioapic0 at mainbus0 apid 2 (I/O APIC)
ioapic0: pa 0xfec00000, version 11, 24 pins
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82443BX Host Bridge/Controller (AGP disabled) (rev. 0x03)
pchb0: fixing Idle/Pipeline DRAM Leadoff Timing
pcib0 at pci0 dev 4 function 0
pcib0: Intel 82371AB PCI-to-ISA Bridge (PIIX4) (rev. 0x02)
piixide0 at pci0 dev 4 function 1
piixide0: Intel 82371AB IDE controller (PIIX4) (rev. 0x01)
piixide0: bus-master DMA support present
piixide0: primary channel wired to compatibility mode
piixide0: primary channel interrupting at ioapic0 pin 14 (irq 14)
atabus0 at piixide0 channel 0
piixide0: secondary channel wired to compatibility mode
piixide0: secondary channel ignored (disabled)
uhci0 at pci0 dev 4 function 2: Intel 82371AB USB Host Controller  
(PIIX4) (rev. 0x01)
uhci0: interrupting at ioapic0 pin 19 (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 4 function 3 not configured
ppb0 at pci0 dev 7 function 0: Digital Equipment DECchip 21152 PCI-PCI  
Bridge (rev. 0x03)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
isp0 at pci1 dev 2 function 0: QLogic FC-AL and Fabric HBA
isp0: interrupting at ioapic0 pin 18 (irq 15)
scsibus0 at isp0: 256 targets, 8 luns per target
skc0 at pci1 dev 3 function 0: ioapic0 pin 19 (irq 11)
skc0: bad VPD resource id: expected 82 got ff
skc0: (null)
sk0 at skc0 port A: Ethernet address 00:0f:3d:87:e2:79
makphy0 at sk0 phy 0: Marvell 88E1011 Gigabit PHY, rev. 3
makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,  
1000baseT-FDX, auto
esiop0 at pci1 dev 4 function 0: Symbios Logic 53c895 (ultra2-wide scsi)
esiop0: using on-board RAM
esiop0: interrupting at ioapic0 pin 18 (irq 15)
scsibus1 at esiop0: 16 targets, 8 luns per target
ppb1 at pci0 dev 8 function 0: Intel product 0x0960 (rev. 0x03)
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
amr0 at pci0 dev 8 function 1: AMI RAID <Series 466>
amr0: interrupting at ioapic0 pin 16 (irq 10)
amr0: firmware <F.02.05>, BIOS <B.02.03>, 16MB RAM
isp1 at pci0 dev 9 function 0: QLogic FC-AL and Fabric HBA
isp1: interrupting at ioapic0 pin 17 (irq 5)
scsibus2 at isp1: 256 targets, 8 luns per target
vga1 at pci0 dev 13 function 0: Cirrus Logic CL-GD5446 (rev. 0x45)
wsdisplay0 at vga1 kbdmux 1
wsmux1: connecting to wsdisplay0
isa0 at pcib0
lpt0 at isa0 port 0x378-0x37b irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
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
isapnp0: no ISA Plug 'n Play devices found
ioapic0: enabling
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
Kernelized RAIDframe activated
IPsec: Initialized Security Association Processing.
scsibus0: waiting 2 seconds for devices to settle...
scsibus1: waiting 2 seconds for devices to settle...
scsibus2: waiting 2 seconds for devices to settle...
atapibus0 at atabus0: 2 targets
cd0 at atapibus0 drive 0: <CD-224E, , 1.5A> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2
cd0(piixide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data  
transfers)
sd0 at scsibus1 target 0 lun 0: <HP, 9.10GB A 80-F309, > disk fixed
sd0: 8678 MB, 9827 cyl, 5 head, 361 sec, 512 bytes/sect x 17773524  
sectors
sd0: sync (25.00ns offset 31), 16-bit (80.000MB/s) transfers, tagged  
queueing
sd1 at scsibus1 target 1 lun 0: <HP, 9.10GB A 80-F309, > disk fixed
sd1: 8678 MB, 9827 cyl, 5 head, 361 sec, 512 bytes/sect x 17773524  
sectors
sd1: sync (25.00ns offset 31), 16-bit (80.000MB/s) transfers, tagged  
queueing
warning: double match for boot device (sd0, sd1)
boot device: sd0
root on sd0a dumps on sd0b
root file system type: ffs
cpu1: CPU 0 running
Thu Nov 11 00:24:52 EST 2004


-- 
	aew

--Apple-Mail-1--561943948
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFBkvwQEh/h9J/TQyERAk7jAKDF0VFM/DinRE3XPey8fumUcYFCeQCdG+2J
exkHguRKSmsIhnEcOU6YJr0=
=Hki8
-----END PGP SIGNATURE-----

--Apple-Mail-1--561943948--