Only use the BIOS-supplied IRQ for the atkbdc device for a child atkbd

device.  Specifically, do not reuse it for a child psm device.

Tested by:	many
This commit is contained in:
John Baldwin 2010-12-21 12:49:37 +00:00
parent c2f86e4192
commit a11df0cbe6

View File

@ -272,14 +272,16 @@ atkbdc_isa_add_child(device_t bus, u_int order, const char *name, int unit)
* list entry so we can use a standard bus_get_resource()
* method.
*/
if (sc->irq == NULL) {
if (resource_int_value(name, unit, "irq", &t) != 0)
t = -1;
} else
t = rman_get_start(sc->irq);
if (t > 0)
resource_list_add(&ivar->resources, SYS_RES_IRQ, ivar->rid,
t, t, 1);
if (order == KBDC_RID_KBD) {
if (sc->irq == NULL) {
if (resource_int_value(name, unit, "irq", &t) != 0)
t = -1;
} else
t = rman_get_start(sc->irq);
if (t > 0)
resource_list_add(&ivar->resources, SYS_RES_IRQ,
ivar->rid, t, t, 1);
}
if (resource_disabled(name, unit))
device_disable(child);