iPXE
Macros | Functions
mlx_icmd.c File Reference
#include "../../include/public/mlx_bail.h"
#include "../../include/public/mlx_icmd.h"
#include "../../include/public/mlx_pci_gw.h"
#include "../../include/public/mlx_utils.h"

Go to the source code of this file.

Macros

#define ICMD_GET_SEMAPHORE_TRIES   2560
 
#define MLX_ICMD_OPCODE_ALIGN   16
 
#define MLX_ICMD_OPCODE_MASK   0xffff
 
#define MLX_ICMD_BUSY_ALIGN   0
 
#define MLX_ICMD_BUSY_MASK   0x1
 
#define MLX_ICMD_BUSY_MAX_ITERATIONS   1024
 
#define MLX_ICMD_STATUS_ALIGN   8
 
#define MLX_ICMD_STATUS_MASK   0xff
 

Functions

 FILE_LICENCE (GPL2_OR_LATER)
 
static mlx_status mlx_icmd_get_semaphore (IN mlx_utils *utils)
 
static mlx_status mlx_icmd_clear_semaphore (IN mlx_utils *utils)
 
static mlx_status mlx_icmd_init (IN mlx_utils *utils)
 
static mlx_status mlx_icmd_set_opcode (IN mlx_utils *utils, IN mlx_uint16 opcode)
 
static mlx_status mlx_icmd_go (IN mlx_utils *utils)
 
static mlx_status mlx_icmd_get_status (IN mlx_utils *utils, OUT mlx_uint32 *out_status)
 
static mlx_status mlx_icmd_write_buffer (IN mlx_utils *utils, IN mlx_void *data, IN mlx_uint32 data_size)
 
static mlx_status mlx_icmd_read_buffer (IN mlx_utils *utils, OUT mlx_void *data, IN mlx_uint32 data_size)
 
mlx_status mlx_icmd_send_command (IN mlx_utils *utils, IN mlx_uint16 opcode, IN OUT mlx_void *data, IN mlx_uint32 write_data_size, IN mlx_uint32 read_data_size)
 

Macro Definition Documentation

◆ ICMD_GET_SEMAPHORE_TRIES

#define ICMD_GET_SEMAPHORE_TRIES   2560

◆ MLX_ICMD_OPCODE_ALIGN

#define MLX_ICMD_OPCODE_ALIGN   16

◆ MLX_ICMD_OPCODE_MASK

#define MLX_ICMD_OPCODE_MASK   0xffff

◆ MLX_ICMD_BUSY_ALIGN

#define MLX_ICMD_BUSY_ALIGN   0

◆ MLX_ICMD_BUSY_MASK

#define MLX_ICMD_BUSY_MASK   0x1

◆ MLX_ICMD_BUSY_MAX_ITERATIONS

#define MLX_ICMD_BUSY_MAX_ITERATIONS   1024

◆ MLX_ICMD_STATUS_ALIGN

#define MLX_ICMD_STATUS_ALIGN   8

◆ MLX_ICMD_STATUS_MASK

#define MLX_ICMD_STATUS_MASK   0xff

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER  )

◆ mlx_icmd_get_semaphore()

static mlx_status mlx_icmd_get_semaphore ( IN mlx_utils utils)
static

Definition at line 30 of file mlx_icmd.c.

