lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1351285842.2584.13.camel@bwh-desktop.uk.solarflarecom.com>
Date:	Fri, 26 Oct 2012 22:10:42 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Flavio Leitner <fbl@...hat.com>
CC:	netdev <netdev@...r.kernel.org>,
	Sony Chacko <sony.chacko@...gic.com>,
	Rajesh Borundia <rajesh.borundia@...gic.com>
Subject: Re: [PATCH net-next] netxen: explicity handle pause autoneg
 parameter

On Fri, 2012-10-26 at 15:17 -0200, Flavio Leitner wrote:
> The hardware doesn't support controlling pause frames autoneg, so
> report that back correctly to userspace.
> 
> Signed-off-by: Flavio Leitner <fbl@...hat.com>
> ---
>  drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> I don't have the hardware handy to test this, so I appreciate
> if someone could do it.
> 
> diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
> index 10468e7..b4b46f9 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 = AUTONEG_DISABLE;

AUTONEG_DISABLE is really meant for use in ethtool_cmd::autoneg, not
ethtool_pauseparam::autoneg.  (Though they are both really booleans so
this works in practice.)

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

Should be -EINVAL; the operation (ETHTOOL_SPAUSEPARAM) is supported but
not these particular arguments.

Ben.

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

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