diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-20 18:47:12 +0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-21 19:35:25 +0400 |
commit | d0c2ee99e54c0fd76938236e863ad7d3992f044f (patch) | |
tree | df50947da35dcb6b40ede506f569b1fe85d512d1 /drivers/net/ethernet/sfc/siena_sriov.c | |
parent | a649dfcb48ea60490d9bb06fbeb65baaf59524e3 (diff) | |
download | linux-d0c2ee99e54c0fd76938236e863ad7d3992f044f.tar.xz |
sfc: Introduce and use MCDI_CTL_SDU_LEN_MAX_V1 macro for Siena-specific code
The MCDI version 2 protocol supports larger payloads, but will
not be implemented on Siena.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/siena_sriov.c')
-rw-r--r-- | drivers/net/ethernet/sfc/siena_sriov.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/siena_sriov.c b/drivers/net/ethernet/sfc/siena_sriov.c index 8e46fac65536..c376e90c4c37 100644 --- a/drivers/net/ethernet/sfc/siena_sriov.c +++ b/drivers/net/ethernet/sfc/siena_sriov.c @@ -248,11 +248,11 @@ static int efx_sriov_memcpy(struct efx_nic *efx, struct efx_memcpy_req *req, mb(); /* Finish writing source/reading dest before DMA starts */ used = MC_CMD_MEMCPY_IN_LEN(count); - if (WARN_ON(used > MCDI_CTL_SDU_LEN_MAX)) + if (WARN_ON(used > MCDI_CTL_SDU_LEN_MAX_V1)) return -ENOBUFS; /* Allocate room for the largest request */ - inbuf = kzalloc(MCDI_CTL_SDU_LEN_MAX, GFP_KERNEL); + inbuf = kzalloc(MCDI_CTL_SDU_LEN_MAX_V1, GFP_KERNEL); if (inbuf == NULL) return -ENOMEM; @@ -270,7 +270,8 @@ static int efx_sriov_memcpy(struct efx_nic *efx, struct efx_memcpy_req *req, from_lo = (u32)req->from_addr; from_hi = (u32)(req->from_addr >> 32); } else { - if (WARN_ON(used + req->length > MCDI_CTL_SDU_LEN_MAX)) { + if (WARN_ON(used + req->length > + MCDI_CTL_SDU_LEN_MAX_V1)) { rc = -ENOBUFS; goto out; } |