33 {
35  mlx_uint32 retries = 0;
36  mlx_uint32 semaphore_id;
38  if (utils == NULL) {
40  goto invalid_param;
41  }
42 
43  status = mlx_utils_rand(utils, &semaphore_id);
44  MLX_CHECK_STATUS(utils, status, rand_err, "failed to get random number");
45 #define ICMD_GET_SEMAPHORE_TRIES 2560
46  for (retries = 0 ; retries < ICMD_GET_SEMAPHORE_TRIES ; retries++) {
49  MLX_CHECK_STATUS(utils, status, read_err, "failed to read icmd semaphore");
50  if (buffer != 0) {
52  continue;
53  }
55  MLX_ICMD_SEMAPHORE_ADDR, semaphore_id);
56  MLX_CHECK_STATUS(utils, status, set_err, "failed to set icmd semaphore");
59  MLX_CHECK_STATUS(utils, status, read_err, "failed to read icmd semaphore");
60  if (semaphore_id == buffer) {
62  utils->icmd.took_semaphore = TRUE;
63  break;
64  }
66  }
67  if (semaphore_id != buffer) {
69  }
70 read_err:
71 set_err:
72 rand_err:
73 invalid_param:
74  return status;
75 }
#define ICMD_GET_SEMAPHORE_TRIES
#define MLX_INVALID_PARAMETER
mlx_status mlx_pci_gw_read(IN mlx_utils *utils, IN mlx_pci_gw_space space, IN mlx_uint32 address, OUT mlx_pci_gw_buffer *buffer)
Definition: mlx_pci_gw.c:258
mlx_status mlx_utils_delay_in_ms(IN mlx_uint32 msecs)
Definition: mlx_utils.c:57
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Definition: netvsc.h:16
uint8_t status
Status.
Definition: ena.h:16
uint32_t mlx_uint32
#define MLX_ICMD_SEMAPHORE_ADDR
Definition: mlx_icmd.h:31
#define MLX_SUCCESS
#define MLX_FAILED
#define TRUE
Definition: tlan.h:46
mlx_status mlx_pci_gw_write(IN mlx_utils *utils, IN mlx_pci_gw_space space, IN mlx_uint32 address, IN mlx_pci_gw_buffer buffer)
Definition: mlx_pci_gw.c:328
mlx_status mlx_utils_rand(IN mlx_utils *utils, OUT mlx_uint32 *rand_num)
Definition: mlx_utils.c:116
int mlx_status
#define MLX_CHECK_STATUS(id, status, label, message)
Definition: mlx_bail.h:37
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
#define PCI_GW_SPACE_SEMAPHORE
Definition: mlx_pci_gw.h:49

References buffer, ICMD_GET_SEMAPHORE_TRIES, MLX_CHECK_STATUS, MLX_FAILED, MLX_ICMD_SEMAPHORE_ADDR, MLX_INVALID_PARAMETER, mlx_pci_gw_read(), mlx_pci_gw_write(), MLX_SUCCESS, mlx_utils_delay_in_ms(), mlx_utils_rand(), NULL, PCI_GW_SPACE_SEMAPHORE, status, and TRUE.

Referenced by mlx_icmd_send_command().

◆ mlx_icmd_clear_semaphore()

static mlx_status mlx_icmd_clear_semaphore ( IN mlx_utils utils)
static

Definition at line 78 of file mlx_icmd.c.

81 {
83 
84  if (utils == NULL) {
86  goto invalid_param;
87  }
88 
89  if (utils->icmd.took_semaphore == FALSE) {
90  goto semaphore_not_taken;
91  }
94  MLX_CHECK_STATUS(utils, status, read_err, "failed to clear icmd semaphore");
95 
96  utils->icmd.took_semaphore = FALSE;
97 read_err:
98 semaphore_not_taken:
99 invalid_param:
100  return status;
101 }
#define MLX_INVALID_PARAMETER
uint8_t status
Status.
Definition: ena.h:16
#define MLX_ICMD_SEMAPHORE_ADDR
Definition: mlx_icmd.h:31
#define MLX_SUCCESS
mlx_status mlx_pci_gw_write(IN mlx_utils *utils, IN mlx_pci_gw_space space, IN mlx_uint32 address, IN mlx_pci_gw_buffer buffer)
Definition: mlx_pci_gw.c:328
#define FALSE
Definition: tlan.h:45
int mlx_status
#define MLX_CHECK_STATUS(id, status, label, message)
Definition: mlx_bail.h:37
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
#define PCI_GW_SPACE_SEMAPHORE
Definition: mlx_pci_gw.h:49

References FALSE, MLX_CHECK_STATUS, MLX_ICMD_SEMAPHORE_ADDR, MLX_INVALID_PARAMETER, mlx_pci_gw_write(), MLX_SUCCESS, NULL, PCI_GW_SPACE_SEMAPHORE, and status.

Referenced by mlx_icmd_send_command().

◆ mlx_icmd_init()

static mlx_status mlx_icmd_init ( IN mlx_utils utils)
static

Definition at line 105 of file mlx_icmd.c.

