From 0f55ea2b7a52b7666cd30c4be9aeb6c28dda4085 Mon Sep 17 00:00:00 2001 From: Mark Spender Date: Thu, 16 Nov 2017 08:04:15 +0000 Subject: [PATCH] net/sfc/base: use MCDIv2 for requests with too long response Use MCDIv2 for requests with a response size too long for MCDIv1. Required for MC_CMD_MAC_STATS to reports the stats without using DMA. Signed-off-by: Mark Spender Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/base/efx_mcdi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/sfc/base/efx_mcdi.c b/drivers/net/sfc/base/efx_mcdi.c index c61b943c12..888a47b213 100644 --- a/drivers/net/sfc/base/efx_mcdi.c +++ b/drivers/net/sfc/base/efx_mcdi.c @@ -290,7 +290,8 @@ efx_mcdi_request_start( */ if ((max_version >= 2) && ((emrp->emr_cmd > MC_CMD_CMD_SPACE_ESCAPE_7) || - (emrp->emr_in_length > MCDI_CTL_SDU_LEN_MAX_V1))) { + (emrp->emr_in_length > MCDI_CTL_SDU_LEN_MAX_V1) || + (emrp->emr_out_length > MCDI_CTL_SDU_LEN_MAX_V1))) { /* Construct MCDI v2 header */ hdr_len = sizeof (hdr); EFX_POPULATE_DWORD_8(hdr[0], -- 2.20.1