netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] asix: Do full reset during ax88772_bind
@ 2014-11-06 15:49 Charles Keepax
  2014-11-07  8:27 ` Stam, Michel [FINT]
  2014-11-07 20:30 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Charles Keepax @ 2014-11-06 15:49 UTC (permalink / raw)
  To: davem; +Cc: jeffrey.t.kirsher, m.stam, emilgoode, linux-usb, netdev,
	linux-kernel

commit 3cc81d85ee01 ("asix: Don't reset PHY on if_up for ASIX 88772")
causes the ethernet on Arndale to no longer function. This appears to
be because the Arndale ethernet requires a full reset before it will
function correctly, however simply reverting the above patch causes
problems with ethtool settings getting reset.

It seems the problem is that the ethernet is not properly reset during
bind, and indeed the code in ax88772_bind that resets the device is a
very small subset of the actual ax88772_reset function. This patch uses
ax88772_reset in place of the existing reset code in ax88772_bind which
removes some code duplication and fixes the ethernet on Arndale.

It is still possible that the original patch causes some issues with
suspend and resume but that seems like a separate issue and I haven't
had a chance to test that yet.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tested-by: Riku Voipio <riku.voipio@linaro.org>
---

Hi,

I wasn't 100% sure which branch to base this off so I based it on Dave
Miller's net-next branch, which seemed logical.

Thanks,
Charles

 drivers/net/usb/asix_devices.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index 2c05f6c..816d511 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -465,19 +465,7 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
 		return ret;
 	}
 
-	ret = asix_sw_reset(dev, AX_SWRESET_IPPD | AX_SWRESET_PRL);
-	if (ret < 0)
-		return ret;
-
-	msleep(150);
-
-	ret = asix_sw_reset(dev, AX_SWRESET_CLEAR);
-	if (ret < 0)
-		return ret;
-
-	msleep(150);
-
-	ret = asix_sw_reset(dev, embd_phy ? AX_SWRESET_IPRL : AX_SWRESET_PRTE);
+	ax88772_reset(dev);
 
 	/* Read PHYID register *AFTER* the PHY was reset properly */
 	phyid = asix_get_phyid(dev);
-- 
1.7.2.5

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

* RE: [PATCH] asix: Do full reset during ax88772_bind
  2014-11-06 15:49 [PATCH] asix: Do full reset during ax88772_bind Charles Keepax
@ 2014-11-07  8:27 ` Stam, Michel [FINT]
  2014-11-07 16:32   ` David Miller
  2014-11-07 20:30 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Stam, Michel [FINT] @ 2014-11-07  8:27 UTC (permalink / raw)
  To: Charles Keepax, davem
  Cc: jeffrey.t.kirsher, emilgoode, linux-usb, netdev, linux-kernel

Please add;

Tested-by: Michel Stam  <m.stam@fugro.nl>

Kind regards,

Michel Stam

-----Original Message-----
From: Charles Keepax [mailto:ckeepax@opensource.wolfsonmicro.com] 
Sent: Thursday, November 06, 2014 16:50 PM
To: davem@davemloft.net
Cc: jeffrey.t.kirsher@intel.com; Stam, Michel [FINT];
emilgoode@gmail.com; linux-usb@vger.kernel.org; netdev@vger.kernel.org;
linux-kernel@vger.kernel.org
Subject: [PATCH] asix: Do full reset during ax88772_bind

commit 3cc81d85ee01 ("asix: Don't reset PHY on if_up for ASIX 88772")
causes the ethernet on Arndale to no longer function. This appears to be
because the Arndale ethernet requires a full reset before it will
function correctly, however simply reverting the above patch causes
problems with ethtool settings getting reset.

It seems the problem is that the ethernet is not properly reset during
bind, and indeed the code in ax88772_bind that resets the device is a
very small subset of the actual ax88772_reset function. This patch uses
ax88772_reset in place of the existing reset code in ax88772_bind which
removes some code duplication and fixes the ethernet on Arndale.

It is still possible that the original patch causes some issues with
suspend and resume but that seems like a separate issue and I haven't
had a chance to test that yet.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tested-by: Riku Voipio <riku.voipio@linaro.org>
---

Hi,

I wasn't 100% sure which branch to base this off so I based it on Dave
Miller's net-next branch, which seemed logical.

Thanks,
Charles

 drivers/net/usb/asix_devices.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/drivers/net/usb/asix_devices.c
b/drivers/net/usb/asix_devices.c index 2c05f6c..816d511 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -465,19 +465,7 @@ static int ax88772_bind(struct usbnet *dev, struct
usb_interface *intf)
 		return ret;
 	}
 
-	ret = asix_sw_reset(dev, AX_SWRESET_IPPD | AX_SWRESET_PRL);
-	if (ret < 0)
-		return ret;
-
-	msleep(150);
-
-	ret = asix_sw_reset(dev, AX_SWRESET_CLEAR);
-	if (ret < 0)
-		return ret;
-
-	msleep(150);
-
-	ret = asix_sw_reset(dev, embd_phy ? AX_SWRESET_IPRL :
AX_SWRESET_PRTE);
+	ax88772_reset(dev);
 
 	/* Read PHYID register *AFTER* the PHY was reset properly */
 	phyid = asix_get_phyid(dev);
--
1.7.2.5

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

* Re: [PATCH] asix: Do full reset during ax88772_bind
  2014-11-07  8:27 ` Stam, Michel [FINT]
