Don't panic if IRQ 13 doesn't exist. On some machines (see previous

commit to atpic.c) there may not be an IRQ 13.  Instead, just keep going.
If the INT16 interface doesn't work then we will eventually panic anyway.

FWIW: We could probably just axe the support for IRQ 13 altogether at this
point.  The only thing we'd lose support for are 486sx systems with
external 487 FPUs.

MFC after:	1 week
This commit is contained in:
John Baldwin 2005-12-05 22:11:44 +00:00
parent d0057d3576
commit ac7326e338

View File

@ -263,11 +263,11 @@ npx_probe(dev)
irq_rid = 0;
irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &irq_rid, irq_num,
irq_num, 1, RF_ACTIVE);
if (irq_res == NULL)
panic("npx: can't get IRQ");
if (bus_setup_intr(dev, irq_res, INTR_TYPE_MISC | INTR_FAST, npx_intr,
NULL, &irq_cookie) != 0)
panic("npx: can't create intr");
if (irq_res != NULL) {
if (bus_setup_intr(dev, irq_res, INTR_TYPE_MISC | INTR_FAST,
npx_intr, NULL, &irq_cookie) != 0)
panic("npx: can't create intr");
}
/*
* Partially reset the coprocessor, if any. Some BIOS's don't reset
@ -384,8 +384,10 @@ npx_probe(dev)
/* FALLTHROUGH */
no_irq13:
idt[IDT_MF] = save_idt_npxtrap;
bus_teardown_intr(dev, irq_res, irq_cookie);
bus_release_resource(dev, SYS_RES_IRQ, irq_rid, irq_res);
if (irq_res != NULL) {
bus_teardown_intr(dev, irq_res, irq_cookie);
bus_release_resource(dev, SYS_RES_IRQ, irq_rid, irq_res);
}
bus_release_resource(dev, SYS_RES_IOPORT, ioport_rid, ioport_res);
return (0);
}