From patchwork Sat Oct 27 00:39:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flavio Leitner X-Patchwork-Id: 194593 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id EE8362C00A3 for ; Sat, 27 Oct 2012 11:40:24 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758730Ab2J0AkX (ORCPT ); Fri, 26 Oct 2012 20:40:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24459 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756284Ab2J0AkW (ORCPT ); Fri, 26 Oct 2012 20:40:22 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9R0eJTI004804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 26 Oct 2012 20:40:19 -0400 Received: from localhost (ovpn-113-100.phx2.redhat.com [10.3.113.100]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q9R0eA03015600; Fri, 26 Oct 2012 20:40:12 -0400 From: Flavio Leitner To: netdev Cc: Sony Chacko , Rajesh Borundia , Ben Hutchings , Flavio Leitner Subject: [PATCH net-next v2] netxen: explicity handle pause autoneg parameter Date: Fri, 26 Oct 2012 22:39:53 -0200 Message-Id: <1351298393-18172-1-git-send-email-fbl@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The hardware doesn't support controlling pause frames autoneg, so report that back correctly to userspace. Signed-off-by: Flavio Leitner --- drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c | 7 +++++++ 1 file changed, 7 insertions(+) I don't have the hardware handy to test this, so I appreciate if someone could do it. Changelog: v2: fixed to not use AUTONEG_DISABLE fixed to return -EINVAL instead of -EOPNOTSUPP diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c index 10468e7..6bf73e1 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c @@ -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))