]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: Initialize 64-bit stats seqcounts
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 1 Aug 2017 19:11:08 +0000 (12:11 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Fri, 13 Oct 2017 02:43:49 +0000 (19:43 -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: 4197aa7bb818 ("ixgbevf: provide 64 bit statistics")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 26785078
(cherry picked from commit 7c3a4626eb65e78ebe208f48ffa21a5002f7f38e)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

index fa6f45e71fa4d910e3214d41aaefaabc3ab881c6..a596842e528e6e6a229d5687d24ba24f788c4392 100644 (file)
@@ -3047,6 +3047,8 @@ int ixgbevf_setup_tx_resources(struct ixgbevf_ring *tx_ring)
        if (!tx_ring->tx_buffer_info)
                goto err;
 
+       u64_stats_init(&tx_ring->syncp);
+
        /* round up to nearest 4K */
        tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc);
        tx_ring->size = ALIGN(tx_ring->size, 4096);
@@ -3105,6 +3107,8 @@ int ixgbevf_setup_rx_resources(struct ixgbevf_ring *rx_ring)
        if (!rx_ring->rx_buffer_info)
                goto err;
 
+       u64_stats_init(&rx_ring->syncp);
+
        /* Round up to nearest 4K */
        rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);
        rx_ring->size = ALIGN(rx_ring->size, 4096);