]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bnxt_en: Do not free port statistics buffer when device is down.
authorMichael Chan <michael.chan@broadcom.com>
Sun, 16 Dec 2018 23:46:30 +0000 (18:46 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Dec 2018 07:08:53 +0000 (23:08 -0800)
commitfd3ab1c70e0b953f4f772142051d215bffada718
treef750ef61cce81ee46696309de4bd1146c7b7181b
parentb8875ca356f1c0b17ec68be6666269373a62288e
bnxt_en: Do not free port statistics buffer when device is down.

Port statistics which include RDMA counters are useful even when the
netdevice is down.  Do not free the port statistics DMA buffers
when the netdevice is down.  This is keep the snapshot of the port
statistics and counters will just continue counting when the
netdevice goes back up.

Split the bnxt_free_stats() function into 2 functions.  The port
statistics buffers will only be freed when the netdevice is
removed.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c