Lines Matching refs:dev
28 __FBSDID("$FreeBSD: releng/11.0/sys/dev/xen/xenpci/xenpci.c 289686 2015-10-21 10:44:07Z royger $");
48 #include <dev/pci/pcireg.h>
49 #include <dev/pci/pcivar.h>
51 #include <dev/xen/xenpci/xenpcivar.h>
99 xenpci_deallocate_resources(device_t dev)
101 struct xenpci_softc *scp = device_get_softc(dev);
104 bus_deactivate_resource(dev, SYS_RES_IRQ,
106 bus_release_resource(dev, SYS_RES_IRQ,
118 xenpci_allocate_resources(device_t dev)
120 struct xenpci_softc *scp = device_get_softc(dev);
122 scp->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ,
133 xenpci_deallocate_resources(dev);
141 xenpci_probe(device_t dev)
144 if (pci_get_devid(dev) != 0x00015853)
147 device_set_desc(dev, "Xen Platform Device");
155 xenpci_attach(device_t dev)
157 struct xenpci_softc *scp = device_get_softc(dev);
160 error = xenpci_allocate_resources(dev);
162 device_printf(dev, "xenpci_allocate_resources failed(%d).\n",
170 error = xenpci_irq_init(dev, scp);
172 device_printf(dev, "xenpci_irq_init failed(%d).\n",
183 xenpci_deallocate_resources(dev);
191 xenpci_detach(device_t dev)
193 struct xenpci_softc *scp = device_get_softc(dev);
194 device_t parent = device_get_parent(dev);
201 if (BUS_TEARDOWN_INTR(parent, dev,
203 device_printf(dev,
212 return (xenpci_deallocate_resources(dev));
216 xenpci_resume(device_t dev)
218 xen_hvm_set_callback(dev);