summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/npx.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-12-05 22:11:44 +0000
committerjhb <jhb@FreeBSD.org>2005-12-05 22:11:44 +0000
commitec69f8e34ca9cbec7c64ac2ec36de264961d1a79 (patch)
tree23435b26547c9cd80879678d357ef2e6ecafea47 /sys/i386/isa/npx.c
parenta0efd8b6a99f2b67bb20e9bdac9d584eb2610d62 (diff)
downloadFreeBSD-src-ec69f8e34ca9cbec7c64ac2ec36de264961d1a79.zip
FreeBSD-src-ec69f8e34ca9cbec7c64ac2ec36de264961d1a79.tar.gz
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
Diffstat (limited to 'sys/i386/isa/npx.c')
-rw-r--r--sys/i386/isa/npx.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c
index ae2ca9b..49309f3 100644
--- a/sys/i386/isa/npx.c
+++ b/sys/i386/isa/npx.c
@@ -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);
}
OpenPOWER on IntegriCloud