| 1387 | } |
| 1388 | |
| 1389 | int |
| 1390 | ionic_notifyq_handler(struct ionic_lif *lif, int budget) |
| 1391 | { |
| 1392 | struct ionic_dev *idev = &lif->adapter->idev; |
| 1393 | struct ionic_notify_qcq *nqcq = lif->notifyqcq; |
| 1394 | uint32_t work_done; |
| 1395 | |
| 1396 | if (!(nqcq->flags & IONIC_QCQ_F_INITED)) { |
| 1397 | IONIC_PRINT(DEBUG, "Notifyq not yet initialized"); |
| 1398 | return -1; |
| 1399 | } |
| 1400 | |
| 1401 | ionic_intr_mask(idev->intr_ctrl, nqcq->intr.index, |
| 1402 | IONIC_INTR_MASK_SET); |
| 1403 | |
| 1404 | work_done = ionic_qcq_service(&nqcq->qcq, budget, |
| 1405 | ionic_notifyq_cb, lif); |
| 1406 | |
| 1407 | if (lif->state & IONIC_LIF_F_LINK_CHECK_NEEDED) |
| 1408 | ionic_link_status_check(lif); |
| 1409 | |
| 1410 | ionic_intr_credits(idev->intr_ctrl, nqcq->intr.index, |
| 1411 | work_done, IONIC_INTR_CRED_RESET_COALESCE); |
| 1412 | |
| 1413 | ionic_intr_mask(idev->intr_ctrl, nqcq->intr.index, |
| 1414 | IONIC_INTR_MASK_CLEAR); |
| 1415 | |
| 1416 | return 0; |
| 1417 | } |
| 1418 | |
| 1419 | static int |
| 1420 | ionic_lif_adminq_init(struct ionic_lif *lif) |
no test coverage detected