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:	Mon, 2 Nov 2009 23:01:30 -0700
From:	David Brownell <david-b@...bell.net>
To:	Ben Hutchings <ben@...adent.org.uk>
Cc:	David Miller <davem@...emloft.net>,
	David Brownell <dbrownell@...rs.sourceforge.net>,
	"Greg Kroah-Hartman" <greg@...ah.com>,
	Peter Korsgaard <jacmet@...site.dk>,
	Steve Glendinning <steve.glendinning@...c.com>,
	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] usbnet: Do not implement ethtool get_link() if link state is unknown

On Monday 02 November 2009, Ben Hutchings wrote:
> @@ -854,7 +854,7 @@ void usbnet_set_msglevel (struct net_device *net, u32 level)
>  EXPORT_SYMBOL_GPL(usbnet_set_msglevel);
>  
>  /* drivers may override default ethtool_ops in their bind() routine */
> -static const struct ethtool_ops usbnet_ethtool_ops = {
> +static const struct ethtool_ops usbnet_get_link_ethtool_ops = {
>         .get_settings           = usbnet_get_settings,
>         .set_settings           = usbnet_set_settings,
>         .get_link               = usbnet_get_link,
> @@ -864,6 +864,15 @@ static const struct ethtool_ops usbnet_ethtool_ops = {
>         .set_msglevel           = usbnet_set_msglevel,
>  };
>  
> +static const struct ethtool_ops usbnet_ethtool_ops = {
> +       .get_settings           = usbnet_get_settings,
> +       .set_settings           = usbnet_set_settings,

Surely there's a code that usbnet_get_link() could return
to say "I can't really tell"?

And if there isn't, there should be one.

Having two tables for this is needlessly ugly.

> +       .nway_reset             = usbnet_nway_reset,
> +       .get_drvinfo            = usbnet_get_drvinfo,
> +       .get_msglevel           = usbnet_get_msglevel,
> +       .set_msglevel           = usbnet_set_msglevel,
> +};
> +
>  /*-------------------------------------------------------------------------*/
>  
>  /* work that cannot be done in interrupt context uses keventd.


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