From cb9327d567be71ae9248d1a9bbc9c274831f5b6a Mon Sep 17 00:00:00 2001 From: Himanshu Madhani Date: Thu, 23 Jan 2014 17:18:33 -0500 Subject: qlcnic: Enhance logic to calculate msix vectors. o Refactored MSI-x vector calculation for All adapters. Decoupled logic in the code which was using same call to request MSI-x vectors in default driver load, as well as during set_channel() operation for TSS/RSS. This refactoring simplifies code for TSS/RSS code path as well as probe path of the driver load for all adapters. Signed-off-by: Himanshu Madhani Signed-off-by: David S. Miller --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c') diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c index 6d0f518d7bc6..acee1a5d80c6 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c @@ -736,6 +736,7 @@ static int qlcnic_set_channels(struct net_device *dev, channel->rx_count); return err; } + adapter->drv_rss_rings = channel->rx_count; } if (channel->tx_count) { @@ -746,10 +747,12 @@ static int qlcnic_set_channels(struct net_device *dev, channel->tx_count); return err; } + adapter->drv_tss_rings = channel->tx_count; } - err = qlcnic_setup_rings(adapter, channel->rx_count, - channel->tx_count); + adapter->flags |= QLCNIC_TSS_RSS; + + err = qlcnic_setup_rings(adapter); netdev_info(dev, "Allocated %d SDS rings and %d Tx rings\n", adapter->drv_sds_rings, adapter->drv_tx_rings); -- cgit v1.2.3-59-g8ed1b