From: Nathaniel Case <ncase@xes-inc.com>
To: Andy Fleming <afleming@freescale.com>
Cc: netdev@vger.kernel.org, Jeff Garzik <jeff@garzik.org>,
galak@kernel.crashing.org
Subject: [PATCH 2/2] PHYLIB/gianfar: Use phy_ethtool_get_link() for get_link op
Date: Mon, 05 Jun 2006 18:48:54 -0500 [thread overview]
Message-ID: <1149551334.10700.48.camel@localhost.localdomain> (raw)
This patch makes the gianfar ethtool code use phy_ethtool_get_link() instead of
ethtool_op_get_link().
Patch depends on previous one (1/2).
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 -ENODEV;
+
+ 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 reply other threads:[~2006-06-05 23:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-05 23:48 Nathaniel Case [this message]
2006-06-08 14:58 ` [PATCH 2/2] PHYLIB/gianfar: Use phy_ethtool_get_link() for get_link op Jeff Garzik
2006-06-08 15:18 ` Nathaniel Case
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=1149551334.10700.48.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).