| 124 | }; |
| 125 | |
| 126 | static int |
| 127 | idpf_init_mbx(struct idpf_hw *hw) |
| 128 | { |
| 129 | struct idpf_ctlq_info *ctlq; |
| 130 | int ret = 0; |
| 131 | |
| 132 | if (hw->device_id == IDPF_DEV_ID_SRIOV) |
| 133 | ret = idpf_ctlq_init(hw, IDPF_CTLQ_NUM, vf_ctlq_info); |
| 134 | else |
| 135 | ret = idpf_ctlq_init(hw, IDPF_CTLQ_NUM, pf_ctlq_info); |
| 136 | if (ret != 0) |
| 137 | return ret; |
| 138 | |
| 139 | LIST_FOR_EACH_ENTRY(ctlq, &hw->cq_list_head, struct idpf_ctlq_info, cq_list) { |
| 140 | if (ctlq->q_id == IDPF_CTLQ_ID && |
| 141 | ctlq->cq_type == IDPF_CTLQ_TYPE_MAILBOX_TX) |
| 142 | hw->asq = ctlq; |
| 143 | if (ctlq->q_id == IDPF_CTLQ_ID && |
| 144 | ctlq->cq_type == IDPF_CTLQ_TYPE_MAILBOX_RX) |
| 145 | hw->arq = ctlq; |
| 146 | } |
| 147 | |
| 148 | if (hw->asq == NULL || hw->arq == NULL) { |
| 149 | idpf_ctlq_deinit(hw); |
| 150 | ret = -ENOENT; |
| 151 | } |
| 152 | |
| 153 | return ret; |
| 154 | } |
| 155 | |
| 156 | static int |
| 157 | idpf_get_pkt_type(struct idpf_adapter *adapter) |
no test coverage detected