From: David Brownell <david-b@pacbell.net>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: David Miller <davem@davemloft.net>,
David Brownell <dbrownell@users.sourceforge.net>,
"Greg Kroah-Hartman" <greg@kroah.com>,
Peter Korsgaard <jacmet@sunsite.dk>,
Steve Glendinning <steve.glendinning@smsc.com>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] usbnet: Do not implement ethtool get_link() if link state is unknown
Date: Mon, 2 Nov 2009 23:01:30 -0700 [thread overview]
Message-ID: <200911022201.30950.david-b@pacbell.net> (raw)
In-Reply-To: <1257218818.3136.440.camel@localhost>
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.
next prev parent reply other threads:[~2009-11-03 6:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-03 3:26 [PATCH] usbnet: Do not implement ethtool get_link() if link state is unknown Ben Hutchings
2009-11-03 6:01 ` David Brownell [this message]
2009-11-03 9:01 ` David Miller
2009-11-03 9:41 ` David Brownell
2009-11-03 10:04 ` David Miller
2009-11-04 3:20 ` Ben Hutchings
2009-11-04 8:36 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200911022201.30950.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=ben@decadent.org.uk \
--cc=davem@davemloft.net \
--cc=dbrownell@users.sourceforge.net \
--cc=greg@kroah.com \
--cc=jacmet@sunsite.dk \
--cc=netdev@vger.kernel.org \
--cc=steve.glendinning@smsc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).