diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-09-14 18:30:10 +0200 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-21 17:35:21 +0200 |
commit | 59cfc479b2c8ba344c8497d5c913b6cba2ce3755 (patch) | |
tree | 77ed4c951751fee608d73ef9d0c081199ba77372 /drivers/net/ethernet/sfc/mcdi.h | |
parent | sfc: Move more Falcon-specific code and definitions into falcon.c (diff) | |
download | linux-59cfc479b2c8ba344c8497d5c913b6cba2ce3755.tar.xz linux-59cfc479b2c8ba344c8497d5c913b6cba2ce3755.zip |
sfc: Introduce and use MCDI_DECLARE_BUF macro
MCDI_DECLARE_BUF declares a variable as an MCDI buffer of the
requested length, adding any necessary padding.
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.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.h b/drivers/net/ethernet/sfc/mcdi.h index 3ba2e5b5a9cc..c881118c10b8 100644 --- a/drivers/net/ethernet/sfc/mcdi.h +++ b/drivers/net/ethernet/sfc/mcdi.h @@ -85,6 +85,9 @@ extern void efx_mcdi_process_event(struct efx_channel *channel, efx_qword_t *event); extern void efx_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev); +#define MCDI_DECLARE_BUF(_name, _len) \ + u8 _name[ALIGN(_len, 4)] + #define MCDI_PTR2(_buf, _ofst) \ (((u8 *)_buf) + _ofst) #define MCDI_SET_DWORD2(_buf, _ofst, _value) \ |