108 {
110 
111  if (utils == NULL) {
113  goto invalid_param;
114  }
115  if (utils->icmd.icmd_opened == TRUE) {
116  goto already_opened;
117  }
118 
119  utils->icmd.took_semaphore = FALSE;
120 
122  MLX_ICMD_MB_SIZE_ADDR, &utils->icmd.max_cmd_size);
123  MLX_CHECK_STATUS(utils, status, read_err, "failed to read icmd mail box size");
124 
125  utils->icmd.icmd_opened = TRUE;
126 read_err:
127 already_opened:
128 invalid_param:
129  return status;
130 }
#define MLX_INVALID_PARAMETER
mlx_status mlx_pci_gw_read(IN mlx_utils *utils, IN mlx_pci_gw_space space, IN mlx_uint32 address, OUT mlx_pci_gw_buffer *buffer)
Definition: mlx_pci_gw.c:258
uint8_t status
Status.
Definition: ena.h:16
#define MLX_SUCCESS
#define MLX_ICMD_MB_SIZE_ADDR
Definition: mlx_icmd.h:28
#define PCI_GW_SPACE_ALL_ICMD
Definition: mlx_pci_gw.h:48
#define TRUE
Definition: tlan.h:46
#define FALSE
Definition: tlan.h:45
int mlx_status
#define MLX_CHECK_STATUS(id, status, label, message)
Definition: mlx_bail.h:37
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References FALSE, MLX_CHECK_STATUS, MLX_ICMD_MB_SIZE_ADDR, MLX_INVALID_PARAMETER, mlx_pci_gw_read(), MLX_SUCCESS, NULL, PCI_GW_SPACE_ALL_ICMD, status, and TRUE.

Referenced by mlx_icmd_send_command().

◆ mlx_icmd_set_opcode()

static mlx_status mlx_icmd_set_opcode ( IN mlx_utils utils,
IN mlx_uint16  opcode 
)
static

Definition at line 134 of file mlx_icmd.c.

138 {
141 
142  if (utils == NULL) {
144  goto invalid_param;
145  }
146 
149  MLX_CHECK_STATUS(utils, status, read_err, "failed to read icmd ctrl");
150 
151 #define MLX_ICMD_OPCODE_ALIGN 16
152 #define MLX_ICMD_OPCODE_MASK 0xffff
153 
156 
159  MLX_CHECK_STATUS(utils, status, write_err, "failed to write icmd ctrl");
160 write_err:
161 read_err:
162 invalid_param:
163  return status;
164 }
uint8_t opcode
Opcode.
Definition: ena.h:16
#define MLX_INVALID_PARAMETER
mlx_status mlx_pci_gw_read(IN mlx_utils *utils, IN mlx_pci_gw_space space, IN mlx_uint32 address, OUT mlx_pci_gw_buffer *buffer)
Definition: mlx_pci_gw.c:258
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Definition: netvsc.h:16
#define MLX_ICMD_OPCODE_MASK
uint8_t status
Status.
Definition: ena.h:16
uint32_t mlx_uint32
#define MLX_ICMD_CTRL_ADDR
Definition: mlx_icmd.h:29
#define MLX_SUCCESS
#define PCI_GW_SPACE_ALL_ICMD
Definition: mlx_pci_gw.h:48
mlx_status mlx_pci_gw_write(IN mlx_utils *utils, IN mlx_pci_gw_space space, IN mlx_uint32 address, IN mlx_pci_gw_buffer buffer)
Definition: mlx_pci_gw.c:328
int mlx_status
#define MLX_CHECK_STATUS(id, status, label, message)
Definition: mlx_bail.h:37
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
#define MLX_ICMD_OPCODE_ALIGN

References buffer, MLX_CHECK_STATUS, MLX_ICMD_CTRL_ADDR, MLX_ICMD_OPCODE_ALIGN, MLX_ICMD_OPCODE_MASK, MLX_INVALID_PARAMETER, mlx_pci_gw_read(), mlx_pci_gw_write(), MLX_SUCCESS, NULL, opcode, PCI_GW_SPACE_ALL_ICMD, and status.

Referenced by mlx_icmd_send_command().

◆ mlx_icmd_go()

static mlx_status mlx_icmd_go ( IN mlx_utils utils)
static

Definition at line 168 of file mlx_icmd.c.

