Lines Matching refs:req
38 efx_mcdi_req_t req; in efx_mcdi_vswitch_alloc() local
53 req.emr_cmd = MC_CMD_VSWITCH_ALLOC; in efx_mcdi_vswitch_alloc()
54 req.emr_in_buf = payload; in efx_mcdi_vswitch_alloc()
55 req.emr_in_length = MC_CMD_VSWITCH_ALLOC_IN_LEN; in efx_mcdi_vswitch_alloc()
56 req.emr_out_buf = payload; in efx_mcdi_vswitch_alloc()
57 req.emr_out_length = MC_CMD_VSWITCH_ALLOC_OUT_LEN; in efx_mcdi_vswitch_alloc()
59 MCDI_IN_SET_DWORD(req, VSWITCH_ALLOC_IN_UPSTREAM_PORT_ID, vport_id); in efx_mcdi_vswitch_alloc()
60 MCDI_IN_SET_DWORD(req, VSWITCH_ALLOC_IN_TYPE, vswitch_type); in efx_mcdi_vswitch_alloc()
61 MCDI_IN_SET_DWORD(req, VSWITCH_ALLOC_IN_NUM_VLAN_TAGS, ntags); in efx_mcdi_vswitch_alloc()
62 MCDI_IN_POPULATE_DWORD_1(req, VSWITCH_ALLOC_IN_FLAGS, in efx_mcdi_vswitch_alloc()
65 efx_mcdi_execute(enp, &req); in efx_mcdi_vswitch_alloc()
67 if (req.emr_rc != 0) { in efx_mcdi_vswitch_alloc()
68 rc = req.emr_rc; in efx_mcdi_vswitch_alloc()
74 if (req.emr_err_code == MC_CMD_ERR_VLAN_LIMIT) { in efx_mcdi_vswitch_alloc()
103 efx_mcdi_req_t req; in efx_mcdi_vswitch_free() local
106 req.emr_cmd = MC_CMD_VSWITCH_FREE; in efx_mcdi_vswitch_free()
107 req.emr_in_buf = payload; in efx_mcdi_vswitch_free()
108 req.emr_in_length = MC_CMD_VSWITCH_FREE_IN_LEN; in efx_mcdi_vswitch_free()
109 req.emr_out_buf = payload; in efx_mcdi_vswitch_free()
110 req.emr_out_length = MC_CMD_VSWITCH_FREE_OUT_LEN; in efx_mcdi_vswitch_free()
112 MCDI_IN_SET_DWORD(req, VSWITCH_FREE_IN_UPSTREAM_PORT_ID, in efx_mcdi_vswitch_free()
114 efx_mcdi_execute(enp, &req); in efx_mcdi_vswitch_free()
116 if (req.emr_rc != 0) { in efx_mcdi_vswitch_free()
117 rc = req.emr_rc; in efx_mcdi_vswitch_free()
138 efx_mcdi_req_t req; in efx_mcdi_vport_alloc() local
149 req.emr_cmd = MC_CMD_VPORT_ALLOC; in efx_mcdi_vport_alloc()
150 req.emr_in_buf = payload; in efx_mcdi_vport_alloc()
151 req.emr_in_length = MC_CMD_VPORT_ALLOC_IN_LEN; in efx_mcdi_vport_alloc()
152 req.emr_out_buf = payload; in efx_mcdi_vport_alloc()
153 req.emr_out_length = MC_CMD_VPORT_ALLOC_OUT_LEN; in efx_mcdi_vport_alloc()
155 MCDI_IN_SET_DWORD(req, VPORT_ALLOC_IN_UPSTREAM_PORT_ID, in efx_mcdi_vport_alloc()
157 MCDI_IN_SET_DWORD(req, VPORT_ALLOC_IN_TYPE, vport_type); in efx_mcdi_vport_alloc()
158 MCDI_IN_SET_DWORD(req, VPORT_ALLOC_IN_NUM_VLAN_TAGS, in efx_mcdi_vport_alloc()
161 MCDI_IN_POPULATE_DWORD_2(req, VPORT_ALLOC_IN_FLAGS, in efx_mcdi_vport_alloc()
166 MCDI_IN_POPULATE_DWORD_1(req, VPORT_ALLOC_IN_VLAN_TAGS, in efx_mcdi_vport_alloc()
169 efx_mcdi_execute(enp, &req); in efx_mcdi_vport_alloc()
171 if (req.emr_rc != 0) { in efx_mcdi_vport_alloc()
172 rc = req.emr_rc; in efx_mcdi_vport_alloc()
176 if (req.emr_out_length_used < MC_CMD_VPORT_ALLOC_OUT_LEN) { in efx_mcdi_vport_alloc()
181 *vport_idp = *MCDI_OUT2(req, uint32_t, VPORT_ALLOC_OUT_VPORT_ID); in efx_mcdi_vport_alloc()
198 efx_mcdi_req_t req; in efx_mcdi_vport_free() local
201 req.emr_cmd = MC_CMD_VPORT_FREE; in efx_mcdi_vport_free()
202 req.emr_in_buf = payload; in efx_mcdi_vport_free()
203 req.emr_in_length = MC_CMD_VPORT_FREE_IN_LEN; in efx_mcdi_vport_free()
204 req.emr_out_buf = payload; in efx_mcdi_vport_free()
205 req.emr_out_length = MC_CMD_VPORT_FREE_OUT_LEN; in efx_mcdi_vport_free()
207 MCDI_IN_SET_DWORD(req, VPORT_FREE_IN_VPORT_ID, vport_id); in efx_mcdi_vport_free()
208 efx_mcdi_execute(enp, &req); in efx_mcdi_vport_free()
210 if (req.emr_rc != 0) { in efx_mcdi_vport_free()
211 rc = req.emr_rc; in efx_mcdi_vport_free()
230 efx_mcdi_req_t req; in efx_mcdi_vport_mac_addr_add() local
233 req.emr_cmd = MC_CMD_VPORT_ADD_MAC_ADDRESS; in efx_mcdi_vport_mac_addr_add()
234 req.emr_in_buf = payload; in efx_mcdi_vport_mac_addr_add()
235 req.emr_in_length = MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_LEN; in efx_mcdi_vport_mac_addr_add()
236 req.emr_out_buf = payload; in efx_mcdi_vport_mac_addr_add()
237 req.emr_out_length = MC_CMD_VPORT_ADD_MAC_ADDRESS_OUT_LEN; in efx_mcdi_vport_mac_addr_add()
239 MCDI_IN_SET_DWORD(req, VPORT_ADD_MAC_ADDRESS_IN_VPORT_ID, vport_id); in efx_mcdi_vport_mac_addr_add()
240 EFX_MAC_ADDR_COPY(MCDI_IN2(req, uint8_t, in efx_mcdi_vport_mac_addr_add()
243 efx_mcdi_execute(enp, &req); in efx_mcdi_vport_mac_addr_add()
245 if (req.emr_rc != 0) { in efx_mcdi_vport_mac_addr_add()
246 rc = req.emr_rc; in efx_mcdi_vport_mac_addr_add()
265 efx_mcdi_req_t req; in efx_mcdi_vport_mac_addr_del() local
268 req.emr_cmd = MC_CMD_VPORT_DEL_MAC_ADDRESS; in efx_mcdi_vport_mac_addr_del()
269 req.emr_in_buf = payload; in efx_mcdi_vport_mac_addr_del()
270 req.emr_in_length = MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_LEN; in efx_mcdi_vport_mac_addr_del()
271 req.emr_out_buf = payload; in efx_mcdi_vport_mac_addr_del()
272 req.emr_out_length = MC_CMD_VPORT_DEL_MAC_ADDRESS_OUT_LEN; in efx_mcdi_vport_mac_addr_del()
274 MCDI_IN_SET_DWORD(req, VPORT_DEL_MAC_ADDRESS_IN_VPORT_ID, vport_id); in efx_mcdi_vport_mac_addr_del()
275 EFX_MAC_ADDR_COPY(MCDI_IN2(req, uint8_t, in efx_mcdi_vport_mac_addr_del()
278 efx_mcdi_execute(enp, &req); in efx_mcdi_vport_mac_addr_del()
280 if (req.emr_rc != 0) { in efx_mcdi_vport_mac_addr_del()
281 rc = req.emr_rc; in efx_mcdi_vport_mac_addr_del()
300 efx_mcdi_req_t req; in efx_mcdi_port_assign() local
304 req.emr_cmd = MC_CMD_EVB_PORT_ASSIGN; in efx_mcdi_port_assign()
305 req.emr_in_buf = payload; in efx_mcdi_port_assign()
306 req.emr_in_length = MC_CMD_EVB_PORT_ASSIGN_IN_LEN; in efx_mcdi_port_assign()
307 req.emr_out_buf = payload; in efx_mcdi_port_assign()
308 req.emr_out_length = MC_CMD_EVB_PORT_ASSIGN_OUT_LEN; in efx_mcdi_port_assign()
310 MCDI_IN_SET_DWORD(req, EVB_PORT_ASSIGN_IN_PORT_ID, vport_id); in efx_mcdi_port_assign()
311 MCDI_IN_POPULATE_DWORD_2(req, EVB_PORT_ASSIGN_IN_FUNCTION, in efx_mcdi_port_assign()
315 efx_mcdi_execute(enp, &req); in efx_mcdi_port_assign()
317 if (req.emr_rc != 0) { in efx_mcdi_port_assign()
318 rc = req.emr_rc; in efx_mcdi_port_assign()
339 efx_mcdi_req_t req; in efx_mcdi_vport_reconfigure() local
343 req.emr_cmd = MC_CMD_VPORT_RECONFIGURE; in efx_mcdi_vport_reconfigure()
344 req.emr_in_buf = payload; in efx_mcdi_vport_reconfigure()
345 req.emr_in_length = MC_CMD_VPORT_RECONFIGURE_IN_LEN; in efx_mcdi_vport_reconfigure()
346 req.emr_out_buf = payload; in efx_mcdi_vport_reconfigure()
347 req.emr_out_length = MC_CMD_VPORT_RECONFIGURE_OUT_LEN; in efx_mcdi_vport_reconfigure()
349 MCDI_IN_SET_DWORD(req, VPORT_RECONFIGURE_IN_VPORT_ID, vport_id); in efx_mcdi_vport_reconfigure()
352 MCDI_IN_POPULATE_DWORD_1(req, VPORT_RECONFIGURE_IN_FLAGS, in efx_mcdi_vport_reconfigure()
355 MCDI_IN_SET_DWORD(req, in efx_mcdi_vport_reconfigure()
357 MCDI_IN_POPULATE_DWORD_1(req, in efx_mcdi_vport_reconfigure()
364 MCDI_IN_POPULATE_DWORD_1(req, VPORT_RECONFIGURE_IN_FLAGS, in efx_mcdi_vport_reconfigure()
366 MCDI_IN_SET_DWORD(req, VPORT_RECONFIGURE_IN_NUM_MACADDRS, 1); in efx_mcdi_vport_reconfigure()
367 EFX_MAC_ADDR_COPY(MCDI_IN2(req, uint8_t, in efx_mcdi_vport_reconfigure()
371 efx_mcdi_execute(enp, &req); in efx_mcdi_vport_reconfigure()
372 if (req.emr_rc != 0) { in efx_mcdi_vport_reconfigure()
373 rc = req.emr_rc; in efx_mcdi_vport_reconfigure()
377 if (req.emr_out_length_used < MC_CMD_VPORT_RECONFIGURE_OUT_LEN) { in efx_mcdi_vport_reconfigure()
382 reset_flag = MCDI_OUT_DWORD_FIELD(req, VPORT_RECONFIGURE_OUT_FLAGS, in efx_mcdi_vport_reconfigure()