Rework r209456:
Instead of using fake rid (which ISA doesn't like), delete untrusted IRQ resource and let it be recreated.
This commit is contained in:
parent
956000b838
commit
6019ba4e4b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=209634
@ -259,7 +259,8 @@ atrtc_attach(device_t dev)
|
||||
if (!atrtcclock_disable &&
|
||||
(resource_int_value(device_get_name(dev), device_get_unit(dev),
|
||||
"clock", &i) != 0 || i != 0)) {
|
||||
sc->intr_rid = -1;
|
||||
sc->intr_rid = 0;
|
||||
bus_delete_resource(dev, SYS_RES_IRQ, sc->intr_rid);
|
||||
if (!(sc->intr_res = bus_alloc_resource(dev, SYS_RES_IRQ,
|
||||
&sc->intr_rid, 8, 8, 1, RF_ACTIVE))) {
|
||||
device_printf(dev,"Can't map interrupt.\n");
|
||||
|
@ -535,7 +535,8 @@ attimer_attach(device_t dev)
|
||||
tc_init(&sc->tc);
|
||||
if (resource_int_value(device_get_name(dev), device_get_unit(dev),
|
||||
"clock", &i) != 0 || i != 0) {
|
||||
sc->intr_rid = -1;
|
||||
sc->intr_rid = 0;
|
||||
bus_delete_resource(dev, SYS_RES_IRQ, sc->intr_rid);
|
||||
if (!(sc->intr_res = bus_alloc_resource(dev, SYS_RES_IRQ,
|
||||
&sc->intr_rid, 0, 0, 1, RF_ACTIVE))) {
|
||||
device_printf(dev,"Can't map interrupt.\n");
|
||||
|
Loading…
Reference in New Issue
Block a user