From: Rajesh Borundia Date: Tue, 13 Jul 2010 20:33:31 +0000 (+0000) Subject: qlcnic: fix pause params setting X-Git-Tag: MMI-PSA29.97-13-9~23092^2~233 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6d181688953465c76c375c665a557c1ff88dcc40;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git qlcnic: fix pause params setting Turning off rx pause param and autoneg param is not supported so return error in that case. Signed-off-by: Rajesh Borundia Signed-off-by: Amit Kumar Salecha Signed-off-by: David S. Miller --- diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c index baf5a52b2a4b..7d6558e33dca 100644 --- a/drivers/net/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/qlcnic/qlcnic_ethtool.c @@ -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)