]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Use proper macros to declare and access MCDI arrays
authorBen Hutchings <bhutchings@solarflare.com>
Fri, 14 Sep 2012 16:31:33 +0000 (17:31 +0100)
committerBen Hutchings <bhutchings@solarflare.com>
Wed, 21 Aug 2013 15:35:26 +0000 (16:35 +0100)
commit596b7bcd2f23f7c68e95d3256699be460b103ea2
tree62bf62dbc591718aade11df087dbdb9bc3862b85
parent961fd8631c03839b1cc40cf96a06c867453c491e
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>
drivers/net/ethernet/sfc/mcdi.c
drivers/net/ethernet/sfc/mcdi.h
drivers/net/ethernet/sfc/mcdi_mac.c
drivers/net/ethernet/sfc/mcdi_phy.c
drivers/net/ethernet/sfc/ptp.c
drivers/net/ethernet/sfc/siena_sriov.c