diff options
author | Lendacky, Thomas <Thomas.Lendacky@amd.com> | 2014-11-04 23:06:26 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-06 03:50:11 +0100 |
commit | 4780b7cae60cf10af4ae75bc5d6643f41d4c2969 (patch) | |
tree | 1feb576159fdb1cbde6067336b83377f2ec8f93d /drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | |
parent | ipv6: move INET6_MATCH() to include/net/inet6_hashtables.h (diff) | |
download | linux-4780b7cae60cf10af4ae75bc5d6643f41d4c2969.tar.xz linux-4780b7cae60cf10af4ae75bc5d6643f41d4c2969.zip |
amd-xgbe: Move ring allocation to device open
Move the channel and ring tracking structures allocation to device
open. This will allow for future support to vary the number of Tx/Rx
queues without unloading the module.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c')
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c index 49508ec98b72..47022fb00b79 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c @@ -452,9 +452,9 @@ static int xgbe_set_coalesce(struct net_device *netdev, rx_usecs); return -EINVAL; } - if (rx_frames > pdata->channel->rx_ring->rdesc_count) { + if (rx_frames > pdata->rx_desc_count) { netdev_alert(netdev, "rx-frames is limited to %d frames\n", - pdata->channel->rx_ring->rdesc_count); + pdata->rx_desc_count); return -EINVAL; } @@ -462,9 +462,9 @@ static int xgbe_set_coalesce(struct net_device *netdev, tx_frames = ec->tx_max_coalesced_frames; /* Check the bounds of values for Tx */ - if (tx_frames > pdata->channel->tx_ring->rdesc_count) { + if (tx_frames > pdata->tx_desc_count) { netdev_alert(netdev, "tx-frames is limited to %d frames\n", - pdata->channel->tx_ring->rdesc_count); + pdata->tx_desc_count); return -EINVAL; } |