171 {
174  mlx_uint32 busy;
175  mlx_uint32 wait_iteration = 0;
176 
177  if (utils == NULL) {
179  goto invalid_param;
180  }
181 
184  MLX_CHECK_STATUS(utils, status, read_err, "failed to read icmd ctrl");
185 
186 #define MLX_ICMD_BUSY_ALIGN 0
187 #define MLX_ICMD_BUSY_MASK 0x1
188 
190  if (busy != 0) {
191  status = MLX_FAILED;
192  goto already_busy;
193  }
194 
195  buffer = buffer | (1 << MLX_ICMD_BUSY_ALIGN);
196 
199  MLX_CHECK_STATUS(utils, status, write_err, "failed to write icmd ctrl");
200 
201 #define MLX_ICMD_BUSY_MAX_ITERATIONS 1024
202  do {
203  if (++wait_iteration > MLX_ICMD_BUSY_MAX_ITERATIONS) {
204  status = MLX_FAILED;
205  MLX_DEBUG_ERROR(utils, "ICMD time out");
206  goto busy_timeout;
207  }
208 
212  MLX_CHECK_STATUS(utils, status, read_err, "failed to read icmd ctrl");
214  } while (busy != 0);
215 
216 busy_timeout:
217 write_err:
218 already_busy:
219 read_err:
220 invalid_param:
221  return status;
222 }
#define MLX_INVALID_PARAMETER
mlx_status mlx_pci_gw_read(IN mlx_utils *utils, IN mlx_pci_gw_space space, IN mlx_uint32 address, OUT mlx_pci_gw_buffer *buffer)
Definition: mlx_pci_gw.c:258
mlx_status mlx_utils_delay_in_ms(IN mlx_uint32 msecs)
Definition: mlx_utils.c:57
#define MLX_ICMD_BUSY_ALIGN
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Definition: netvsc.h:16
uint8_t status
Status.
Definition: ena.h:16
uint32_t mlx_uint32
#define MLX_ICMD_BUSY_MAX_ITERATIONS
#define MLX_ICMD_CTRL_ADDR
Definition: mlx_icmd.h:29
#define MLX_SUCCESS
#define PCI_GW_SPACE_ALL_ICMD
Definition: mlx_pci_gw.h:48
#define MLX_ICMD_BUSY_MASK
#define MLX_FAILED
mlx_status mlx_pci_gw_write(IN mlx_utils *utils, IN mlx_pci_gw_space space, IN mlx_uint32 address, IN mlx_pci_gw_buffer buffer)
Definition: mlx_pci_gw.c:328
#define MLX_DEBUG_ERROR(...)
Definition: mlx_logging.h:29
int mlx_status
#define MLX_CHECK_STATUS(id, status, label, message)
Definition: mlx_bail.h:37
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References buffer, MLX_CHECK_STATUS, MLX_DEBUG_ERROR, MLX_FAILED, MLX_ICMD_BUSY_ALIGN, MLX_ICMD_BUSY_MASK, MLX_ICMD_BUSY_MAX_ITERATIONS, MLX_ICMD_CTRL_ADDR, MLX_INVALID_PARAMETER, mlx_pci_gw_read(), mlx_pci_gw_write(), MLX_SUCCESS, mlx_utils_delay_in_ms(), NULL, PCI_GW_SPACE_ALL_ICMD, and status.

Referenced by mlx_icmd_send_command().

◆ mlx_icmd_get_status()

static mlx_status mlx_icmd_get_status ( IN mlx_utils utils,
OUT mlx_uint32 out_status 
)
static

Definition at line 226 of file mlx_icmd.c.

230 {
233 
234  if (utils == NULL || out_status == NULL) {
236  goto invalid_param;
237  }
238 
241  MLX_CHECK_STATUS(utils, status, read_err, "failed to read icmd ctrl");
242 
243 #define MLX_ICMD_STATUS_ALIGN 8
244 #define MLX_ICMD_STATUS_MASK 0xff
245 
247 
248 read_err:
249 invalid_param:
250  return status;
251 }
#define MLX_INVALID_PARAMETER
mlx_status mlx_pci_gw_read(IN mlx_utils *utils, IN mlx_pci_gw_space space, IN mlx_uint32 address, OUT mlx_pci_gw_buffer *buffer)
Definition: mlx_pci_gw.c:258
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Definition: netvsc.h:16
uint8_t status
Status.
Definition: ena.h:16
uint32_t mlx_uint32
#define MLX_ICMD_CTRL_ADDR
Definition: mlx_icmd.h:29
#define MLX_SUCCESS
#define PCI_GW_SPACE_ALL_ICMD
Definition: mlx_pci_gw.h:48
#define MLX_ICMD_STATUS_MASK
int mlx_status
#define MLX_ICMD_STATUS_ALIGN
#define MLX_CHECK_STATUS(id, status, label, message)
Definition: mlx_bail.h:37
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References buffer, MLX_CHECK_STATUS, MLX_ICMD_CTRL_ADDR, MLX_ICMD_STATUS_ALIGN, MLX_ICMD_STATUS_MASK, MLX_INVALID_PARAMETER, mlx_pci_gw_read(), MLX_SUCCESS, NULL, PCI_GW_SPACE_ALL_ICMD, and status.

