mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 11:02:44 +00:00
- Make failure to route a ISA interrupt non fatal. Apparently the
Blade 1500/SX1500 boards have inherited the firmware bug of the AX1105 mainboards to not include an interrupt map entry for the parallel port controller (for the AX1105 the heuristic code for E450s probably erroneously kicks in and guesses an interrupt). - Take advantage of bus_generic_setup_intr(9). - Fix some whitespace bugs.
This commit is contained in:
parent
8518d50a63
commit
3718612847
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173121
@ -204,7 +204,7 @@ isa_setup_children(device_t dev, phandle_t parent)
|
||||
if (strcmp(ofw_isa_pnp_map[i].name, name) == 0)
|
||||
break;
|
||||
if (ofw_isa_pnp_map[i].name == NULL) {
|
||||
printf("isa_setup_children: no PnP map entry for node "
|
||||
device_printf(dev, "no PnP map entry for node "
|
||||
"0x%lx: %s\n", (unsigned long)node, name);
|
||||
free(name, M_OFWPROP);
|
||||
continue;
|
||||
@ -269,9 +269,12 @@ isa_setup_children(device_t dev, phandle_t parent)
|
||||
panic("isa_setup_children: intr too large");
|
||||
rintr = ofw_isa_route_intr(device_get_parent(dev), node,
|
||||
&isa_iinfo, intrs[i]);
|
||||
if (rintr == PCI_INVALID_IRQ)
|
||||
panic("isa_setup_children: could not map ISA "
|
||||
"interrupt %d", intrs[i]);
|
||||
if (rintr == PCI_INVALID_IRQ) {
|
||||
device_printf(dev, "could not map ISA "
|
||||
"interrupt %d for node 0x%lx: %s\n",
|
||||
intrs[i], (unsigned long)node, name);
|
||||
continue;
|
||||
}
|
||||
isa_ino[intrs[i]] = rintr;
|
||||
bus_set_resource(cdev, SYS_RES_IRQ, i, rintr, 1);
|
||||
}
|
||||
@ -298,7 +301,7 @@ isa_setup_children(device_t dev, phandle_t parent)
|
||||
|
||||
struct resource *
|
||||
isa_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
||||
u_long start, u_long end, u_long count, u_int flags)
|
||||
u_long start, u_long end, u_long count, u_int flags)
|
||||
{
|
||||
/*
|
||||
* Consider adding a resource definition.
|
||||
@ -379,16 +382,15 @@ isa_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
||||
|
||||
int
|
||||
isa_release_resource(device_t bus, device_t child, int type, int rid,
|
||||
struct resource *res)
|
||||
struct resource *res)
|
||||
{
|
||||
|
||||
return (bus_generic_rl_release_resource(bus, child, type, rid, res));
|
||||
}
|
||||
|
||||
int
|
||||
isa_setup_intr(device_t dev, device_t child,
|
||||
struct resource *irq, int flags, driver_filter_t *filter,
|
||||
driver_intr_t *intr, void *arg, void **cookiep)
|
||||
isa_setup_intr(device_t dev, device_t child, struct resource *irq, int flags,
|
||||
driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep)
|
||||
{
|
||||
|
||||
/*
|
||||
@ -397,14 +399,14 @@ isa_setup_intr(device_t dev, device_t child,
|
||||
* The interrupt had been routed before it was added to the
|
||||
* resource list of the child.
|
||||
*/
|
||||
return (BUS_SETUP_INTR(device_get_parent(dev), child, irq, flags,
|
||||
filter, intr, arg, cookiep));
|
||||
return (bus_generic_setup_intr(dev, child, irq, flags, filter, intr,
|
||||
arg, cookiep));
|
||||
}
|
||||
|
||||
int
|
||||
isa_teardown_intr(device_t dev, device_t child,
|
||||
struct resource *irq, void *cookie)
|
||||
isa_teardown_intr(device_t dev, device_t child, struct resource *irq,
|
||||
void *cookie)
|
||||
{
|
||||
|
||||
return (BUS_TEARDOWN_INTR(device_get_parent(dev), child, irq, cookie));
|
||||
return (bus_generic_teardown_intr(dev, child, irq, cookie));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user