net: bcmgenet: cleanup ring interrupt masking and unmasking
authorDoug Berger <opendmb@gmail.com>
Wed, 25 Oct 2017 22:04:15 +0000 (15:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Oct 2017 01:14:54 +0000 (10:14 +0900)
commitfbf557d9d1bf93892db70121061c81aaded41607
tree3b3be30beed4377e998341f84572375decd30253
parent7587935cfa119e122215e37e002a481d7374198b
net: bcmgenet: cleanup ring interrupt masking and unmasking

Since the NAPI interrupts are basically ignored when NAPI is
disabled we don't need to mask them within the functions
bcmgenet_disable_tx_napi() and bcmgenet_disable_rx_napi().
So wait until all NAPI instances are disabled and mask all of the
bcmgenet driver interrupts together in bcmgenet_netif_stop().

The interrupts can still be enabled in the functions
bcmgenet_enable_tx_napi() and bcmgenet_enable_rx_napi(), but use
the ring context int_enable() method to keep the functionality
consistent and the code cleaner.

Signed-off-by: Doug Berger <opendmb@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c