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]
Date:	Wed, 6 Mar 2013 20:22:52 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Veaceslav Falico <vfalico@...hat.com>
CC:	<netdev@...r.kernel.org>, <wfp5p@...ginia.edu>,
	<jasowang@...hat.com>, <junchangwang@...il.com>,
	<greearb@...delatech.com>, <ivecera@...hat.com>
Subject: Re: [PATCH] 8139too: send NETDEV_CHANGE manually when autoneg is
 disabled

On Wed, 2013-03-06 at 20:06 +0100, Veaceslav Falico wrote:
> When setting autoneg off (with any additional parameters, like
> speed/duplex), 8139too doesn't do an interface reset, and thus doesn't
> notify anyone that its speed/duplex might have changed (bonding and bridge
> will not see the speed changes, per example).
>
> Verify if we've force_media and send notification manually, so that the
> listeners have a chance to see the changes. It's quite ugly, however I
> don't see anything better.

Isn't this really a bug in mii_check_media()?  It shouldn't shortcut the
calls to netif_carrier_{off,on}() just because mii->force_media is set.

Ben.

> Signed-off-by: Veaceslav Falico <vfalico@...hat.com>
> ---
>  drivers/net/ethernet/realtek/8139too.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c
> index 1276ac7..96ee18c 100644
> --- a/drivers/net/ethernet/realtek/8139too.c
> +++ b/drivers/net/ethernet/realtek/8139too.c
> @@ -2393,6 +2393,11 @@ static int rtl8139_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
>  	spin_lock_irq(&tp->lock);
>  	rc = mii_ethtool_sset(&tp->mii, cmd);
>  	spin_unlock_irq(&tp->lock);
> +	/*
> +	 * we don't restart on autoneg off, so notify manually
> +	 */
> +	if (tp->mii.force_media)
> +		call_netdevice_notifiers(NETDEV_CHANGE, dev);
>  	return rc;
>  }
>  

-- 
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