Calculate IRQ from swiz, if bus != 0.

This commit is contained in:
kiyohara 2010-11-03 05:23:11 +00:00
parent 193f24869a
commit 84b6554108
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_machdep.c,v 1.17 2008/05/30 15:56:32 kiyohara Exp $ */
/* $NetBSD: pci_machdep.c,v 1.18 2010/11/03 05:23:11 kiyohara Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.17 2008/05/30 15:56:32 kiyohara Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.18 2010/11/03 05:23:11 kiyohara Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -114,6 +114,6 @@ bebox_pci_conf_interrupt(pci_chipset_tag_t pc, int bus, int dev, int pin,
*iline = BEBOX_PCIBUS0_DEV2LINE(dev);
}
} else
#define BEBOX_PCIBUS_DEV2LINE(d, s) ((((d) + (s) + 1) & 0x3) + 26)
*iline = BEBOX_PCIBUS_DEV2LINE(dev, swiz);
#define BEBOX_PCIBUS_SWIZ2LINE(s) ((s) + 14)
*iline = BEBOX_PCIBUS_SWIZ2LINE(swiz);
}