Lines Matching refs:nfsmbsub_sc
178 struct nfsmb_softc *nfsmbsub_sc = device_get_softc(dev); in nfsmbsub_attach() local
182 nfsmbsub_sc->rid = NF2PCI_SMBASE_2; in nfsmbsub_attach()
184 nfsmbsub_sc->res = bus_alloc_resource_any(parent, SYS_RES_IOPORT, in nfsmbsub_attach()
185 &nfsmbsub_sc->rid, RF_ACTIVE); in nfsmbsub_attach()
186 if (nfsmbsub_sc->res == NULL) { in nfsmbsub_attach()
188 nfsmbsub_sc->rid = 0x54; in nfsmbsub_attach()
189 nfsmbsub_sc->res = bus_alloc_resource_any(parent, in nfsmbsub_attach()
190 SYS_RES_IOPORT, &nfsmbsub_sc->rid, RF_ACTIVE); in nfsmbsub_attach()
191 if (nfsmbsub_sc->res == NULL) { in nfsmbsub_attach()
196 mtx_init(&nfsmbsub_sc->lock, device_get_nameunit(dev), "nfsmb", in nfsmbsub_attach()
199 nfsmbsub_sc->smbus = device_add_child(dev, "smbus", DEVICE_UNIT_ANY); in nfsmbsub_attach()
200 if (nfsmbsub_sc->smbus == NULL) { in nfsmbsub_attach()
277 struct nfsmb_softc *nfsmbsub_sc = device_get_softc(dev); in nfsmbsub_detach() local
285 mtx_destroy(&nfsmbsub_sc->lock); in nfsmbsub_detach()
286 if (nfsmbsub_sc->res) { in nfsmbsub_detach()
287 bus_release_resource(parent, SYS_RES_IOPORT, nfsmbsub_sc->rid, in nfsmbsub_detach()
288 nfsmbsub_sc->res); in nfsmbsub_detach()
289 nfsmbsub_sc->res = NULL; in nfsmbsub_detach()