diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2016-05-20 00:03:22 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2016-05-20 00:03:22 +0000 |
| commit | 6f33eaa5f0cecb963ddce2095d365ede3c4c2980 (patch) | |
| tree | a0bf6189545e584e1d2fa49575c2d097554026ab /sys/dev/pccbb | |
| parent | b789292fd8edaae8ed15482f34f3622864437fdd (diff) | |
Notes
Diffstat (limited to 'sys/dev/pccbb')
| -rw-r--r-- | sys/dev/pccbb/pccbb_pci.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c index 3ccec522589c..7bf653a48b91 100644 --- a/sys/dev/pccbb/pccbb_pci.c +++ b/sys/dev/pccbb/pccbb_pci.c @@ -435,6 +435,22 @@ err: return (ENOMEM); } +static int +cbb_pci_detach(device_t brdev) +{ +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + struct cbb_softc *sc = device_get_softc(brdev); +#endif + int error; + + error = cbb_detach(brdev); +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + if (error == 0) + pcib_free_secbus(brdev, &sc->bus); +#endif + return (error); +} + static void cbb_chipinit(struct cbb_softc *sc) { @@ -917,7 +933,7 @@ static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_pci_probe), DEVMETHOD(device_attach, cbb_pci_attach), - DEVMETHOD(device_detach, cbb_detach), + DEVMETHOD(device_detach, cbb_pci_detach), DEVMETHOD(device_shutdown, cbb_pci_shutdown), DEVMETHOD(device_suspend, cbb_pci_suspend), DEVMETHOD(device_resume, cbb_pci_resume), |
