Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
mcdi.h File Reference

Go to the source code of this file.

Data Structures

struct  efx_mcdi_iface
 
struct  efx_mcdi_mon
 

Macros

#define MCDI_PTR2(_buf, _ofst)   (((u8 *)_buf) + _ofst)
 
#define MCDI_SET_DWORD2(_buf, _ofst, _value)
 
#define MCDI_DWORD2(_buf, _ofst)
 
#define MCDI_QWORD2(_buf, _ofst)
 
#define MCDI_PTR(_buf, _ofst)   MCDI_PTR2(_buf, MC_CMD_ ## _ofst ## _OFST)
 
#define MCDI_ARRAY_PTR(_buf, _field, _type, _index)
 
#define MCDI_SET_DWORD(_buf, _ofst, _value)   MCDI_SET_DWORD2(_buf, MC_CMD_ ## _ofst ## _OFST, _value)
 
#define MCDI_DWORD(_buf, _ofst)   MCDI_DWORD2(_buf, MC_CMD_ ## _ofst ## _OFST)
 
#define MCDI_QWORD(_buf, _ofst)   MCDI_QWORD2(_buf, MC_CMD_ ## _ofst ## _OFST)
 
#define MCDI_EVENT_FIELD(_ev, _field)   EFX_QWORD_FIELD(_ev, MCDI_EVENT_ ## _field)
 
#define MCDI_ARRAY_FIELD(_buf, _field1, _type, _index, _field2)
 
#define EFX_MCDI_NVRAM_LEN_MAX   128
 

Enumerations

enum  efx_mcdi_state { MCDI_STATE_QUIESCENT, MCDI_STATE_RUNNING, MCDI_STATE_COMPLETED }
 
enum  efx_mcdi_mode { MCDI_MODE_POLL, MCDI_MODE_EVENTS }
 

Functions

void efx_mcdi_init (struct efx_nic *efx)
 
int efx_mcdi_rpc (struct efx_nic *efx, unsigned cmd, const u8 *inbuf, size_t inlen, u8 *outbuf, size_t outlen, size_t *outlen_actual)
 
void efx_mcdi_rpc_start (struct efx_nic *efx, unsigned cmd, const u8 *inbuf, size_t inlen)
 
int efx_mcdi_rpc_finish (struct efx_nic *efx, unsigned cmd, size_t inlen, u8 *outbuf, size_t outlen, size_t *outlen_actual)
 
int efx_mcdi_poll_reboot (struct efx_nic *efx)
 
void efx_mcdi_mode_poll (struct efx_nic *efx)
 
void efx_mcdi_mode_event (struct efx_nic *efx)
 
void efx_mcdi_process_event (struct efx_channel *channel, efx_qword_t *event)
 
void efx_mcdi_sensor_event (struct efx_nic *efx, efx_qword_t *ev)
 
void efx_mcdi_print_fwver (struct efx_nic *efx, char *buf, size_t len)
 
int efx_mcdi_drv_attach (struct efx_nic *efx, bool driver_operating, bool *was_attached_out)
 
int efx_mcdi_get_board_cfg (struct efx_nic *efx, u8 *mac_address, u16 *fw_subtype_list, u32 *capabilities)
 
int efx_mcdi_log_ctrl (struct efx_nic *efx, bool evq, bool uart, u32 dest_evq)
 
int efx_mcdi_nvram_types (struct efx_nic *efx, u32 *nvram_types_out)
 
int efx_mcdi_nvram_info (struct efx_nic *efx, unsigned int type, size_t *size_out, size_t *erase_size_out, bool *protected_out)
 
int efx_mcdi_nvram_update_start (struct efx_nic *efx, unsigned int type)
 
int efx_mcdi_nvram_read (struct efx_nic *efx, unsigned int type, loff_t offset, u8 *buffer, size_t length)
 
int efx_mcdi_nvram_write (struct efx_nic *efx, unsigned int type, loff_t offset, const u8 *buffer, size_t length)
 
int efx_mcdi_nvram_erase (struct efx_nic *efx, unsigned int type, loff_t offset, size_t length)
 
int efx_mcdi_nvram_update_finish (struct efx_nic *efx, unsigned int type)
 
int efx_mcdi_nvram_test_all (struct efx_nic *efx)
 
int efx_mcdi_handle_assertion (struct efx_nic *efx)
 
void efx_mcdi_set_id_led (struct efx_nic *efx, enum efx_led_mode mode)
 
int efx_mcdi_reset_port (struct efx_nic *efx)
 
int efx_mcdi_reset_mc (struct efx_nic *efx)
 
int efx_mcdi_wol_filter_set_magic (struct efx_nic *efx, const u8 *mac, int *id_out)
 
