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: http://git.lede-project.org./?a=commitdiff_plain;h=0430a26054733de6e7884a4d2872613f9d8b9a66;p=openwrt%2Fstaging%2Fblogic.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;