]> git.baikalelectronics.ru Git - kernel.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)
commit027f44557e6ff9ba8e9835e7513f33510181f26b
treef750ef61cce81ee46696309de4bd1146c7b7181b
parenta17a49596f6892e5b76aada31d74a0ac777db98b
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