netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] PHYLIB/gianfar: Use phy_ethtool_get_link() for get_link op
@ 2006-06-05 23:48 Nathaniel Case
  2006-06-08 14:58 ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: Nathaniel Case @ 2006-06-05 23:48 UTC (permalink / raw)
  To: Andy Fleming; +Cc: netdev, Jeff Garzik, galak

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,



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] PHYLIB/gianfar: Use phy_ethtool_get_link() for get_link op
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2006-06-08 14:58 UTC (permalink / raw)
  To: Nathaniel Case; +Cc: Andy Fleming, netdev, galak

Nathaniel Case wrote:
> 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;

NAK, return code obviously wrong



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] PHYLIB/gianfar: Use phy_ethtool_get_link() for get_link op
  2006-06-08 14:58 ` Jeff Garzik
@ 2006-06-08 15:18   ` Nathaniel Case
  2006-06-08 15:33     ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: Nathaniel Case @ 2006-06-08 15:18 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Andy Fleming, netdev, galak

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,



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] PHYLIB/gianfar: Use phy_ethtool_get_link() for get_link op
  2006-06-08 15:18   ` Nathaniel Case
@ 2006-06-08 15:33     ` Jeff Garzik
  2006-06-08 16:22       ` Nathaniel Case
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2006-06-08 15:33 UTC (permalink / raw)
  To: Nathaniel Case; +Cc: Andy Fleming, netdev, galak

Nathaniel Case wrote:
> 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>

Sigh.  See rule #6: http://linux.yyz.us/patch-format.html

You excised the patch description, which means your patch can no longer 
be applied correctly by scripts.

	Jeff



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] PHYLIB/gianfar: Use phy_ethtool_get_link() for get_link op
  2006-06-08 15:33     ` Jeff Garzik
@ 2006-06-08 16:22       ` Nathaniel Case
  0 siblings, 0 replies; 5+ messages in thread
From: Nathaniel Case @ 2006-06-08 16:22 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Andy Fleming, netdev, galak

This patch makes the gianfar ethtool code use phy_ethtool_get_link()
instead of ethtool_op_get_link().

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,



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-06-08 16:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2006-06-08 15:33     ` Jeff Garzik
2006-06-08 16:22       ` Nathaniel Case

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