Lines Matching +full:comp +full:- +full:int

1 // SPDX-License-Identifier: GPL-2.0-only
16 int pds_vdpa_init_hw(struct pds_vdpa_device *pdsv) in pds_vdpa_init_hw()
18 struct pds_auxiliary_dev *padev = pdsv->vdpa_aux->padev; in pds_vdpa_init_hw()
19 struct device *dev = &padev->aux_dev.dev; in pds_vdpa_init_hw()
22 .vdpa_init.vdpa_index = pdsv->vdpa_index, in pds_vdpa_init_hw()
23 .vdpa_init.vf_id = cpu_to_le16(pdsv->vdpa_aux->vf_id), in pds_vdpa_init_hw()
25 union pds_core_adminq_comp comp = {}; in pds_vdpa_init_hw() local
26 int err; in pds_vdpa_init_hw()
30 &comp, 0); in pds_vdpa_init_hw()
33 comp.status, ERR_PTR(err)); in pds_vdpa_init_hw()
38 int pds_vdpa_cmd_reset(struct pds_vdpa_device *pdsv) in pds_vdpa_cmd_reset()
40 struct pds_auxiliary_dev *padev = pdsv->vdpa_aux->padev; in pds_vdpa_cmd_reset()
41 struct device *dev = &padev->aux_dev.dev; in pds_vdpa_cmd_reset()
44 .vdpa.vdpa_index = pdsv->vdpa_index, in pds_vdpa_cmd_reset()
45 .vdpa.vf_id = cpu_to_le16(pdsv->vdpa_aux->vf_id), in pds_vdpa_cmd_reset()
47 union pds_core_adminq_comp comp = {}; in pds_vdpa_cmd_reset() local
48 int err; in pds_vdpa_cmd_reset()
50 err = pds_client_adminq_cmd(padev, &cmd, sizeof(cmd.vdpa), &comp, 0); in pds_vdpa_cmd_reset()
53 comp.status, ERR_PTR(err)); in pds_vdpa_cmd_reset()
58 int pds_vdpa_cmd_set_status(struct pds_vdpa_device *pdsv, u8 status) in pds_vdpa_cmd_set_status()
60 struct pds_auxiliary_dev *padev = pdsv->vdpa_aux->padev; in pds_vdpa_cmd_set_status()
61 struct device *dev = &padev->aux_dev.dev; in pds_vdpa_cmd_set_status()
64 .vdpa_status.vdpa_index = pdsv->vdpa_index, in pds_vdpa_cmd_set_status()
65 .vdpa_status.vf_id = cpu_to_le16(pdsv->vdpa_aux->vf_id), in pds_vdpa_cmd_set_status()
68 union pds_core_adminq_comp comp = {}; in pds_vdpa_cmd_set_status() local
69 int err; in pds_vdpa_cmd_set_status()
71 err = pds_client_adminq_cmd(padev, &cmd, sizeof(cmd.vdpa_status), &comp, 0); in pds_vdpa_cmd_set_status()
74 status, comp.status, ERR_PTR(err)); in pds_vdpa_cmd_set_status()
79 int pds_vdpa_cmd_set_mac(struct pds_vdpa_device *pdsv, u8 *mac) in pds_vdpa_cmd_set_mac()
81 struct pds_auxiliary_dev *padev = pdsv->vdpa_aux->padev; in pds_vdpa_cmd_set_mac()
82 struct device *dev = &padev->aux_dev.dev; in pds_vdpa_cmd_set_mac()
85 .vdpa_setattr.vdpa_index = pdsv->vdpa_index, in pds_vdpa_cmd_set_mac()
86 .vdpa_setattr.vf_id = cpu_to_le16(pdsv->vdpa_aux->vf_id), in pds_vdpa_cmd_set_mac()
89 union pds_core_adminq_comp comp = {}; in pds_vdpa_cmd_set_mac() local
90 int err; in pds_vdpa_cmd_set_mac()
94 &comp, 0); in pds_vdpa_cmd_set_mac()
97 mac, comp.status, ERR_PTR(err)); in pds_vdpa_cmd_set_mac()
102 int pds_vdpa_cmd_set_max_vq_pairs(struct pds_vdpa_device *pdsv, u16 max_vqp) in pds_vdpa_cmd_set_max_vq_pairs()
104 struct pds_auxiliary_dev *padev = pdsv->vdpa_aux->padev; in pds_vdpa_cmd_set_max_vq_pairs()
105 struct device *dev = &padev->aux_dev.dev; in pds_vdpa_cmd_set_max_vq_pairs()
108 .vdpa_setattr.vdpa_index = pdsv->vdpa_index, in pds_vdpa_cmd_set_max_vq_pairs()
109 .vdpa_setattr.vf_id = cpu_to_le16(pdsv->vdpa_aux->vf_id), in pds_vdpa_cmd_set_max_vq_pairs()
113 union pds_core_adminq_comp comp = {}; in pds_vdpa_cmd_set_max_vq_pairs() local
114 int err; in pds_vdpa_cmd_set_max_vq_pairs()
117 &comp, 0); in pds_vdpa_cmd_set_max_vq_pairs()
120 max_vqp, comp.status, ERR_PTR(err)); in pds_vdpa_cmd_set_max_vq_pairs()
125 int pds_vdpa_cmd_init_vq(struct pds_vdpa_device *pdsv, u16 qid, u16 invert_idx, in pds_vdpa_cmd_init_vq()
128 struct pds_auxiliary_dev *padev = pdsv->vdpa_aux->padev; in pds_vdpa_cmd_init_vq()
129 struct device *dev = &padev->aux_dev.dev; in pds_vdpa_cmd_init_vq()
132 .vdpa_vq_init.vdpa_index = pdsv->vdpa_index, in pds_vdpa_cmd_init_vq()
133 .vdpa_vq_init.vf_id = cpu_to_le16(pdsv->vdpa_aux->vf_id), in pds_vdpa_cmd_init_vq()
135 .vdpa_vq_init.len = cpu_to_le16(ilog2(vq_info->q_len)), in pds_vdpa_cmd_init_vq()
136 .vdpa_vq_init.desc_addr = cpu_to_le64(vq_info->desc_addr), in pds_vdpa_cmd_init_vq()
137 .vdpa_vq_init.avail_addr = cpu_to_le64(vq_info->avail_addr), in pds_vdpa_cmd_init_vq()
138 .vdpa_vq_init.used_addr = cpu_to_le64(vq_info->used_addr), in pds_vdpa_cmd_init_vq()
140 .vdpa_vq_init.avail_index = cpu_to_le16(vq_info->avail_idx ^ invert_idx), in pds_vdpa_cmd_init_vq()
141 .vdpa_vq_init.used_index = cpu_to_le16(vq_info->used_idx ^ invert_idx), in pds_vdpa_cmd_init_vq()
143 union pds_core_adminq_comp comp = {}; in pds_vdpa_cmd_init_vq() local
144 int err; in pds_vdpa_cmd_init_vq()
147 __func__, qid, ilog2(vq_info->q_len), in pds_vdpa_cmd_init_vq()
148 vq_info->desc_addr, vq_info->avail_addr, vq_info->used_addr); in pds_vdpa_cmd_init_vq()
151 &comp, 0); in pds_vdpa_cmd_init_vq()
154 qid, comp.status, ERR_PTR(err)); in pds_vdpa_cmd_init_vq()
159 int pds_vdpa_cmd_reset_vq(struct pds_vdpa_device *pdsv, u16 qid, u16 invert_idx, in pds_vdpa_cmd_reset_vq()
162 struct pds_auxiliary_dev *padev = pdsv->vdpa_aux->padev; in pds_vdpa_cmd_reset_vq()
163 struct device *dev = &padev->aux_dev.dev; in pds_vdpa_cmd_reset_vq()
166 .vdpa_vq_reset.vdpa_index = pdsv->vdpa_index, in pds_vdpa_cmd_reset_vq()
167 .vdpa_vq_reset.vf_id = cpu_to_le16(pdsv->vdpa_aux->vf_id), in pds_vdpa_cmd_reset_vq()
170 union pds_core_adminq_comp comp = {}; in pds_vdpa_cmd_reset_vq() local
171 int err; in pds_vdpa_cmd_reset_vq()
174 &comp, 0); in pds_vdpa_cmd_reset_vq()
177 qid, comp.status, ERR_PTR(err)); in pds_vdpa_cmd_reset_vq()
181 vq_info->avail_idx = le16_to_cpu(comp.vdpa_vq_reset.avail_index) ^ invert_idx; in pds_vdpa_cmd_reset_vq()
182 vq_info->used_idx = le16_to_cpu(comp.vdpa_vq_reset.used_index) ^ invert_idx; in pds_vdpa_cmd_reset_vq()