Lines Matching defs:dev

29 __FBSDID("$FreeBSD: stable/11/sys/dev/cxgbe/t4_iov.c 355253 2019-11-30 21:11:17Z np $");
36 #include <dev/pci/pcivar.h>
41 #include <dev/pci/pci_iov.h>
116 static int t4iov_attach_child(device_t dev);
119 t4iov_probe(device_t dev)
124 if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO)
127 d = pci_get_device(dev);
130 device_set_desc(dev, t4iov_pciids[i].desc);
131 device_quiet(dev);
139 t5iov_probe(device_t dev)
144 if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO)
147 d = pci_get_device(dev);
150 device_set_desc(dev, t5iov_pciids[i].desc);
151 device_quiet(dev);
159 t6iov_probe(device_t dev)
164 if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO)
167 d = pci_get_device(dev);
170 device_set_desc(dev, t6iov_pciids[i].desc);
171 device_quiet(dev);
179 t4iov_attach(device_t dev)
183 sc = device_get_softc(dev);
184 sc->sc_dev = dev;
186 sc->sc_main = pci_find_dbsf(pci_get_domain(dev), pci_get_bus(dev),
187 pci_get_slot(dev), 4);
191 return (t4iov_attach_child(dev));
196 t4iov_attach_child(device_t dev)
205 sc = device_get_softc(dev);
214 error = T4_READ_PORT_DEVICE(sc->sc_main, pci_get_function(dev), &pdev);
221 error = pci_iov_attach_name(dev, pf_schema, vf_schema, "%s",
224 device_printf(dev, "Failed to initialize SR-IOV: %d\n", error);
234 t4iov_detach_child(device_t dev)
241 sc = device_get_softc(dev);
246 error = pci_iov_detach(dev);
248 device_printf(dev, "Failed to disable SR-IOV\n");
258 t4iov_detach(device_t dev)
263 sc = device_get_softc(dev);
265 error = t4iov_detach_child(dev);
274 t4iov_iov_init(device_t dev, uint16_t num_vfs, const struct nvlist *config)
282 t4iov_iov_uninit(device_t dev)
287 t4iov_add_vf(device_t dev, uint16_t vfnum, const struct nvlist *config)