int efx_mcdi_wol_filter_get_magic (struct efx_nic *efx, int *id_out)
 
int efx_mcdi_wol_filter_remove (struct efx_nic *efx, int id)
 
int efx_mcdi_wol_filter_reset (struct efx_nic *efx)
 
int efx_mcdi_flush_rxqs (struct efx_nic *efx)
 
int efx_mcdi_set_mac (struct efx_nic *efx)
 
int efx_mcdi_mac_stats (struct efx_nic *efx, dma_addr_t dma_addr, u32 dma_len, int enable, int clear)
 
int efx_mcdi_mac_reconfigure (struct efx_nic *efx)
 
bool efx_mcdi_mac_check_fault (struct efx_nic *efx)
 

Macro Definition Documentation

#define EFX_MCDI_NVRAM_LEN_MAX   128

Definition at line 142 of file mcdi.h.

#define MCDI_ARRAY_FIELD (   _buf,
  _field1,
  _type,
  _index,
  _field2 
)
Value:
*((efx_dword_t *) \
(MCDI_ARRAY_PTR(_buf, _field1, _type, _index) + \
(MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _OFST & ~3))), \
MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _LBN & 0x1f, \
(MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _LBN & 0x1f) + \
MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _WIDTH - 1)

Definition at line 115 of file mcdi.h.

#define MCDI_ARRAY_PTR (   _buf,
  _field,
  _type,
  _index 
)
Value:
MCDI_PTR2(_buf, \
MC_CMD_ ## _field ## _OFST + \
(_index) * MC_CMD_ ## _type ## _TYPEDEF_LEN)

Definition at line 102 of file mcdi.h.

#define MCDI_DWORD (   _buf,
  _ofst 
)    MCDI_DWORD2(_buf, MC_CMD_ ## _ofst ## _OFST)

Definition at line 108 of file mcdi.h.

#define MCDI_DWORD2 (   _buf,
  _ofst 
)
Value:
EFX_DWORD_FIELD(*((efx_dword_t *)MCDI_PTR2(_buf, _ofst)), \
EFX_DWORD_0)

Definition at line 93 of file mcdi.h.

#define MCDI_EVENT_FIELD (   _ev,
  _field 
)    EFX_QWORD_FIELD(_ev, MCDI_EVENT_ ## _field)

Definition at line 113 of file mcdi.h.

#define MCDI_PTR (   _buf,
  _ofst 
)    MCDI_PTR2(_buf, MC_CMD_ ## _ofst ## _OFST)

Definition at line 100 of file mcdi.h.

#define MCDI_PTR2 (   _buf,
  _ofst 
)    (((u8 *)_buf) + _ofst)

Definition at line 88 of file mcdi.h.

#define MCDI_QWORD (   _buf,
  _ofst 
)    MCDI_QWORD2(_buf, MC_CMD_ ## _ofst ## _OFST)

Definition at line 110 of file mcdi.h.

#define MCDI_QWORD2 (   _buf,
  _ofst 
)
Value:
EFX_QWORD_0)

Definition at line 96 of file mcdi.h.

#define MCDI_SET_DWORD (   _buf,
  _ofst,
  _value 
)    MCDI_SET_DWORD2(_buf, MC_CMD_ ## _ofst ## _OFST, _value)

Definition at line 106 of file mcdi.h.

#define MCDI_SET_DWORD2 (   _buf,
  _ofst,
  _value 
)
Value:
EFX_DWORD_0, _value)

Definition at line 90 of file mcdi.h.

Enumeration Type Documentation

Enumerator:
MCDI_MODE_POLL 
MCDI_MODE_EVENTS 

Definition at line 29 of file mcdi.h.

enum efx_mcdi_state : No pending MCDI requests. If the caller holds the mcdi_lock then they are able to move to MCDI_STATE_RUNNING : There is an MCDI request pending. Only the thread that moved into this state is allowed to move out of it. : An MCDI request has completed, but the owning thread has not yet consumed the result. For all other threads, equivalent to MCDI_STATE_RUNNING.

Enumerator:
MCDI_STATE_QUIESCENT 
MCDI_STATE_RUNNING 
MCDI_STATE_COMPLETED 

Definition at line 23 of file mcdi.h.

Function Documentation

int efx_mcdi_drv_attach ( struct efx_nic efx,
bool  driver_operating,
bool was_attached_out 
)

Definition at line 630 of file mcdi.c.

int efx_mcdi_flush_rxqs ( struct efx_nic efx)

Definition at line 1191 of file mcdi.c.

int efx_mcdi_get_board_cfg ( struct efx_nic efx,
u8 mac_address,
u16 fw_subtype_list,
u32 capabilities 
)

Definition at line 660 of file mcdi.c.

int efx_mcdi_handle_assertion ( struct efx_nic efx)

