Go to the source code of this file.
Data Structures | |
| struct | memref_t |
| struct | mbox_linkcfg_map_t |
| mgmt link config string to CLP string mapping. More... | |
Macros | |
| #define | min(x, y) (((x) < (y)) ? (x) : (y)) |
| #define | CLP_LINKCFG_4X10G "ELX_4x10G" |
| CLP string used in the DMTF_CLP_CMD mailbox command. More... | |
| #define | CLP_LINKCFG_1X40G "ELX_1x40G" |
| #define | CLP_LINKCFG_2X16G "ELX_2x16G" |
| #define | CLP_LINKCFG_4X8G "ELX_4x8G" |
| #define | CLP_LINKCFG_4X1G "ELX_4x1G" |
| #define | CLP_LINKCFG_2X10G "ELX_2x10G" |
| #define | CLP_LINKCFG_2X10G_2X8G "ELX_2x10G_2x8G" |
| #define | ENABLE 1 |
| #define | DISABLE 0 |
| #define | INTERNAL_LOOPBACK 0x1 |
| #define | EXTERNAL_LOOPBACK 0x2 |
| #define | PCI_LOOPBACK 0x3 |
| #define | LOOPBACK_BUF_SIZE 512 |
Functions | |
| int | mbox_common (elxu_device_t *device, mbox_command_t *mbxcmd, uint32_t mbxcmdLength, void *inbuf, uint32_t inbufLength, void *outbuf, uint32_t outbufLength) |
| Send a mailbox command. More... | |
| int | mbox_read_flashrom (elxu_device_t *device, uint32_t opcode, uint32_t optype, uint32_t offset, void *outbuf, uint32_t outbufLength) |
| Issue read flashrom mailbox command. More... | |
| int | mbox_write_flashrom (elxu_device_t *device, uint32_t opcode, uint32_t optype, uint32_t offset, void *outbuf, uint32_t outbufLength) |
| Issue write flashrom mailbox command. More... | |
| int | mbox_read_status (elxu_device_t *device, uint32_t clear_counter) |
| Issue read status mailbox command. More... | |
| int | mbox_read_link_status (elxu_device_t *device, int clof, int clrc) |
| Issue read link status mailbox command. More... | |
| int | mbox_get_dport_stats (elxu_device_t *device) |
| Issue Get dport stats mailbox command Create a GET_DPORT_STAT mailbox command. More... | |
| int | mbox_query_dynamic_dport_status (elxu_device_t *device) |
| int | mbox_set_dynamic_dport (elxu_device_t *device, char *state) |
| int | mbox_diag_loopback_tests (elxu_device_t *device, int loopback_type, int retry_count) |
| Issue set link diag loopback mailbox command. More... | |
| int | mbox_read_rev (elxu_device_t *device) |
| Issue read rev mailbox command. More... | |
| int | mbox_enable_nagle (elxu_device_t *device, int enable) |
| int | mbox_tcp_parameters (elxu_device_t *device, uint32_t request_flags, uint32_t delayedAckValue, uint32_t delayedAckTimerValue) |
| Issue the Set TCP Parameters mbox command. More... | |
| int | mbox_connection_update (elxu_device_t *device, uint32_t request_flags, uint16_t connectionId, uint32_t constrainWindowValue) |
| int | mbox_get_connection_info (elxu_device_t *device, uint32_t connectionHandle) |
| Get connection info. More... | |
| int | mbox_soft_assign_mac (elxu_device_t *device, int *macaddr) |
| Soft assign MAC. More... | |
| int | mbox_manage_fat (elxu_device_t *device, uint32_t fat_operation, uint32_t read_log_offset, void *buffer, uint32_t bufferLength) |
| Issue COMMON_MANAGE_FAT mailbox commands. More... | |
| int | mbox_ext_fat (elxu_device_t *device, uint32_t opcode, void *mbox, uint32_t mboxLength) |
| Issue EFD mailbox command. More... | |
| int | create_vport (elxu_device_t *device_p, uint64_t wwnn, uint64_t wwpn, int targetFlag, int initiatorFlag) |
| int | remove_vport (elxu_device_t *device_p, uint64_t wwnn, uint64_t wwpn, int targetFlag, int initiatorFlag) |
| memref_t * | elx_pt_dma_alloc (elxu_device_t *device, int size) |
| Request a DMA allocation through elx_pt. More... | |
| void | elx_pt_dma_free (memref_t *memref) |
| Free a DMA allocation through elx_pt. More... | |
| int | mbox_fw_reset_pt (elxu_device_t *device, int dd) |
| int | mbox_sli4_init_pt (elxu_device_t *device) |
| int | mbox_set_nv_mac_pt (elxu_device_t *device, int *macaddr) |
| int | mbox_get_serialnum_pt (elxu_device_t *device, char *serial_num, int serial_num_size) |
| int | mbox_set_nv_wwn_pt (elxu_device_t *device, char *wwpn_p, char *wwnn_p) |
| Issue a set non-volatile WWNN/WWPN. More... | |
| void | mbox_get_mac_pt (elxu_device_t *device, uint8_t *mac_addr) |
| void | mbox_get_wwn_pt (int fd, uint8_t *wwnn, uint8_t *wwpn) |
| int | mbox_get_profile_list_pt (elxu_device_t *device, char *result, int result_len) |
| int | mbox_get_active_profile_pt (elxu_device_t *device, char *result, int result_len) |
| int | mbox_set_active_profile_pt (elxu_device_t *device, char *new_profile_id) |
| char * | mbox_get_linkcfg_pt (elxu_device_t *device) |
| Get Link configuration. More... | |
| int | mbox_set_linkcfg_pt (elxu_device_t *device, char *config) |
| Set Link configuration. More... | |
| #define CLP_LINKCFG_1X40G "ELX_1x40G" |
Definition at line 54 of file elxu_mbox.h.
| #define CLP_LINKCFG_2X10G "ELX_2x10G" |
Definition at line 58 of file elxu_mbox.h.
| #define CLP_LINKCFG_2X10G_2X8G "ELX_2x10G_2x8G" |
Definition at line 59 of file elxu_mbox.h.
| #define CLP_LINKCFG_2X16G "ELX_2x16G" |
Definition at line 55 of file elxu_mbox.h.
| #define CLP_LINKCFG_4X10G "ELX_4x10G" |
CLP string used in the DMTF_CLP_CMD mailbox command.
Definition at line 53 of file elxu_mbox.h.
| #define CLP_LINKCFG_4X1G "ELX_4x1G" |
Definition at line 57 of file elxu_mbox.h.
| #define CLP_LINKCFG_4X8G "ELX_4x8G" |
Definition at line 56 of file elxu_mbox.h.
| #define DISABLE 0 |
Definition at line 74 of file elxu_mbox.h.
| #define ENABLE 1 |
Definition at line 73 of file elxu_mbox.h.
| #define EXTERNAL_LOOPBACK 0x2 |
Definition at line 77 of file elxu_mbox.h.
| #define INTERNAL_LOOPBACK 0x1 |
Definition at line 76 of file elxu_mbox.h.
| #define LOOPBACK_BUF_SIZE 512 |
Definition at line 80 of file elxu_mbox.h.
| #define min | ( | x, | |
| y | |||
| ) | (((x) < (y)) ? (x) : (y)) |
Definition at line 39 of file elxu_mbox.h.
| #define PCI_LOOPBACK 0x3 |
Definition at line 78 of file elxu_mbox.h.
| int create_vport | ( | elxu_device_t * | device_p, |
| uint64_t | wwnn, | ||
| uint64_t | wwpn, | ||
| int | targetFlag, | ||
| int | initiatorFlag | ||
| ) |
Definition at line 2319 of file elxu_mbox.c.
| memref_t* elx_pt_dma_alloc | ( | elxu_device_t * | device, |
| int | size | ||
| ) |
Request a DMA allocation through elx_pt.
| device | device structure |
| size | Size of the requested buffer in bytes |
Definition at line 2549 of file elxu_mbox.c.
| void elx_pt_dma_free | ( | memref_t * | memref | ) |
Free a DMA allocation through elx_pt.
| memref | The memref_t to be freed. |
Definition at line 2602 of file elxu_mbox.c.
| int mbox_common | ( | elxu_device_t * | device, |
| mbox_command_t * | mboxcmd, | ||
| uint32_t | mboxcmdLength, | ||
| void * | inbuf, | ||
| uint32_t | inbufLength, | ||
| void * | outbuf, | ||
| uint32_t | outbufLength | ||
| ) |
Send a mailbox command.
Populates a mailbox command passing input and output buffer to the device
For SLI_CONFIG commands with non-embedded command, the command should be put in the inbuf, the mboxcmd will point to just the SLI_CONFIG command + buffer descriptor
| device | device descriptor |
| mboxcmd | pointer to mailbox command data |
| mboxcmdLength | length of mailbox command in bytes |
| inbuf | input buffer |
| inbufLength | length in bytes of input buffer in bytes |
| outbuf | output buffer |
| outbufLength | length in bytes of output buffer in bytes |
| timeout | the mailbox timeout for the command to be carried out |
Definition at line 2418 of file elxu_mbox.c.
| int mbox_connection_update | ( | elxu_device_t * | device, |
| uint32_t | request_flags, | ||
| uint16_t | connectionId, | ||
| uint32_t | constrainWindowValue | ||
| ) |
Definition at line 1719 of file elxu_mbox.c.
| int mbox_diag_loopback_tests | ( | elxu_device_t * | device, |
| int | loopback_type, | ||
| int | retry_count | ||
| ) |
Issue set link diag loopback mailbox command.
Create a SET_LINK_DIAG_LOOPBACK mailbox command
| device | device descriptor |
| mqe | |
| type | loopback test type |
Definition at line 543 of file elxu_mbox.c.
| int mbox_enable_nagle | ( | elxu_device_t * | device, |
| int | enable | ||
| ) |
| int mbox_ext_fat | ( | elxu_device_t * | device, |
| uint32_t | opcode, | ||
| void * | mbox, | ||
| uint32_t | mboxLength | ||
| ) |
Issue EFD mailbox command.
Submits the mailbox command given by 'mbox' for 'mboxLength'. Note, that 'mboxLength' will generally include a response payload
| device | device descriptor |
| opcode | common mailbox opcode |
| mbox | pointer to common mailbox command + payload |
| mboxLength | length of mailbox command + payload |
Definition at line 1604 of file elxu_mbox.c.
| int mbox_fw_reset_pt | ( | elxu_device_t * | device, |
| int | dd | ||
| ) |
Definition at line 2625 of file elxu_mbox.c.
| int mbox_get_active_profile_pt | ( | elxu_device_t * | device, |
| char * | result, | ||
| int | result_len | ||
| ) |
Definition at line 2844 of file elxu_mbox.c.
| int mbox_get_connection_info | ( | elxu_device_t * | device, |
| uint32_t | connectionHandle | ||
| ) |
Get connection info.
| device | device descriptor |
| connection | the handle of the connection for which info is requested |
Only supported on Skyhawk
Definition at line 1776 of file elxu_mbox.c.
| int mbox_get_dport_stats | ( | elxu_device_t * | device | ) |
Issue Get dport stats mailbox command Create a GET_DPORT_STAT mailbox command.
Definition at line 408 of file elxu_mbox.c.
| char* mbox_get_linkcfg_pt | ( | elxu_device_t * | device | ) |
Get Link configuration.
| device | device descriptor |
Definition at line 2086 of file elxu_mbox.c.
| void mbox_get_mac_pt | ( | elxu_device_t * | device, |
| uint8_t * | mac_addr | ||
| ) |
Definition at line 950 of file elxu_mbox.c.
| int mbox_get_profile_list_pt | ( | elxu_device_t * | device, |
| char * | result, | ||
| int | result_len | ||
| ) |
Definition at line 2771 of file elxu_mbox.c.
| int mbox_get_serialnum_pt | ( | elxu_device_t * | device, |
| char * | serial_num, | ||
| int | serial_num_size | ||
| ) |
Definition at line 1053 of file elxu_mbox.c.
| void mbox_get_wwn_pt | ( | int | fd, |
| uint8_t * | wwnn, | ||
| uint8_t * | wwpn | ||
| ) |
Definition at line 1029 of file elxu_mbox.c.
| int mbox_manage_fat | ( | elxu_device_t * | device, |
| uint32_t | fat_operation, | ||
| uint32_t | read_log_offset, | ||
| void * | buffer, | ||
| uint32_t | bufferLength | ||
| ) |
Issue COMMON_MANAGE_FAT mailbox commands.
This function issues Manage FAT mailbox commands. There are four supported operations:
FAT_OPERATION_RETRIEVE read the FAT contents FAT_OPERATION_QUERY return the length of the FAT (may be zero) FAT_OPERATION_CLEAR clear the FAT FAT_OPERATION_TRIGGER trigger a UE that will append to FAT
| device | device descriptor |
| fat_opration | requested FAT operation |
| read_log_offset | read offset (for FAT_OPERATION_RETRIEVE) |
| buffer | read buffer (for FAT_OPERATION_RETRIEVE) |
| bufferLength | read buffer length in bytes (for FAT_OPERATION_RETRIEVE) |
Definition at line 1510 of file elxu_mbox.c.
| int mbox_query_dynamic_dport_status | ( | elxu_device_t * | device | ) |
Definition at line 369 of file elxu_mbox.c.
| int mbox_read_flashrom | ( | elxu_device_t * | device, |
| uint32_t | opcode, | ||
| uint32_t | optype, | ||
| uint32_t | offset, | ||
| void * | outbuf, | ||
| uint32_t | outbufLength | ||
| ) |
Issue read flashrom mailbox command.
Create a SLI_CONFIG Read Flashrom mailbox command
| device | device descriptor |
| opcode | READ/WRITE_FLASHROM opcode value |
| optype | READ/WRITE_FLASHROM optype value |
| optype | READ/WRITE_FLASHROM offset value |
| outbuf | output buffer |
| outbufLength | length in bytes of output buffer |
Definition at line 1339 of file elxu_mbox.c.
| int mbox_read_link_status | ( | elxu_device_t * | device, |
| int | clof, | ||
| int | clrc | ||
| ) |
Issue read link status mailbox command.
Create a READ_LNK_STAT mailbox command
| device | device descriptor |
| clof | clear overflow flag |
| clrc | clear all counters floag |
Definition at line 666 of file elxu_mbox.c.
| int mbox_read_rev | ( | elxu_device_t * | device | ) |
Issue read rev mailbox command.
Create a READ_REV mailbox command
| device | device descriptor |
Definition at line 194 of file elxu_mbox.c.
| int mbox_read_status | ( | elxu_device_t * | device, |
| uint32_t | clear_counter | ||
| ) |
Issue read status mailbox command.
Create a READ_STATUS mailbox command
| device | device descriptor |
| clear_counter | clear counter flag |
Definition at line 763 of file elxu_mbox.c.
| int mbox_set_active_profile_pt | ( | elxu_device_t * | device, |
| char * | new_profile_id | ||
| ) |
Definition at line 2940 of file elxu_mbox.c.
| int mbox_set_dynamic_dport | ( | elxu_device_t * | device, |
| char * | state | ||
| ) |
Definition at line 385 of file elxu_mbox.c.
| int mbox_set_linkcfg_pt | ( | elxu_device_t * | device, |
| char * | config | ||
| ) |
Set Link configuration.
| device | device descriptor |
| config | new link configuration string |
Definition at line 2306 of file elxu_mbox.c.
| int mbox_set_nv_mac_pt | ( | elxu_device_t * | device, |
| int * | macaddr | ||
| ) |
Definition at line 1098 of file elxu_mbox.c.
| int mbox_set_nv_wwn_pt | ( | elxu_device_t * | device, |
| char * | wwpn_p, | ||
| char * | wwnn_p | ||
| ) |
Issue a set non-volatile WWNN/WWPN.
Create a WRITE NVPARAMS mailbox command
| device | device descriptor |
| wwn | world-wide name |
| name | WWNN/WWPN flag to set |
Definition at line 1276 of file elxu_mbox.c.
| int mbox_sli4_init_pt | ( | elxu_device_t * | device | ) |
Definition at line 2738 of file elxu_mbox.c.
| int mbox_soft_assign_mac | ( | elxu_device_t * | device, |
| int * | macaddr | ||
| ) |
Soft assign MAC.
Definition at line 939 of file elxu_mbox.c.
| int mbox_tcp_parameters | ( | elxu_device_t * | device, |
| uint32_t | request_flags, | ||
| uint32_t | ackFrequency, | ||
| uint32_t | delayedAckTimerValue | ||
| ) |
Issue the Set TCP Parameters mbox command.
| device | device descriptor |
| request_flags | flags indicating which values should be updated |
| ackFrequency | ACK frequency |
| delayedAckTimerValue | delayed ACK timer value, in milliseconds |
Definition at line 1663 of file elxu_mbox.c.
| int mbox_write_flashrom | ( | elxu_device_t * | device, |
| uint32_t | opcode, | ||
| uint32_t | optype, | ||
| uint32_t | offset, | ||
| void * | inbuf, | ||
| uint32_t | inbufLength | ||
| ) |
Issue write flashrom mailbox command.
| device | device descriptor |
| opcode | READ/WRITE_FLASHROM opcode value |
| optype | READ/WRITE_FLASHROM optype value |
| optype | READ/WRITE_FLASHROM offset value |
| inbuf | input buffer |
| inbufLength | length in bytes of input buffer |
Definition at line 1421 of file elxu_mbox.c.
| int remove_vport | ( | elxu_device_t * | device_p, |
| uint64_t | wwnn, | ||
| uint64_t | wwpn, | ||
| int | targetFlag, | ||
| int | initiatorFlag | ||
| ) |
Definition at line 2339 of file elxu_mbox.c.