bnxt_en: Refactor bnxt_poll_work().
authorMichael Chan <michael.chan@broadcom.com>
Sun, 14 Oct 2018 11:02:57 +0000 (07:02 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Oct 2018 05:44:33 +0000 (22:44 -0700)
commit3675b92fa70ece4c9263b812fc8cbf3bd606398c
treec9c377c86d20b498639873d3f6adacb2127515eb
parent58590c8d9044dd6ff1757d9e9af63a253cc15101
bnxt_en: Refactor bnxt_poll_work().

Separate the CP ring polling logic in bnxt_poll_work() into 2 separate
functions __bnxt_poll_work() and __bnxt_poll_work_done().  Since the logic
is separated, we need to add tx_pkts and events fields to struct bnxt_napi
to keep track of the events to handle between the 2 functions.  We also
add had_work_done field to struct bnxt_cp_ring_info to indicate whether
some work was performed on the CP ring.

This is needed to better support the 57500 chips.  We need to poll up to
2 separate CP rings before we update or ARM the CP rings on the 57500 chips.

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.h