linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Riku Voipio <riku.voipio@iki.fi>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Riku Voipio <riku.voipio@iki.fi>,
	"Stam, Michel [FINT]" <M.Stam@fugro.nl>,
	freddy@asix.com.tw, davem@davemloft.net,
	linux-usb@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Subject: Re: "asix: Don't reset PHY on if_up for ASIX 88772" breaks net on arndale platform
Date: Thu, 6 Nov 2014 14:04:16 +0200	[thread overview]
Message-ID: <20141106120416.GA20162@afflict.kos.to> (raw)
In-Reply-To: <20141106100104.GS23178@opensource.wolfsonmicro.com>

On Thu, Nov 06, 2014 at 10:01:04AM +0000, Charles Keepax wrote:
> On Thu, Nov 06, 2014 at 11:06:51AM +0200, Riku Voipio wrote:
> > The asix on arndale comes semi-configured from u-boot, which I guess is
> > not the state kernel expects it to come in. At least in my case where
> > I use tftp from u-boot to load my kernel.
> > 
> > So probably the full reset is needed here to make the asix chip come
> > to a truly pristine state.
> > 
> > The commit that Michel partially reverted (by returning to use
> > ax88772_link_reset instead of ax88772_reset), indicates that a strong reset
> > is needed for suspend/resume as well:
 
> Ok I think I have cracked this one. I am pretty sure you are
> right that the USB comes to us in a strange state and needs
> a full reset, but that only needs to happen once when the driver
> is bound in. So there is some code in ax88772_bind that appears
> to try to reset the device but does a lot less than ax88772_reset
> and I think that must be the problem. Applying the following on
> top of the patch we have been debating I think will make
> everything work for all of us:

The patch below on top of 3.18-rc3 fixes arndale network for me.

Tested-by: Riku Voipio <riku.voipio@linaro.org>

> --- 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 *in
>                 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);
> 
> If you guys could test that and let me know how you get on I will
> send in a proper patch if it looks good.
> 
> Thanks,
> Charles

  reply	other threads:[~2014-11-06 12:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04  7:22 "asix: Don't reset PHY on if_up for ASIX 88772" breaks net on arndale platform Riku Voipio
2014-11-04  8:19 ` Stam, Michel [FINT]
2014-11-04  9:43   ` Riku Voipio
2014-11-04 10:23     ` Stam, Michel [FINT]
2014-11-04 20:09       ` Charles Keepax
2014-11-05 12:04         ` "asix: Don't reset PHY on if_up for ASIX 88772" breaks net onarndale platform Stam, Michel [FINT]
2014-11-05 12:39           ` Riku Voipio
2014-11-05 16:21             ` Stam, Michel [FINT]
2014-11-05 15:02           ` Charles Keepax
2014-11-05 16:17             ` "asix: Don't reset PHY on if_up for ASIX 88772" breaks netonarndale platform Stam, Michel [FINT]
2014-11-06  9:06             ` "asix: Don't reset PHY on if_up for ASIX 88772" breaks net on arndale platform Riku Voipio
2014-11-06 10:01               ` Charles Keepax
2014-11-06 12:04                 ` Riku Voipio [this message]
2014-11-06 12:39                   ` Stam, Michel [FINT]
2014-11-06 12:46                     ` Charles Keepax
2014-11-06 14:01                       ` "asix: Don't reset PHY on if_up for ASIX 88772" breaks net onarndale platform Stam, Michel [FINT]
2014-11-06 14:09                         ` Charles Keepax
2014-11-07  8:44                           ` Riku Voipio
2014-11-12  0:23         ` "asix: Don't reset PHY on if_up for ASIX 88772" breaks net on arndale platform Ben Hutchings
2014-11-12  9:49           ` Stam, Michel [FINT]
2014-11-12 17:43             ` David Miller

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=20141106120416.GA20162@afflict.kos.to \
    --to=riku.voipio@iki.fi \
    --cc=M.Stam@fugro.nl \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=davem@davemloft.net \
    --cc=freddy@asix.com.tw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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).