| 169 | } |
| 170 | |
| 171 | int bnxt_request_int(struct bnxt *bp) |
| 172 | { |
| 173 | struct rte_intr_handle *intr_handle = bp->pdev->intr_handle; |
| 174 | struct bnxt_irq *irq = bp->irq_tbl; |
| 175 | int rc = 0; |
| 176 | |
| 177 | if (!irq) |
| 178 | return 0; |
| 179 | |
| 180 | if (!irq->requested) { |
| 181 | rc = rte_intr_callback_register(intr_handle, |
| 182 | irq->handler, |
| 183 | bp->eth_dev); |
| 184 | if (!rc) |
| 185 | irq->requested = 1; |
| 186 | } |
| 187 | |
| 188 | #ifdef RTE_EXEC_ENV_FREEBSD |
| 189 | /** |
| 190 | * In FreeBSD OS, nic_uio does not support interrupts and |
| 191 | * interrupt register callback will fail. |
| 192 | */ |
| 193 | rc = 0; |
| 194 | #endif |
| 195 | |
| 196 | return rc; |
| 197 | } |
no test coverage detected