Hi Brett, I've got the same problem with a Dell PowerEdge 2500 (3 PCI bus). The common point is the PCI host bridge. It does not seem very well supported in Linux (since there's no specs available on the net.). I manage to patch the code for assigning the IRQ and I got a picture using xawtv, however, I was unable to get a clean picture from 3 bt878 based cards at the same time. I no longer have this machine, since my company decided not to use it (cause the above problem!). You'll find a small patch along this mail. Tell us if at least your computer boot with this patch (since the IRQ code is ALWAYS executed and IRQs are assigned on ALL buses). Benoit. PS: Try to remove the network card too. On Mon, 01 Jul 2002 16:08:36 -0400 "Brett Simpson" <Simpsonb@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hello, > > I am currently unable to get xawtv to show anything from my Osprey 100 encoder card on a Compaq ML370 server. I have an identical setup (software wise) on a Compaq SP750 profession workstation and it works fine. The encoder card is ok because I have moved it into the SP750 and can see video ok. I'm seeing these errors from the ML370's /var/log/messages. I've also included the output of lspci below for both the SP750 and ML370. > > Jul 1 12:52:41 localhost kernel: bttv0: aiee: error loops > Jul 1 12:52:41 localhost kernel: bttv0: irq: SCERR risc_count=2fda8014 > Jul 1 12:52:41 localhost kernel: bttv0: aiee: error loops > Jul 1 12:52:42 localhost kernel: bttv0: resetting chip > Jul 1 12:52:42 localhost kernel: bttv0: irq: SCERR risc_count=2cb44020 > Jul 1 12:52:42 localhost kernel: bttv0: irq: SCERR risc_count=2cb44010 > > Compaq ML370 > [root@localhost root]# lspci > 00:00.0 Host bridge: ServerWorks CNB20HE Host Bridge (rev 23) > 00:00.1 Host bridge: ServerWorks CNB20HE Host Bridge (rev 01) > 00:00.2 Host bridge: ServerWorks: Unknown device 0006 (rev 01) > 00:00.3 Host bridge: ServerWorks: Unknown device 0006 (rev 01) > 00:02.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 08) > 00:05.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27) > 00:06.0 System peripheral: Compaq Computer Corporation Advanced System Management Controller > 00:0f.0 ISA bridge: ServerWorks OSB4 South Bridge (rev 51) > 00:0f.1 IDE interface: ServerWorks OSB4 IDE Controller > 00:0f.2 USB Controller: ServerWorks OSB4/CSB5 USB Controller (rev 04) > 01:02.0 SCSI storage controller: Adaptec AHA-3960D / AIC-7899A U160/m (rev 01) > 01:02.1 SCSI storage controller: Adaptec AHA-3960D / AIC-7899A U160/m (rev 01) > 01:04.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11) > 01:04.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11) > 07:07.0 PCI Hot-plug controller: Compaq Computer Corporation PCI Hotplug Controller (rev 12) > [root@localhost root]#
diff -ru linux-2.4.18-ori/arch/i386/kernel/pci-i386.h linux/arch/i386/kernel/pci-i386.h --- linux-2.4.18-ori/arch/i386/kernel/pci-i386.h Sun Nov 11 19:09:32 2001 +++ linux/arch/i386/kernel/pci-i386.h Fri Mar 22 15:57:48 2002 @@ -4,7 +4,7 @@ * (c) 1999 Martin Mares <mj@xxxxxx> */ -#undef DEBUG +#define DEBUG #ifdef DEBUG #define DBG(x...) printk(x) diff -ru linux-2.4.18-ori/arch/i386/kernel/pci-irq.c linux/arch/i386/kernel/pci-irq.c --- linux-2.4.18-ori/arch/i386/kernel/pci-irq.c Mon Feb 25 20:37:53 2002 +++ linux/arch/i386/kernel/pci-irq.c Fri May 17 11:25:24 2002 @@ -22,7 +22,7 @@ #define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24)) #define PIRQ_VERSION 0x0100 -static struct irq_routing_table *pirq_table; +static struct irq_routing_table *pirq_table = NULL; /* * Never use: 0, 1, 2 (timer, keyboard, and cascade) @@ -94,7 +94,7 @@ DBG("%02x:%02x slot=%02x", e->bus, e->devfn/8, e->slot); for(j=0; j<4; j++) DBG(" %d:%02x/%04x", j, e->irq[j].link, e->irq[j].bitmap); - DBG("\n"); + DBG(" rfu=%02x\n",e->rfu); } #endif busmap[e->bus] = 1; @@ -380,13 +380,13 @@ */ static int pirq_serverworks_get(struct pci_dev *router, struct pci_dev *dev, int pirq) { - outb_p(pirq, 0xc00); + outb_p(pirq+0x10, 0xc00); return inb(0xc01) & 0xf; } static int pirq_serverworks_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) { - outb_p(pirq, 0xc00); + outb_p(pirq+0x10, 0xc00); outb_p(irq, 0xc01); return 1; } @@ -524,8 +524,33 @@ return NULL; } +/* + pin: range 0 ... 3 for pin A .. D +*/ + +static struct irq_info * pirq_get_info_pin(struct pci_dev *dev, u8 *pin) +{ + struct irq_info *info = NULL; + + for (;;) + { + info = pirq_get_info(dev); + if (info != NULL) + break; + + if (dev->bus->parent == NULL) + break; + + *pin = (*pin + PCI_SLOT(dev->devfn)) % 4; + dev = dev->bus->self; + } + + return info; +} + static void pcibios_test_irq_handler(int irq, void *dev_id, struct pt_regs *regs) { + printk(KERN_DEBUG "pcibios_test_irq_handler: received\n"); } static int pcibios_lookup_irq(struct pci_dev *dev, int assign) @@ -549,9 +574,12 @@ return 0; } pin = pin - 1; - - DBG("IRQ for %s:%d", dev->slot_name, pin); - info = pirq_get_info(dev); + + DBG("IRQ for %s:%d (current irq=%d)", dev->slot_name, pin, dev->irq); + + /* search for an entry into the PCI Interrupt Routing Table */ + + info = pirq_get_info_pin(dev,&pin); if (!info) { DBG(" -> not found in routing table\n"); return 0; @@ -617,7 +645,7 @@ if (!pin) continue; pin--; - info = pirq_get_info(dev2); + info = pirq_get_info_pin(dev2,&pin); if (!info) continue; if (info->irq[pin].link == pirq) { @@ -682,6 +710,7 @@ pci_for_each_dev(dev) { pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); + DBG("%s: use interrupt pin %c\n",dev->slot_name,'A'+pin-1); #ifdef CONFIG_X86_IO_APIC /* * Recalculate IRQ numbers if we use the I/O APIC. @@ -720,9 +749,10 @@ /* * Still no IRQ? Try to lookup one... */ - if (pin && !dev->irq) + if (pin /*&& !dev->irq*/) pcibios_lookup_irq(dev, 0); } + DBG("PCI: IRQ fixup... end\n"); } void pcibios_penalize_isa_irq(int irq)