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.
This commit is contained in:
parent
336df4d4ae
commit
1d62e1d8c8
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue