Go to the documentation of this file.
64 struct efx_mcdi_mon_attribute *
attrs;
72 size_t *outlen_actual);
78 size_t *outlen_actual);
88 #define MCDI_PTR2(_buf, _ofst) \
89 (((u8 *)_buf) + _ofst)
90 #define MCDI_SET_DWORD2(_buf, _ofst, _value) \
91 EFX_POPULATE_DWORD_1(*((efx_dword_t *)MCDI_PTR2(_buf, _ofst)), \
93 #define MCDI_DWORD2(_buf, _ofst) \
94 EFX_DWORD_FIELD(*((efx_dword_t *)MCDI_PTR2(_buf, _ofst)), \
96 #define MCDI_QWORD2(_buf, _ofst) \
97 EFX_QWORD_FIELD64(*((efx_qword_t *)MCDI_PTR2(_buf, _ofst)), \
100 #define MCDI_PTR(_buf, _ofst) \
101 MCDI_PTR2(_buf, MC_CMD_ ## _ofst ## _OFST)
102 #define MCDI_ARRAY_PTR(_buf, _field, _type, _index) \
104 MC_CMD_ ## _field ## _OFST + \
105 (_index) * MC_CMD_ ## _type ## _TYPEDEF_LEN)
106 #define MCDI_SET_DWORD(_buf, _ofst, _value) \
107 MCDI_SET_DWORD2(_buf, MC_CMD_ ## _ofst ## _OFST, _value)
108 #define MCDI_DWORD(_buf, _ofst) \
109 MCDI_DWORD2(_buf, MC_CMD_ ## _ofst ## _OFST)
110 #define MCDI_QWORD(_buf, _ofst) \
111 MCDI_QWORD2(_buf, MC_CMD_ ## _ofst ## _OFST)
113 #define MCDI_EVENT_FIELD(_ev, _field) \
114 EFX_QWORD_FIELD(_ev, MCDI_EVENT_ ## _field)
115 #define MCDI_ARRAY_FIELD(_buf, _field1, _type, _index, _field2) \
118 (MCDI_ARRAY_PTR(_buf, _field1, _type, _index) + \
119 (MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _OFST & ~3))), \
120 MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _LBN & 0x1f, \
121 (MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _LBN & 0x1f) + \
122 MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _WIDTH - 1)
126 bool *was_attached_out);
133 size_t *size_out,
size_t *erase_size_out,
134 bool *protected_out);
142 #define EFX_MCDI_NVRAM_LEN_MAX 128
153 const u8 *
mac,
int *id_out);
164 #ifdef CONFIG_SFC_MCDI_MON
165 extern int efx_mcdi_mon_probe(
struct efx_nic *efx);
166 extern void efx_mcdi_mon_remove(
struct efx_nic *efx);
168 static inline int efx_mcdi_mon_probe(
struct efx_nic *efx) {
return 0; }
169 static inline void efx_mcdi_mon_remove(
struct efx_nic *efx) {}