DragonFly BSD
DragonFly submit List (threaded) for 2003-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: pcib newbus handling


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Mon, 22 Dec 2003 11:43:12 +0000

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) {


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]