]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
qlcnic: fix pause params setting
authorRajesh Borundia <rajesh.borundia@qlogic.com>
Tue, 13 Jul 2010 20:33:31 +0000 (20:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Jul 2010 20:54:15 +0000 (13:54 -0700)
Turning off rx pause param and autoneg param is not supported so
return error in that case.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlcnic/qlcnic_ethtool.c

index baf5a52b2a4bbed8be5a9444248a5e7e462f908e..7d6558e33dca46cd663cd3939da60b3468a72809 100644 (file)
@@ -578,8 +578,12 @@ qlcnic_set_pauseparam(struct net_device *netdev,
                }
                QLCWR32(adapter, QLCNIC_NIU_GB_PAUSE_CTL, val);
        } else if (adapter->ahw.port_type == QLCNIC_XGBE) {
+               if (!pause->rx_pause || pause->autoneg)
+                       return -EOPNOTSUPP;
+
                if ((port < 0) || (port > QLCNIC_NIU_MAX_XG_PORTS))
                        return -EIO;
+
                val = QLCRD32(adapter, QLCNIC_NIU_XG_PAUSE_CTL);
                if (port == 0) {
                        if (pause->tx_pause)