Lines Matching refs:dev
30 __FBSDID("$FreeBSD: releng/11.0/sys/dev/snc/if_snc_cbus.c 296137 2016-02-27 03:38:01Z jhibbits $");
57 #include <dev/snc/dp83932var.h>
58 #include <dev/snc/if_sncreg.h>
59 #include <dev/snc/if_sncvar.h>
71 snc_isapnp_reconfig(device_t dev)
73 struct isa_device *idev = DEVTOISA(dev);
81 if (bus_get_resource(dev, SYS_RES_MEMORY, rid, &start, &count))
89 if (bus_get_resource(dev, SYS_RES_IOPORT, rid, &start, &count))
97 if (bus_get_resource(dev, SYS_RES_IRQ, rid, &start, &count))
103 if (bus_get_resource(dev, SYS_RES_DRQ, rid, &start, &count))
113 snc_isa_probe(device_t dev)
115 struct snc_softc *sc = device_get_softc(dev);
122 error = ISA_PNP_PROBE(device_get_parent(dev), dev, snc_ids);
142 if (type == SNEC_TYPE_PNP && isa_get_portsize(dev) == 0) {
148 bus_set_resource(dev, SYS_RES_IOPORT, rid,
150 res = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT,
159 bus_release_resource(dev, SYS_RES_IOPORT, rid, res);
160 snc_isapnp_reconfig(dev);
166 error = snc_alloc_port(dev, 0);
167 error = max(error, snc_alloc_memory(dev, 0));
168 error = max(error, snc_alloc_irq(dev, 0, 0));
170 if (!error && !snc_probe(dev, type))
173 snc_release_resources(dev);
178 snc_isa_attach(device_t dev)
180 struct snc_softc *sc = device_get_softc(dev);
184 snc_alloc_port(dev, 0);
185 snc_alloc_memory(dev, 0);
186 snc_alloc_irq(dev, 0, 0);
191 return snc_attach(dev);