Lines Matching refs:dev
43 #include <dev/pci/pcivar.h>
44 #include <dev/pci/pcireg.h>
46 #include <dev/sbni/if_sbnireg.h>
47 #include <dev/sbni/if_sbnivar.h>
71 sbni_pci_probe(device_t dev)
75 if (pci_get_vendor(dev) != SBNI_PCI_VENDOR ||
76 pci_get_device(dev) != SBNI_PCI_DEVICE)
79 sc = device_get_softc(dev);
80 if (pci_get_subdevice(dev) == 2) {
85 device_set_desc(dev, "Granch SBNI12/PCI Dual adapter");
87 device_set_desc(dev, "Granch SBNI12/PCI adapter");
90 sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
93 device_printf(dev, "cannot allocate io ports!\n");
114 sbni_pci_attach(device_t dev)
120 sc = device_get_softc(dev);
121 sc->dev = dev;
123 sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid,
127 device_printf(dev, "cannot claim irq!\n");
134 sbni_attach(sc, device_get_unit(dev) * 2, flags);
136 sbni_attach(sc->slave_sc, device_get_unit(dev) * 2 + 1, flags);
139 error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET |
142 device_printf(dev, "bus_setup_intr\n");
159 sbni_pci_detach(device_t dev)
163 sc = device_get_softc(dev);