Module Name: src Committed By: riz Date: Mon Nov 22 03:05:59 UTC 2010
Modified Files: src/sys/arch/arc/pci [netbsd-5]: necpb.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1481): sys/arch/arc/pci/necpb.c: revision 1.33 Use fixed pci_intr_handle_t per device number regardless of pin and swiz. Tested the following multifunction card and devices over ppb(4) on Express5800/230 (JC94): --- uhci0 at pci0 dev 4 function 0: VIA Technologies VT83C572 USB Controller (rev. 0x61) uhci0: interrupting at int C usb0 at uhci0: USB revision 1.0 uhci1 at pci0 dev 4 function 1: VIA Technologies VT83C572 USB Controller (rev. 0x61) uhci1: interrupting at int C usb1 at uhci1: USB revision 1.0 ehci0 at pci0 dev 4 function 2: VIA Technologies VT8237 EHCI USB Controller (rev. 0x63) ehci0: interrupting at int C ehci0: dropped intr workaround enabled ehci0: EHCI version 1.0 ehci0: companion controllers, 2 ports each: uhci0 uhci1 usb2 at ehci0: USB revision 2.0 fwohci0 at pci0 dev 4 function 3: VIA Technologies VT6306 IEEE 1394 Host Controller (rev. 0x46) fwohci0: interrupting at int C fwohci0: OHCI version 1.0 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:01:08:00:37:02:79:4f fwohci0: Phy 1394a available S400, 3 ports. fwohci0: Link S400, max_rec 1024 bytes. fwohci0: max_rec 1024 -> 2048 ieee1394if0 at fwohci0: IEEE1394 bus fwip0 at ieee1394if0: IP over IEEE1394 fwohci0: Initiate bus reset vge0 at pci0 dev 4 function 4: VIA VT612X Gigabit Ethernet (rev. 0x11) vge0: interrupting at int C vge0: Ethernet address: 00:01:08:00:b1:71 ciphy0 at vge0 phy 1: Cicada CS8201 10/100/1000TX PHY, rev. 2 ciphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto : --- ppb0 at pci0 dev 4 function 0: Digital Equipment DC21154 PCI-PCI Bridge (rev. 0x05) pci1 at ppb0 bus 1 pci1: i/o space, memory space enabled ex0 at pci1 dev 4 function 0: 3Com 3c980C-TXM 10/100 Ethernet (rev. 0x78) ex0: interrupting at int C ex0: MAC address 00:01:03:ce:74:48 bmtphy0 at ex0 phy 24: Broadcom 3c905C internal PHY, rev. 7 bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto ex1 at pci1 dev 5 function 0: 3Com 3c980C-TXM 10/100 Ethernet (rev. 0x78) ex1: interrupting at int C ex1: MAC address 00:01:03:ce:74:49 bmtphy1 at ex1 phy 24: Broadcom 3c905C internal PHY, rev. 7 bmtphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto : To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.32.6.1 src/sys/arch/arc/pci/necpb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arc/pci/necpb.c diff -u src/sys/arch/arc/pci/necpb.c:1.32 src/sys/arch/arc/pci/necpb.c:1.32.6.1 --- src/sys/arch/arc/pci/necpb.c:1.32 Sat Jul 5 08:46:25 2008 +++ src/sys/arch/arc/pci/necpb.c Mon Nov 22 03:05:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: necpb.c,v 1.32 2008/07/05 08:46:25 tsutsui Exp $ */ +/* $NetBSD: necpb.c,v 1.32.6.1 2010/11/22 03:05:58 riz Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: necpb.c,v 1.32 2008/07/05 08:46:25 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: necpb.c,v 1.32.6.1 2010/11/22 03:05:58 riz Exp $"); #include "opt_pci.h" @@ -339,7 +339,6 @@ pci_chipset_tag_t pc = pa->pa_pc; pcitag_t intrtag = pa->pa_intrtag; int pin = pa->pa_intrpin; - int swiz = pa->pa_intrswiz % 4; int bus, dev; if (pin == 0) { @@ -363,13 +362,13 @@ switch (dev) { case 3: - *ihp = (pin - swiz + 2) % 4; + *ihp = 3; break; case 4: - *ihp = (pin - swiz + 1) % 4; + *ihp = 2; break; case 5: - *ihp = (pin - swiz + 0) % 4; + *ihp = 1; break; default: *ihp = -1;