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>
This commit is contained in:

committed by
David S. Miller

parent
25de4668d0
commit
4780b7cae6
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user