diff options
Diffstat (limited to 'sys/dev/pccbb')
-rw-r--r-- | sys/dev/pccbb/pccbb.c | 5 | ||||
-rw-r--r-- | sys/dev/pccbb/pccbb_pci.c | 3 | ||||
-rw-r--r-- | sys/dev/pccbb/pccbbvar.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c index f511ebb..7b8fb62 100644 --- a/sys/dev/pccbb/pccbb.c +++ b/sys/dev/pccbb/pccbb.c @@ -1470,6 +1470,9 @@ cbb_read_ivar(device_t brdev, device_t child, int which, uintptr_t *result) struct cbb_softc *sc = device_get_softc(brdev); switch (which) { + case PCIB_IVAR_DOMAIN: + *result = sc->domain; + return (0); case PCIB_IVAR_BUS: *result = sc->secbus; return (0); @@ -1483,6 +1486,8 @@ cbb_write_ivar(device_t brdev, device_t child, int which, uintptr_t value) struct cbb_softc *sc = device_get_softc(brdev); switch (which) { + case PCIB_IVAR_DOMAIN: + return (EINVAL); case PCIB_IVAR_BUS: sc->secbus = value; return (0); diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c index 8ad7e54..73a52b0 100644 --- a/sys/dev/pccbb/pccbb_pci.c +++ b/sys/dev/pccbb/pccbb_pci.c @@ -316,6 +316,7 @@ cbb_pci_attach(device_t brdev) sc->dev = brdev; sc->cbdev = NULL; sc->exca[0].pccarddev = NULL; + sc->domain = pci_get_domain(brdev); sc->secbus = pci_read_config(brdev, PCIR_SECBUS_2, 1); sc->subbus = pci_read_config(brdev, PCIR_SUBBUS_2, 1); sc->pribus = pcib_get_bus(parent); @@ -346,6 +347,8 @@ cbb_pci_attach(device_t brdev) /*Sysctls*/ sctx = device_get_sysctl_ctx(brdev); soid = device_get_sysctl_tree(brdev); + SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "domain", + CTLFLAG_RD, &sc->domain, 0, "Domain number"); SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "pribus", CTLFLAG_RD, &sc->pribus, 0, "Primary bus number"); SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "secbus", diff --git a/sys/dev/pccbb/pccbbvar.h b/sys/dev/pccbb/pccbbvar.h index c8201a2..ef2d82f 100644 --- a/sys/dev/pccbb/pccbbvar.h +++ b/sys/dev/pccbb/pccbbvar.h @@ -62,6 +62,7 @@ struct cbb_softc { void *intrhand; bus_space_tag_t bst; bus_space_handle_t bsh; + uint32_t domain; unsigned int pribus; unsigned int secbus; unsigned int subbus; |