Skip to content

Commit

Permalink
netxen: explicity handle pause autoneg parameter
Browse files Browse the repository at this point in the history
The hardware doesn't support controlling pause frames autoneg, so
report that back correctly to userspace.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Flavio Leitner authored and David S. Miller committed Oct 31, 2012
1 parent e0683e7 commit 1511102
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,8 @@ netxen_nic_get_pauseparam(struct net_device *dev,
__u32 val;
int port = adapter->physical_port;

pause->autoneg = 0;

if (adapter->ahw.port_type == NETXEN_NIC_GBE) {
if ((port < 0) || (port >= NETXEN_NIU_MAX_GBE_PORTS))
return;
Expand Down Expand Up @@ -532,6 +534,11 @@ netxen_nic_set_pauseparam(struct net_device *dev,
struct netxen_adapter *adapter = netdev_priv(dev);
__u32 val;
int port = adapter->physical_port;

/* not supported */
if (pause->autoneg)
return -EINVAL;

/* read mode */
if (adapter->ahw.port_type == NETXEN_NIC_GBE) {
if ((port < 0) || (port >= NETXEN_NIU_MAX_GBE_PORTS))
Expand Down

0 comments on commit 1511102

Please sign in to comment.