summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/pci/ofw_pcibus.c
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2016-04-11 15:24:59 +0000
committergjb <gjb@FreeBSD.org>2016-04-11 15:24:59 +0000
commite0e3598ce13850597a66fd28d102b36881f7d610 (patch)
treef5194d1ce3fa45b67cf63080fc519fec83abc57a /sys/sparc64/pci/ofw_pcibus.c
parentcbc3bd9845ba5fd58e8132f9565cfbc41433938d (diff)
parent26836fccd261358467b3d92e77ff4695af286de9 (diff)
downloadFreeBSD-src-e0e3598ce13850597a66fd28d102b36881f7d610.zip
FreeBSD-src-e0e3598ce13850597a66fd28d102b36881f7d610.tar.gz
MFH
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/sparc64/pci/ofw_pcibus.c')
-rw-r--r--sys/sparc64/pci/ofw_pcibus.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/sparc64/pci/ofw_pcibus.c b/sys/sparc64/pci/ofw_pcibus.c
index 92b9f76..08ffa5d 100644
--- a/sys/sparc64/pci/ofw_pcibus.c
+++ b/sys/sparc64/pci/ofw_pcibus.c
@@ -65,6 +65,7 @@ static void ofw_pcibus_setup_device(device_t bridge, uint32_t clock,
u_int busno, u_int slot, u_int func);
/* Methods */
+static bus_child_deleted_t ofw_pcibus_child_deleted;
static bus_child_pnpinfo_str_t ofw_pcibus_pnpinfo_str;
static device_attach_t ofw_pcibus_attach;
static device_probe_t ofw_pcibus_probe;
@@ -77,6 +78,7 @@ static device_method_t ofw_pcibus_methods[] = {
DEVMETHOD(device_attach, ofw_pcibus_attach),
/* Bus interface */
+ DEVMETHOD(bus_child_deleted, ofw_pcibus_child_deleted),
DEVMETHOD(bus_child_pnpinfo_str, ofw_pcibus_pnpinfo_str),
/* PCI interface */
@@ -327,6 +329,16 @@ ofw_pcibus_get_devinfo(device_t bus, device_t dev)
return (&dinfo->opd_obdinfo);
}
+static void
+ofw_pcibus_child_deleted(device_t dev, device_t child)
+{
+ struct ofw_pcibus_devinfo *dinfo;
+
+ dinfo = device_get_ivars(dev);
+ ofw_bus_gen_destroy_devinfo(&dinfo->opd_obdinfo);
+ pci_child_deleted(dev, child);
+}
+
static int
ofw_pcibus_pnpinfo_str(device_t dev, device_t child, char *buf,
size_t buflen)
OpenPOWER on IntegriCloud