netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 2/3] tlan: Fix partner capability printout
Date: Thu, 06 Jan 2011 19:44:46 +0000	[thread overview]
Message-ID: <1294343086.11825.31.camel@bwh-desktop> (raw)
In-Reply-To: <4D2619BC.1030606@iki.fi>

On Thu, 2011-01-06 at 21:36 +0200, Sakari Ailus wrote:
> Ben Hutchings wrote:
> > On Thu, 2011-01-06 at 20:50 +0200, Sakari Ailus wrote:
> >> Fix partner capability printout. Add spaces and do not print null.
> >>
> >> Signed-off-by: Sakari Ailus<sakari.ailus@iki.fi>
> >> ---
> >>   drivers/net/tlan.c |    6 +++---
> >>   1 files changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c
> >> index 57380b1..090ce21 100644
> >> --- a/drivers/net/tlan.c
> >> +++ b/drivers/net/tlan.c
> >> @@ -2367,10 +2367,10 @@ tlan_finish_reset(struct net_device *dev)
> >>   					? "" : "0",
> >>   					tlphy_par&  TLAN_PHY_DUPLEX_FULL
> >>   					? "Full" : "half");
> >> -				pr_info("TLAN: Partner capability: ");
> >> -				for (i = 5; i<= 10; i++)
> >> +				pr_info("TLAN: Partner capability:");
> >> +				for (i = 5; i<  10; i++)
> >>   					if (partner&  (1<<i))
> >> -						printk("%s", media[i-5]);
> >> +						printk(" %s", media[i-5]);
> >>   				printk("\n");
> >>   			}
> >>
> >
> > Really you should remove this logging and report the information through
> > the ethtool interface.
> 
> Hi Ben,
> 
> Thanks for the comments.
> 
> The driver supports mii-tool but not ethtool. Do you think it'd be fine 
> to remove these prints with just mii-tool interface support?
> 
> I agree ethtool support would definitely make sense to have in tlan.

Assuming that tlan drives a fairly standard MDIO PHY, you should be able
to implement the PHY-related ethtool operations using
ethtool_op_get_link(), mii_nway_restart(), mii_ethtool_gset() and
mii_ethtool_sset().

Ben.

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


  reply	other threads:[~2011-01-06 19:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06 18:49 [PATCH 0/3] tlan improvements Sakari Ailus
2011-01-06 18:50 ` [PATCH 1/3] tlan: Code cleanup: checkpatch.pl is relatively happy now Sakari Ailus
2011-01-06 18:50   ` [PATCH 2/3] tlan: Fix partner capability printout Sakari Ailus
2011-01-06 18:50     ` [PATCH 3/3] tlan: add suspend/resume support Sakari Ailus
2011-01-06 19:22     ` [PATCH 2/3] tlan: Fix partner capability printout Ben Hutchings
2011-01-06 19:36       ` Sakari Ailus
2011-01-06 19:44         ` Ben Hutchings [this message]
2011-01-06 22:48   ` [PATCH] tlan: Use pr_fmt, pr_<level> and netdev_<level>, remove changelog Joe Perches
2011-01-10  7:39     ` David Miller
2011-01-13  6:19       ` Sakari Ailus
2011-01-21 20:49     ` Sakari Ailus
2011-01-21 21:09       ` Joe Perches
2011-01-24 21:54         ` Sakari Ailus

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=1294343086.11825.31.camel@bwh-desktop \
    --to=bhutchings@solarflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=sakari.ailus@iki.fi \
    /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).