Definition at line 1043 of file mcdi.c.

void efx_mcdi_init ( struct efx_nic efx)

Definition at line 53 of file mcdi.c.

int efx_mcdi_log_ctrl ( struct efx_nic efx,
bool  evq,
bool  uart,
u32  dest_evq 
)

Definition at line 715 of file mcdi.c.

bool efx_mcdi_mac_check_fault ( struct efx_nic efx)

Definition at line 56 of file mcdi_mac.c.

int efx_mcdi_mac_reconfigure ( struct efx_nic efx)

Definition at line 116 of file mcdi_mac.c.

int efx_mcdi_mac_stats ( struct efx_nic efx,
dma_addr_t  dma_addr,
u32  dma_len,
int  enable,
int  clear 
)

Definition at line 75 of file mcdi_mac.c.

void efx_mcdi_mode_event ( struct efx_nic efx)

Definition at line 437 of file mcdi.c.

void efx_mcdi_mode_poll ( struct efx_nic efx)

Definition at line 413 of file mcdi.c.

int efx_mcdi_nvram_erase ( struct efx_nic efx,
unsigned int  type,
loff_t  offset,
size_t  length 
)

Definition at line 872 of file mcdi.c.

int efx_mcdi_nvram_info ( struct efx_nic efx,
unsigned int  type,
size_t size_out,
size_t erase_size_out,
bool protected_out 
)

Definition at line 769 of file mcdi.c.

int efx_mcdi_nvram_read ( struct efx_nic efx,
unsigned int  type,
loff_t  offset,
u8 buffer,
size_t  length 
)

Definition at line 821 of file mcdi.c.

int efx_mcdi_nvram_test_all ( struct efx_nic efx)

Definition at line 939 of file mcdi.c.

int efx_mcdi_nvram_types ( struct efx_nic efx,
u32 nvram_types_out 
)

Definition at line 743 of file mcdi.c.

int efx_mcdi_nvram_update_finish ( struct efx_nic efx,
unsigned int  type 
)

Definition at line 896 of file mcdi.c.

int efx_mcdi_nvram_update_start ( struct efx_nic efx,
unsigned int  type 
)

Definition at line 800 of file mcdi.c.

int efx_mcdi_nvram_write ( struct efx_nic efx,
unsigned int  type,
loff_t  offset,
const u8 buffer,
size_t  length 
)

Definition at line 846 of file mcdi.c.

int efx_mcdi_poll_reboot ( struct efx_nic efx)

Definition at line 211 of file mcdi.c.

void efx_mcdi_print_fwver ( struct efx_nic efx,
char buf,
size_t  len 
)

Definition at line 600 of file mcdi.c.

void efx_mcdi_process_event ( struct efx_channel channel,
efx_qword_t event 
)

Definition at line 536 of file mcdi.c.

int efx_mcdi_reset_mc ( struct efx_nic efx)

Definition at line 1085 of file mcdi.c.

int efx_mcdi_reset_port ( struct efx_nic efx)

Definition at line 1076 of file mcdi.c.

int efx_mcdi_rpc ( struct efx_nic efx,
unsigned  cmd,
const u8 inbuf,
size_t  inlen,
u8 outbuf,
size_t  outlen,
size_t outlen_actual 
)

Definition at line 323 of file mcdi.c.

int efx_mcdi_rpc_finish ( struct efx_nic efx,
unsigned  cmd,
size_t  inlen,
u8 outbuf,
size_t  outlen,
size_t outlen_actual 
)

Definition at line 349 of file mcdi.c.

void efx_mcdi_rpc_start ( struct efx_nic efx,
unsigned  cmd,
const u8 inbuf,
size_t  inlen 
)

Definition at line 332 of file mcdi.c.

void efx_mcdi_sensor_event ( struct efx_nic efx,
efx_qword_t ev 
)

Definition at line 59 of file mcdi_mon.c.

void efx_mcdi_set_id_led ( struct efx_nic efx,
enum efx_led_mode  mode 
)

Definition at line 1056 of file mcdi.c.

int efx_mcdi_set_mac ( struct efx_nic efx)

Definition at line 15 of file mcdi_mac.c.

int efx_mcdi_wol_filter_get_magic ( struct efx_nic efx,
int id_out 
)

Definition at line 1145 of file mcdi.c.

int efx_mcdi_wol_filter_remove ( struct efx_nic efx,
int  id 
)

Definition at line 1172 of file mcdi.c.

int efx_mcdi_wol_filter_reset ( struct efx_nic efx)

Definition at line 1226 of file mcdi.c.

int efx_mcdi_wol_filter_set_magic ( struct efx_nic efx,
const u8 mac,
int id_out 
)

Definition at line 1139 of file mcdi.c.