summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/trap.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-09-15 03:17:17 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2012-09-15 03:17:17 +0200
commit1d62e1d8c88c4698a7d8da6a510fb1c7d6da9cf1 (patch)
tree9a270d4f3dc7f4c3d07552ec6de3d6b9c3f28588 /sys/src/9/pc/trap.c
parent336df4d4aed17394d5a5fc8ae1f1c24df4c1cf5e (diff)
usb: dont give up on unassigned pci irq line in hci driver
sometimes, the bios does not assign a interrupt line for pci devices. this should not be fatal in case of mp ineterrupts as long as there is intpin or msi can be used. warn in intrenable() if we hit such a interrupt and set irq to -1 to prevent it from getting enabled on the pic or as isa interrupt in apic mode.
Diffstat (limited to 'sys/src/9/pc/trap.c')
-rw-r--r--sys/src/9/pc/trap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/src/9/pc/trap.c b/sys/src/9/pc/trap.c
index 0593784fb..65915e06c 100644
--- a/sys/src/9/pc/trap.c
+++ b/sys/src/9/pc/trap.c
@@ -40,6 +40,12 @@ intrenable(int irq, void (*f)(Ureg*, void*), void* a, int tbdf, char *name)
return;
}
+ if(tbdf != BUSUNKNOWN && (irq == 0xff || irq == 0)){
+ print("intrenable: got unassigned irq %d, tbdf 0x%uX for %s\n",
+ irq, tbdf, name);
+ irq = -1;
+ }
+
if((v = xalloc(sizeof(Vctl))) == nil)
panic("intrenable: out of memory");
v->isintr = 1;