From: Nathaniel Case <ncase@xes-inc.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Andy Fleming <afleming@freescale.com>,
netdev@vger.kernel.org, galak@kernel.crashing.org
Subject: Re: [PATCH 2/2] PHYLIB/gianfar: Use phy_ethtool_get_link() for get_link op
Date: Thu, 08 Jun 2006 10:18:59 -0500 [thread overview]
Message-ID: <1149779939.30343.7.camel@localhost.localdomain> (raw)
In-Reply-To: <44883B0E.5090802@garzik.org>
On Thu, 2006-06-08 at 10:58 -0400, Jeff Garzik wrote:
> > +static u32 gfar_get_link(struct net_device *dev)
> > +{
> > + struct gfar_private *priv = netdev_priv(dev);
> > + struct phy_device *phydev = priv->phydev;
> > +
> > + if (NULL == phydev)
> > + return -ENODEV;
>
> NAK, return code obviously wrong
Thanks. I think we can just return 0 for that case. Updated patch
follows.
Signed-off-by: Nate Case <ncase@xes-inc.com>
--- a/drivers/net/gianfar_ethtool.c 2006-06-05 11:27:19.000000000 -0500
+++ b/drivers/net/gianfar_ethtool.c 2006-06-04 19:31:01.000000000 -0500
@@ -228,6 +228,18 @@
buf[i] = gfar_read(&theregs[i]);
}
+static u32 gfar_get_link(struct net_device *dev)
+{
+ struct gfar_private *priv = netdev_priv(dev);
+ struct phy_device *phydev = priv->phydev;
+
+ if (NULL == phydev)
+ return 0;
+
+ return phy_ethtool_get_link(phydev);
+}
+
+
/* Convert microseconds to ethernet clock ticks, which changes
* depending on what speed the controller is running at */
static unsigned int gfar_usecs2ticks(struct gfar_private *priv, unsigned int usecs)
@@ -574,7 +578,7 @@
.get_drvinfo = gfar_gdrvinfo,
.get_regs_len = gfar_reglen,
.get_regs = gfar_get_regs,
- .get_link = ethtool_op_get_link,
+ .get_link = gfar_get_link,
.get_coalesce = gfar_gcoalesce,
.set_coalesce = gfar_scoalesce,
.get_ringparam = gfar_gringparam,
next prev parent reply other threads:[~2006-06-08 15:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-05 23:48 [PATCH 2/2] PHYLIB/gianfar: Use phy_ethtool_get_link() for get_link op Nathaniel Case
2006-06-08 14:58 ` Jeff Garzik
2006-06-08 15:18 ` Nathaniel Case [this message]
2006-06-08 15:33 ` Jeff Garzik
2006-06-08 16:22 ` Nathaniel Case
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=1149779939.30343.7.camel@localhost.localdomain \
--to=ncase@xes-inc.com \
--cc=afleming@freescale.com \
--cc=galak@kernel.crashing.org \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
/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).