aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cavium/liquidio/liquidio_common.h
diff options
context:
space:
mode:
authorSatanand Burla <satananda.burla@cavium.com>2017-01-31 13:04:42 -0800
committerDavid S. Miller <davem@davemloft.net>2017-02-01 12:25:40 -0500
commitcdb478e5e413864df73096ef4f0e5d518395a92b (patch)
tree4ebd2ed508b7a6aa5a5aba99f35308d0226fc1cf /drivers/net/ethernet/cavium/liquidio/liquidio_common.h
parentnet: ipv6: add NLM_F_APPEND in notifications when applicable (diff)
downloadlinux-dev-cdb478e5e413864df73096ef4f0e5d518395a92b.tar.xz
linux-dev-cdb478e5e413864df73096ef4f0e5d518395a92b.zip
liquidio: fix for iq and droq cnts going negative
Flush the mmio writes before releasing spin locks. if the maintained counts get too high > 2M force writeback of the counts to clear them Signed-off-by: Satanand Burla <satananda.burla@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com> Signed-off-by: Derek Chickles <derek.chickles@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio/liquidio_common.h')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/liquidio_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/liquidio_common.h b/drivers/net/ethernet/cavium/liquidio/liquidio_common.h
index bc0af8af1a0c..294c6f3c6b48 100644
--- a/drivers/net/ethernet/cavium/liquidio/liquidio_common.h
+++ b/drivers/net/ethernet/cavium/liquidio/liquidio_common.h
@@ -99,6 +99,7 @@ enum octeon_tag_type {
#define CVM_DRV_APP_END (CVM_DRV_INVALID_APP - 1)
#define BYTES_PER_DHLEN_UNIT 8
+#define MAX_REG_CNT 2000000U
static inline u32 incr_index(u32 index, u32 count, u32 max)
{