]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: Initialize 64-bit statistics TX ring seqcount
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 1 Aug 2017 19:11:07 +0000 (12:11 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:25 +0000 (14:15 -0700)
On 32-bit hosts and with CONFIG_DEBUG_LOCK_ALLOC we should be seeing a
lockdep splat indicating this seqcount is not correctly initialized, fix
that.

Fixes: 980e9b118642 ("i40e: Add support for 64 bit netstats")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 26785018
(cherry picked from commit 7d6d067790289e4f61f59fa60550ca5918aa25bd)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c

index 9b5115b4e77cc83b527c1e3be4f945d71642eb2f..30da2b804c05c5fba0fdcc488ab1b43b6f226418 100644 (file)
@@ -1108,6 +1108,8 @@ int i40e_setup_tx_descriptors(struct i40e_ring *tx_ring)
        if (!tx_ring->tx_bi)
                goto err;
 
+       u64_stats_init(&tx_ring->syncp);
+
        /* round up to nearest 4K */
        tx_ring->size = tx_ring->count * sizeof(struct i40e_tx_desc);
        /* add u32 for head writeback, align after this takes care of