From: Weilin Chang Date: Wed, 14 Jun 2017 16:11:31 +0000 (-0700) Subject: liquidio: fix VF driver off-by-one bug when setting ethtool -C ethX rx-frames X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0430a26054733de6e7884a4d2872613f9d8b9a66;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git liquidio: fix VF driver off-by-one bug when setting ethtool -C ethX rx-frames Signed-off-by: Weilin Chang Signed-off-by: Derek Chickles Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c index 53856af07d46..28ecda3d3404 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c @@ -1808,7 +1808,7 @@ oct_cfg_rx_intrcnt(struct lio *lio, (octeon_read_csr64( oct, CN23XX_VF_SLI_OQ_PKT_INT_LEVELS(q_no)) & (0x3fffff00000000UL)) | - rx_max_coalesced_frames); + (rx_max_coalesced_frames - 1)); /*consider writing to resend bit here*/ } intrmod->rx_frames = rx_max_coalesced_frames;