]> 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)
commit799fadbc4d9da0c4bf5164e0e1b9c13ca17eb57f
treef750ef61cce81ee46696309de4bd1146c7b7181b
parente5ffc589dda540129ed8a790819e106ada8db193
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