| 237 | } |
| 238 | |
| 239 | void |
| 240 | sfc_intr_stop(struct sfc_adapter *sa) |
| 241 | { |
| 242 | struct sfc_intr *intr = &sa->intr; |
| 243 | struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(sa->eth_dev); |
| 244 | |
| 245 | sfc_log_init(sa, "entry"); |
| 246 | |
| 247 | if (intr->handler != NULL) { |
| 248 | struct rte_intr_handle *intr_handle; |
| 249 | int rc; |
| 250 | |
| 251 | efx_intr_disable(sa->nic); |
| 252 | |
| 253 | intr_handle = pci_dev->intr_handle; |
| 254 | |
| 255 | rte_intr_vec_list_free(intr_handle); |
| 256 | rte_intr_efd_disable(intr_handle); |
| 257 | |
| 258 | if (rte_intr_disable(intr_handle) != 0) |
| 259 | sfc_err(sa, "cannot disable interrupts"); |
| 260 | |
| 261 | while ((rc = rte_intr_callback_unregister(intr_handle, |
| 262 | intr->handler, (void *)sa)) == -EAGAIN) |
| 263 | ; |
| 264 | if (rc != 1) |
| 265 | sfc_err(sa, |
| 266 | "cannot unregister interrupt handler %d", |
| 267 | rc); |
| 268 | } |
| 269 | |
| 270 | efx_intr_fini(sa->nic); |
| 271 | |
| 272 | sfc_log_init(sa, "done"); |
| 273 | } |
| 274 | |
| 275 | int |
| 276 | sfc_intr_configure(struct sfc_adapter *sa) |
no test coverage detected