pcib newbus handling

Joerg Sonnenberger joerg at britannica.bec.de
Mon Dec 22 04:00:32 PST 2003


A local hack found its way in this patch, the attached
patch removes it.

Joerg
--- pci_cfgreg.c.orig	Mon Dec 22 11:41:41 2003
+++ pci_cfgreg.c	Mon Dec 22 11:42:05 2003
@@ -255,36 +255,8 @@
 	int			i, irq;
 	struct bios_regs	args;
 	u_int16_t		v;
- 	int already = 0;
- 	int errok = 0;
-
-    if(pin==1 && device==9)
-	already = 10;
-    if(pin==1 && device==10)
-	already = 6;
-
-    if(already)
-    {
-	u_long intr;
-	u_char irq = already;
-	
-#define PCI_INTERRUPT_REG 0x3c
-#define	PCI_INTERRUPT_LINE_SHIFT		0
-#define	PCI_INTERRUPT_LINE_MASK			0xff
-#define	PCI_INTERRUPT_LINE(icr) \
-	    (((icr) >> PCI_INTERRUPT_LINE_SHIFT) & PCI_INTERRUPT_LINE_MASK)
-
-	intr = pci_cfgregread(bus, device, 0 , PCI_INTERRUPT_REG, 4);
-	if (irq != PCI_INTERRUPT_LINE(intr)) {
-		intr &= ~(PCI_INTERRUPT_LINE_MASK << PCI_INTERRUPT_LINE_SHIFT);
-		intr |= (irq << PCI_INTERRUPT_LINE_SHIFT);
-		pci_cfgregwrite(bus, device,0 , PCI_INTERRUPT_REG, intr, 4);
-	}
-
-	return irq;
-    }
-
-    already = 0;
+	int already = 0;
+	int errok = 0;
 
 	v = pcibios_get_version();
 	if (v < 0x0210) {




More information about the Submit mailing list