aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/mcdi.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-09-14 17:31:33 +0100
committerBen Hutchings <bhutchings@solarflare.com>2013-08-21 16:35:26 +0100
commitc5bb0e9891ba1f7c871adc09d9ef727e1c0c1c1e (patch)
tree62bf62dbc591718aade11df087dbdb9bc3862b85 /drivers/net/ethernet/sfc/mcdi.h
parentsfc: Introduce and use MCDI_CTL_SDU_LEN_MAX_V1 macro for Siena-specific code (diff)
downloadlinux-dev-c5bb0e9891ba1f7c871adc09d9ef727e1c0c1c1e.tar.xz
linux-dev-c5bb0e9891ba1f7c871adc09d9ef727e1c0c1c1e.zip
sfc: Use proper macros to declare and access MCDI arrays
A few functions are using heap buffers; change them to use stack buffers as we really don't need to resort to the heap for a 252 byte buffer in process context. MC_CMD_MEMCPY is quite weird in that it can use inline data placed in the request buffer after the array of records. Thus there are two variable-length arrays and we can't use the normal accessors for the second. So we have to use _MCDI_PTR() in efx_sriov_memcpy(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/mcdi.h')
-rw-r--r--drivers/net/ethernet/sfc/mcdi.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.h b/drivers/net/ethernet/sfc/mcdi.h
index 969ecc06560a..f8ab64f0efb1 100644
--- a/drivers/net/ethernet/sfc/mcdi.h
+++ b/drivers/net/ethernet/sfc/mcdi.h
@@ -94,9 +94,6 @@ extern void efx_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev);
#define _MCDI_DWORD(_buf, _field) \
((efx_dword_t *)MCDI_PTR(_buf, _field))
-#define MCDI_DWORD2(_buf, _ofst) \
- EFX_DWORD_FIELD(*(efx_dword_t *)((u8 *)(_buf) + (_ofst)), EFX_DWORD_0)
-
#define MCDI_SET_DWORD(_buf, _field, _value) \
EFX_POPULATE_DWORD_1(*_MCDI_DWORD(_buf, _field), EFX_DWORD_0, _value)
#define MCDI_DWORD(_buf, _field) \