Referenced by mlx_icmd_send_command().

◆ mlx_icmd_write_buffer()

static mlx_status mlx_icmd_write_buffer ( IN mlx_utils utils,
IN mlx_void data,
IN mlx_uint32  data_size 
)
static

Definition at line 255 of file mlx_icmd.c.

260 {
262  mlx_uint32 data_offset = 0;
263  mlx_size dword_size = sizeof(mlx_uint32);
264 
265  if (utils == NULL || data == NULL) {
267  goto invalid_param;
268  }
269 
270  for (data_offset = 0 ; data_offset*dword_size < data_size ; data_offset++) {
272  MLX_ICMD_MB_ADDR + data_offset*dword_size,
273  ((mlx_uint32*)data)[data_offset]);
274  MLX_CHECK_STATUS(utils, status, write_err, "failed to write icmd MB");
275  }
276 write_err:
277 invalid_param:
278  return status;
279 }
#define MLX_INVALID_PARAMETER
#define MLX_ICMD_MB_ADDR
Definition: mlx_icmd.h:27
uint8_t status
Status.
Definition: ena.h:16
uint32_t mlx_uint32
#define MLX_SUCCESS
#define PCI_GW_SPACE_ALL_ICMD
Definition: mlx_pci_gw.h:48
size_t mlx_size
mlx_status mlx_pci_gw_write(IN mlx_utils *utils, IN mlx_pci_gw_space space, IN mlx_uint32 address, IN mlx_pci_gw_buffer buffer)
Definition: mlx_pci_gw.c:328
int mlx_status
struct arbelprm_port_state_change_st data
Message.
Definition: arbel.h:12
#define MLX_CHECK_STATUS(id, status, label, message)
Definition: mlx_bail.h:37
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References data, MLX_CHECK_STATUS, MLX_ICMD_MB_ADDR, MLX_INVALID_PARAMETER, mlx_pci_gw_write(), MLX_SUCCESS, NULL, PCI_GW_SPACE_ALL_ICMD, and status.

Referenced by mlx_icmd_send_command().

◆ mlx_icmd_read_buffer()

static mlx_status mlx_icmd_read_buffer ( IN mlx_utils utils,
OUT mlx_void data,
IN mlx_uint32  data_size 
)
static

Definition at line 284 of file mlx_icmd.c.

289 {
291  mlx_uint32 data_offset = 0;
292  mlx_size dword_size = sizeof(mlx_uint32);
293 
294  if (utils == NULL || data == NULL) {
296  goto invalid_param;
297  }
298 
299  for (data_offset = 0 ; data_offset*dword_size < data_size ; data_offset++) {
301  MLX_ICMD_MB_ADDR + data_offset*dword_size,
302  (mlx_uint32*)data + data_offset);
303  MLX_CHECK_STATUS(utils, status, read_err, "failed to read icmd MB");
304  }
305 read_err:
306 invalid_param:
307  return status;
308 }
#define MLX_INVALID_PARAMETER
mlx_status mlx_pci_gw_read(IN mlx_utils *utils, IN mlx_pci_gw_space space, IN mlx_uint32 address, OUT mlx_pci_gw_buffer *buffer)
Definition: mlx_pci_gw.c:258
#define MLX_ICMD_MB_ADDR
Definition: mlx_icmd.h:27
uint8_t status
Status.
Definition: ena.h:16
uint32_t mlx_uint32
#define MLX_SUCCESS
#define PCI_GW_SPACE_ALL_ICMD
Definition: mlx_pci_gw.h:48
size_t mlx_size
int mlx_status
struct arbelprm_port_state_change_st data
Message.
Definition: arbel.h:12
#define MLX_CHECK_STATUS(id, status, label, message)
Definition: mlx_bail.h:37
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References data, MLX_CHECK_STATUS, MLX_ICMD_MB_ADDR, MLX_INVALID_PARAMETER, mlx_pci_gw_read(), MLX_SUCCESS, NULL, PCI_GW_SPACE_ALL_ICMD, and status.

Referenced by mlx_icmd_send_command().

◆ mlx_icmd_send_command()

