Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66c562ef authored by Himanshu Madhani's avatar Himanshu Madhani Committed by David S. Miller
Browse files

qlcnic: Validate Tx queue only for 82xx adapters.



o validate Tx queue only in case of adapters which supports
  multi Tx queue.

  This patch is to fix regression introduced in commit
  aa4a1f7d
  "qlcnic: Enable Tx queue changes using ethtool for 82xx Series adapter"

Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0fb88d61
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -665,7 +665,7 @@ static int qlcnic_set_channels(struct net_device *dev,
			return err;
			return err;
	}
	}


	if (channel->tx_count) {
	if (qlcnic_82xx_check(adapter) && channel->tx_count) {
		err = qlcnic_validate_max_tx_rings(adapter, channel->tx_count);
		err = qlcnic_validate_max_tx_rings(adapter, channel->tx_count);
		if (err)
		if (err)
			return err;
			return err;
+1 −7
Original line number Original line Diff line number Diff line
@@ -3651,11 +3651,6 @@ int qlcnic_validate_max_tx_rings(struct qlcnic_adapter *adapter, u32 txq)
	u8 max_hw = QLCNIC_MAX_TX_RINGS;
	u8 max_hw = QLCNIC_MAX_TX_RINGS;
	u32 max_allowed;
	u32 max_allowed;


	if (!qlcnic_82xx_check(adapter)) {
		netdev_err(netdev, "No Multi TX-Q support\n");
		return -EINVAL;
	}

	if (!qlcnic_use_msi_x && !qlcnic_use_msi) {
	if (!qlcnic_use_msi_x && !qlcnic_use_msi) {
		netdev_err(netdev, "No Multi TX-Q support in INT-x mode\n");
		netdev_err(netdev, "No Multi TX-Q support in INT-x mode\n");
		return -EINVAL;
		return -EINVAL;
@@ -3695,8 +3690,7 @@ int qlcnic_validate_max_rss(struct qlcnic_adapter *adapter,
	u8 max_hw = adapter->ahw->max_rx_ques;
	u8 max_hw = adapter->ahw->max_rx_ques;
	u32 max_allowed;
	u32 max_allowed;


	if (qlcnic_82xx_check(adapter) && !qlcnic_use_msi_x &&
	if (!qlcnic_use_msi_x && !qlcnic_use_msi) {
	    !qlcnic_use_msi) {
		netdev_err(netdev, "No RSS support in INT-x mode\n");
		netdev_err(netdev, "No RSS support in INT-x mode\n");
		return -EINVAL;
		return -EINVAL;
	}
	}