| 220 | }; |
| 221 | |
| 222 | static int |
| 223 | eth_ionic_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, |
| 224 | struct rte_pci_device *pci_dev) |
| 225 | { |
| 226 | struct rte_mem_resource *resource; |
| 227 | struct ionic_bars bars; |
| 228 | unsigned long i; |
| 229 | |
| 230 | IONIC_PRINT(NOTICE, "Initializing device %s %s", |
| 231 | pci_dev->device.name, |
| 232 | rte_eal_process_type() == RTE_PROC_SECONDARY ? |
| 233 | "[SECONDARY]" : ""); |
| 234 | |
| 235 | bars.num_bars = 0; |
| 236 | for (i = 0; i < PCI_MAX_RESOURCE && i < IONIC_BARS_MAX; i++) { |
| 237 | resource = &pci_dev->mem_resource[i]; |
| 238 | if (resource->phys_addr == 0 || resource->len == 0) |
| 239 | continue; |
| 240 | |
| 241 | bars.bar[bars.num_bars].vaddr = resource->addr; |
| 242 | bars.bar[bars.num_bars].bus_addr = resource->phys_addr; |
| 243 | bars.bar[bars.num_bars].len = resource->len; |
| 244 | bars.num_bars++; |
| 245 | } |
| 246 | |
| 247 | return eth_ionic_dev_probe((void *)pci_dev, |
| 248 | &pci_dev->device, |
| 249 | &bars, |
| 250 | &ionic_pci_intf, |
| 251 | pci_dev->id.device_id, |
| 252 | pci_dev->id.vendor_id); |
| 253 | } |
| 254 | |
| 255 | static int |
| 256 | eth_ionic_pci_remove(struct rte_pci_device *pci_dev) |
nothing calls this directly
no test coverage detected