OSDN Git Service

net: bcmgenet: always enable status blocks
authorDoug Berger <opendmb@gmail.com>
Wed, 18 Mar 2020 00:05:36 +0000 (17:05 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Mar 2020 03:18:13 +0000 (20:18 -0700)
commit9a9ba2a4aaaa4e75a5f118b8ab642a55c34f95cb
treed493412be915c895f09180588a3c5fb122bc5f9e
parent749f6f6843115b424680f1aada3c0dd613ad807c
net: bcmgenet: always enable status blocks

The hardware offloading of the NETIF_F_HW_CSUM and NETIF_F_RXCSUM
features requires the use of Transmit Status Blocks before transmit
frame data and Receive Status Blocks before receive frame data to
carry the checksum information.

Unfortunately, these status blocks are currently only enabled when
the NETIF_F_HW_CSUM feature is enabled. As a result NETIF_F_RXCSUM
will not actually be offloaded to the hardware unless both it and
NETIF_F_HW_CSUM are enabled. Fortunately, that is the default
configuration.

This commit addresses this issue by always enabling the use of
status blocks on both transmit and receive frames. Further, it
replaces the use of a dedicated flag within the driver private
data structure with direct use of the netdev features flags.

Fixes: 810155397890 ("net: bcmgenet: use CHECKSUM_COMPLETE for NETIF_F_RXCSUM")
Signed-off-by: Doug Berger <opendmb@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c
drivers/net/ethernet/broadcom/genet/bcmgenet.h