Commit 6d181688 authored by Rajesh Borundia's avatar Rajesh Borundia Committed by David S. Miller

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: default avatarRajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: default avatarAmit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2cb8d9d1
...@@ -578,8 +578,12 @@ qlcnic_set_pauseparam(struct net_device *netdev, ...@@ -578,8 +578,12 @@ qlcnic_set_pauseparam(struct net_device *netdev,
} }
QLCWR32(adapter, QLCNIC_NIU_GB_PAUSE_CTL, val); QLCWR32(adapter, QLCNIC_NIU_GB_PAUSE_CTL, val);
} else if (adapter->ahw.port_type == QLCNIC_XGBE) { } 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)) if ((port < 0) || (port > QLCNIC_NIU_MAX_XG_PORTS))
return -EIO; return -EIO;
val = QLCRD32(adapter, QLCNIC_NIU_XG_PAUSE_CTL); val = QLCRD32(adapter, QLCNIC_NIU_XG_PAUSE_CTL);
if (port == 0) { if (port == 0) {
if (pause->tx_pause) if (pause->tx_pause)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment