lan743x: Add RSS support

Implement RSS support

Signed-off-by: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Bryan Whitehead
2018-07-23 16:16:33 -04:00
committed by David S. Miller
parent c9cf96bb5f
commit 43e8fe9b84
3 changed files with 171 additions and 0 deletions

View File

@@ -1025,6 +1025,24 @@ return_error:
return ret;
}
static void lan743x_rfe_open(struct lan743x_adapter *adapter)
{
lan743x_csr_write(adapter, RFE_RSS_CFG,
RFE_RSS_CFG_UDP_IPV6_EX_ |
RFE_RSS_CFG_TCP_IPV6_EX_ |
RFE_RSS_CFG_IPV6_EX_ |
RFE_RSS_CFG_UDP_IPV6_ |
RFE_RSS_CFG_TCP_IPV6_ |
RFE_RSS_CFG_IPV6_ |
RFE_RSS_CFG_UDP_IPV4_ |
RFE_RSS_CFG_TCP_IPV4_ |
RFE_RSS_CFG_IPV4_ |
RFE_RSS_CFG_VALID_HASH_BITS_ |
RFE_RSS_CFG_RSS_QUEUE_ENABLE_ |
RFE_RSS_CFG_RSS_HASH_STORE_ |
RFE_RSS_CFG_RSS_ENABLE_);
}
static void lan743x_rfe_update_mac_address(struct lan743x_adapter *adapter)
{
u8 *mac_addr;
@@ -2419,6 +2437,8 @@ static int lan743x_netdev_open(struct net_device *netdev)
if (ret)
goto close_mac;
lan743x_rfe_open(adapter);
for (index = 0; index < LAN743X_USED_RX_CHANNELS; index++) {
ret = lan743x_rx_open(&adapter->rx[index]);
if (ret)