Lines Matching refs:dev
30 __FBSDID("$FreeBSD: releng/11.0/sys/dev/pst/pst-pci.c 274678 2014-11-18 21:58:57Z jhb $");
47 #include <dev/pci/pcivar.h>
48 #include <dev/pci/pcireg.h>
50 #include "dev/pst/pst-iop.h"
53 iop_pci_probe(device_t dev)
56 if (pci_get_devid(dev) == 0x19628086 && pci_get_subvendor(dev) == 0x105a) {
57 device_set_desc(dev, "Promise SuperTrak SX6000 ATA RAID controller");
62 if (pci_get_devid(dev) == 0x19608086 && pci_get_subvendor(dev) == 0x105a) {
63 device_set_desc(dev, "Promise SuperTrak 100 ATA RAID controller");
71 iop_pci_attach(device_t dev)
73 struct iop_softc *sc = device_get_softc(dev);
79 bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
85 sc->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
89 pci_enable_busmaster(dev);
93 sc->dev = dev;
98 return bus_generic_attach(dev);
102 iop_pci_detach(device_t dev)
104 struct iop_softc *sc = device_get_softc(dev);
107 error = bus_generic_detach(dev);
110 bus_teardown_intr(dev, sc->r_irq, sc->handle);
111 bus_release_resource(dev, SYS_RES_IRQ, 0x00, sc->r_irq);
112 bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(0), sc->r_mem);