diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-09-15 03:17:17 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-09-15 03:17:17 +0200 |
commit | 1d62e1d8c88c4698a7d8da6a510fb1c7d6da9cf1 (patch) | |
tree | 9a270d4f3dc7f4c3d07552ec6de3d6b9c3f28588 | |
parent | 336df4d4aed17394d5a5fc8ae1f1c24df4c1cf5e (diff) | |
download | plan9front-1d62e1d8c88c4698a7d8da6a510fb1c7d6da9cf1.tar.xz |
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.
-rw-r--r-- | sys/src/9/pc/trap.c | 6 | ||||
-rw-r--r-- | sys/src/9/pc/usbehcipc.c | 4 | ||||
-rw-r--r-- | sys/src/9/pc/usbohci.c | 4 | ||||
-rw-r--r-- | sys/src/9/pc/usbuhci.c | 4 |
4 files changed, 6 insertions, 12 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; diff --git a/sys/src/9/pc/usbehcipc.c b/sys/src/9/pc/usbehcipc.c index b1394c039..20b09e3f9 100644 --- a/sys/src/9/pc/usbehcipc.c +++ b/sys/src/9/pc/usbehcipc.c @@ -172,10 +172,6 @@ scanpci(void) p->vid, p->did); continue; } - if(p->intl == 0xff || p->intl == 0) { - print("usbehci: no irq assigned for port %#lux\n", io); - continue; - } dprint("usbehci: %#x %#x: port %#lux size %#x irq %d\n", p->vid, p->did, io, p->mem[0].size, p->intl); diff --git a/sys/src/9/pc/usbohci.c b/sys/src/9/pc/usbohci.c index eee329238..522a8df39 100644 --- a/sys/src/9/pc/usbohci.c +++ b/sys/src/9/pc/usbohci.c @@ -2382,10 +2382,6 @@ scanpci(void) print("usbohci: failed to map registers\n"); continue; } - if(p->intl == 0xFF || p->intl == 0) { - print("usbohci: no irq assigned for port %#lux\n", mem); - continue; - } ctlr = malloc(sizeof(Ctlr)); if(ctlr == nil){ diff --git a/sys/src/9/pc/usbuhci.c b/sys/src/9/pc/usbuhci.c index 00db8d7bc..e5d599c21 100644 --- a/sys/src/9/pc/usbuhci.c +++ b/sys/src/9/pc/usbuhci.c @@ -2137,10 +2137,6 @@ scanpci(void) print("usbuhci: port %#ux in use\n", io); continue; } - if(p->intl == 0xFF || p->intl == 0){ - print("usbuhci: no irq assigned for port %#ux\n", io); - continue; - } dprint("uhci: %#x %#x: port %#ux size %#x irq %d\n", p->vid, p->did, io, p->mem[4].size, p->intl); |