| 1417 | } |
| 1418 | |
| 1419 | static int |
| 1420 | ionic_lif_adminq_init(struct ionic_lif *lif) |
| 1421 | { |
| 1422 | struct ionic_dev *idev = &lif->adapter->idev; |
| 1423 | struct ionic_admin_qcq *aqcq = lif->adminqcq; |
| 1424 | struct ionic_queue *q = &aqcq->qcq.q; |
| 1425 | struct ionic_q_init_comp comp; |
| 1426 | uint32_t retries = 5; |
| 1427 | int err; |
| 1428 | |
| 1429 | retry_adminq_init: |
| 1430 | ionic_dev_cmd_adminq_init(idev, &aqcq->qcq); |
| 1431 | err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT); |
| 1432 | if (err == -EAGAIN && retries > 0) { |
| 1433 | retries--; |
| 1434 | rte_delay_us_block(IONIC_DEVCMD_RETRY_WAIT_US); |
| 1435 | goto retry_adminq_init; |
| 1436 | } |
| 1437 | if (err) |
| 1438 | return err; |
| 1439 | |
| 1440 | ionic_dev_cmd_comp(idev, &comp); |
| 1441 | |
| 1442 | q->hw_type = comp.hw_type; |
| 1443 | q->hw_index = rte_le_to_cpu_32(comp.hw_index); |
| 1444 | q->db = ionic_db_map(lif, q); |
| 1445 | |
| 1446 | IONIC_PRINT(DEBUG, "adminq->hw_type %d", q->hw_type); |
| 1447 | IONIC_PRINT(DEBUG, "adminq->hw_index %d", q->hw_index); |
| 1448 | IONIC_PRINT(DEBUG, "adminq->db %p", q->db); |
| 1449 | |
| 1450 | aqcq->flags |= IONIC_QCQ_F_INITED; |
| 1451 | |
| 1452 | return 0; |
| 1453 | } |
| 1454 | |
| 1455 | static int |
| 1456 | ionic_lif_notifyq_init(struct ionic_lif *lif) |
no test coverage detected