mlx_status mlx_icmd_send_command ( IN mlx_utils utils,
IN mlx_uint16  opcode,
IN OUT mlx_void data,
IN mlx_uint32  write_data_size,
IN mlx_uint32  read_data_size 
)

Definition at line 310 of file mlx_icmd.c.

317 {
319  mlx_uint32 icmd_status = 0;
320 
321  if (utils == NULL || data == NULL) {
323  goto invalid_param;
324  }
325  status = mlx_icmd_init(utils);
326  MLX_CHECK_STATUS(utils, status, open_err, "failed to open icmd");
327 
328  if (write_data_size > utils->icmd.max_cmd_size ||
329  read_data_size > utils->icmd.max_cmd_size) {
331  goto size_err;
332  }
333 
335  MLX_CHECK_STATUS(utils, status, semaphore_err, "failed to get icmd semaphore");
336 
338  MLX_CHECK_STATUS(utils, status, opcode_err, "failed to set icmd opcode");
339 
340  if (write_data_size != 0) {
341  status = mlx_icmd_write_buffer(utils, data, write_data_size);
342  MLX_CHECK_STATUS(utils, status, opcode_err, "failed to write icmd MB");
343  }
344 
345  status = mlx_icmd_go(utils);
346  MLX_CHECK_STATUS(utils, status, go_err, "failed to activate icmd");
347 
348  status = mlx_icmd_get_status(utils, &icmd_status);
349  MLX_CHECK_STATUS(utils, status, get_status_err, "failed to set icmd opcode");
350 
351  if (icmd_status != 0) {
352  MLX_DEBUG_ERROR(utils, "icmd failed with status = %d\n", icmd_status);
353  status = MLX_FAILED;
354  goto icmd_failed;
355  }
356  if (read_data_size != 0) {
357  status = mlx_icmd_read_buffer(utils, data, read_data_size);
358  MLX_CHECK_STATUS(utils, status, read_err, "failed to read icmd MB");
359  }
360 read_err:
361 icmd_failed:
362 get_status_err:
363 go_err:
364 opcode_err:
366 semaphore_err:
367 size_err:
368 open_err:
369 invalid_param:
370  return status;
371 }
uint8_t opcode
Opcode.
Definition: ena.h:16
#define MLX_INVALID_PARAMETER
static mlx_status mlx_icmd_init(IN mlx_utils *utils)
Definition: mlx_icmd.c:105
uint8_t status
Status.
Definition: ena.h:16
uint32_t mlx_uint32
#define MLX_SUCCESS
static mlx_status mlx_icmd_get_status(IN mlx_utils *utils, OUT mlx_uint32 *out_status)
Definition: mlx_icmd.c:226
static mlx_status mlx_icmd_set_opcode(IN mlx_utils *utils, IN mlx_uint16 opcode)
Definition: mlx_icmd.c:134
#define MLX_FAILED
static mlx_status mlx_icmd_go(IN mlx_utils *utils)
Definition: mlx_icmd.c:168
static mlx_status mlx_icmd_read_buffer(IN mlx_utils *utils, OUT mlx_void *data, IN mlx_uint32 data_size)
Definition: mlx_icmd.c:284
static mlx_status mlx_icmd_get_semaphore(IN mlx_utils *utils)
Definition: mlx_icmd.c:30
static mlx_status mlx_icmd_write_buffer(IN mlx_utils *utils, IN mlx_void *data, IN mlx_uint32 data_size)
Definition: mlx_icmd.c:255
#define MLX_DEBUG_ERROR(...)
Definition: mlx_logging.h:29
int mlx_status
struct arbelprm_port_state_change_st data
Message.
Definition: arbel.h:12
static mlx_status mlx_icmd_clear_semaphore(IN mlx_utils *utils)
Definition: mlx_icmd.c:78
#define MLX_CHECK_STATUS(id, status, label, message)
Definition: mlx_bail.h:37
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References data, MLX_CHECK_STATUS, MLX_DEBUG_ERROR, MLX_FAILED, mlx_icmd_clear_semaphore(), mlx_icmd_get_semaphore(), mlx_icmd_get_status(), mlx_icmd_go(), mlx_icmd_init(), mlx_icmd_read_buffer(), mlx_icmd_set_opcode(), mlx_icmd_write_buffer(), MLX_INVALID_PARAMETER, MLX_SUCCESS, NULL, opcode, and status.

Referenced by mlx_reg_access(), mlx_vmac_query_virt_mac(), and mlx_vmac_set_virt_mac().