@ 2014-11-07 16:32   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-11-07 16:32 UTC (permalink / raw)
  To: M.Stam
  Cc: ckeepax, jeffrey.t.kirsher, emilgoode, linux-usb, netdev,
	linux-kernel

From: "Stam, Michel [FINT]" <M.Stam@fugro.nl>
Date: Fri, 7 Nov 2014 09:27:26 +0100

> Please add;
> 
> Tested-by: Michel Stam  <m.stam@fugro.nl>

You're making two critical mistakes here in how you are replying to
this patch.

First, do not top post.  Quote the commit message, then add your
Tested-by or other tag afterwards.

And most importantly, do not provide the entire patch again.  That
makes a brand new entry in patchwork, rather than adding your
Tested-by to the original patch.

These mistakes make more work for everyone trying to get this
change into the tree, including me.  So please respond and
discuss patches like everyone else does by not top-posting and
not posting the entire patch in your response.

Thanks.

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

* Re: [PATCH] asix: Do full reset during ax88772_bind
  2014-11-06 15:49 [PATCH] asix: Do full reset during ax88772_bind Charles Keepax
  2014-11-07  8:27 ` Stam, Michel [FINT]
@ 2014-11-07 20:30 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2014-11-07 20:30 UTC (permalink / raw)
  To: ckeepax
  Cc: jeffrey.t.kirsher, m.stam, emilgoode, linux-usb, netdev,
	linux-kernel

From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Date: Thu,  6 Nov 2014 15:49:41 +0000

> commit 3cc81d85ee01 ("asix: Don't reset PHY on if_up for ASIX 88772")
> causes the ethernet on Arndale to no longer function. This appears to
> be because the Arndale ethernet requires a full reset before it will
> function correctly, however simply reverting the above patch causes
> problems with ethtool settings getting reset.
> 
> It seems the problem is that the ethernet is not properly reset during
> bind, and indeed the code in ax88772_bind that resets the device is a
> very small subset of the actual ax88772_reset function. This patch uses
> ax88772_reset in place of the existing reset code in ax88772_bind which
> removes some code duplication and fixes the ethernet on Arndale.
> 
> It is still possible that the original patch causes some issues with
> suspend and resume but that seems like a separate issue and I haven't
> had a chance to test that yet.
> 
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> Tested-by: Riku Voipio <riku.voipio@linaro.org>
> ---
> 
> Hi,
> 
> I wasn't 100% sure which branch to base this off so I based it on Dave
> Miller's net-next branch, which seemed logical.

Since it fixes a regression that is upstream already, I'm applying this
to the net tree.

Thanks.

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

end of thread, other threads:[~2014-11-07 20:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-06 15:49 [PATCH] asix: Do full reset during ax88772_bind Charles Keepax
2014-11-07  8:27 ` Stam, Michel [FINT]
2014-11-07 16:32   ` David Miller
2014-11-07 20:30 ` David Miller

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