]> Pileus Git - ~andy/linux/commitdiff
netxen: explicity handle pause autoneg parameter
authorFlavio Leitner <fbl@redhat.com>
Fri, 26 Oct 2012 14:39:53 +0000 (14:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Oct 2012 18:00:14 +0000 (14:00 -0400)
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>
drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c

index 10468e7932dd5ae54947279dda6345e45f16df8e..6bf73e10d4496350b1b60c0c7447385d95f5f9fa 100644 (file)
@@ -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;
@@ -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))