summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/ebus
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2006-01-26 21:14:32 +0000
committermarius <marius@FreeBSD.org>2006-01-26 21:14:32 +0000
commit679181b556486a65077e78e700f00be0b4dce933 (patch)
treebf90ebae8a2609e4edc52b969ea260818a96fd02 /sys/sparc64/ebus
parent7ba1cf1d5431763a5b0bcdca837d494731aefd4b (diff)
downloadFreeBSD-src-679181b556486a65077e78e700f00be0b4dce933.zip
FreeBSD-src-679181b556486a65077e78e700f00be0b4dce933.tar.gz
- Register the generic implementations for the device shutdown, suspend
and resume methods so these events propagate through the device driver hierarchy. - In dma(4) enable the chaining of the DMA engine interrupt handler for the LANCE devices via a dma_setup_intr(). This was commented out before as I was unsure whether I'd use it but this is probably cleaner than fiddling with the DMA engine interrupt in the LANCE driver directly. - In ebus_setup_dinfo() free 'intrs' instead of 'reg' twice in case setting up a child fails due to routing one of its interrupts fails. [1] Found by: Coverity Prevent [1] MFC after: 3 days
Diffstat (limited to 'sys/sparc64/ebus')
-rw-r--r--sys/sparc64/ebus/ebus.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/sparc64/ebus/ebus.c b/sys/sparc64/ebus/ebus.c
index 6825c7c..29a8200 100644
--- a/sys/sparc64/ebus/ebus.c
+++ b/sys/sparc64/ebus/ebus.c
@@ -116,6 +116,9 @@ static device_method_t ebus_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ebus_probe),
DEVMETHOD(device_attach, ebus_attach),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
/* Bus interface */
DEVMETHOD(bus_print_child, ebus_print_child),
@@ -426,7 +429,7 @@ ebus_setup_dinfo(device_t dev, struct ebus_softc *sc, phandle_t node)
device_printf(dev,
"<%s>: could not map EBus interrupt %d\n",
edi->edi_obdinfo.obd_name, intrs[i]);
- free(reg, M_OFWPROP);
+ free(intrs, M_OFWPROP);
goto fail;
}
resource_list_add(&edi->edi_rl, SYS_RES_IRQ, i,
OpenPOWER on IntegriCloud