From: Ben Hutchings <ben@decadent.org.uk>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: "Stam, Michel [FINT]" <M.Stam@fugro.nl>,
Riku Voipio <riku.voipio@iki.fi>,
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: Wed, 12 Nov 2014 00:23:22 +0000 [thread overview]
Message-ID: <1415751802.3398.107.camel@decadent.org.uk> (raw)
In-Reply-To: <20141104200914.GN23178@opensource.wolfsonmicro.com>
[-- Attachment #1: Type: text/plain, Size: 2044 bytes --]
On Tue, 2014-11-04 at 20:09 +0000, Charles Keepax wrote:
> On Tue, Nov 04, 2014 at 11:23:06AM +0100, Stam, Michel [FINT] wrote:
> > Hello Riku,
> >
> > >Fixing a bug (ethtool support) must not cause breakage elsewhere (in
> > this case on arndale). This is now a regression of functionality from
> > 3.17.
> > >
> > >I think it would better to revert the change now and with less hurry
> > introduce a ethtool fix that doesn't break arndale.
> >
> > I don't fully agree here;
> > I would like to point out that this commit is a revert itself. Fixing
> > the armdale will then cause breakage in other implementations, such as
> > ours. Blankly reverting breaks other peoples' implementations.
> >
> > The PHY reset is the thing that breaks ethtool support, so any fix that
> > appeases all would have to take existing PHY state into account.
[...]
> --- a/drivers/net/usb/asix_devices.c
> +++ b/drivers/net/usb/asix_devices.c
> @@ -299,6 +299,7 @@ static int ax88772_reset(struct usbnet *dev)
> {
> struct asix_data *data = (struct asix_data *)&dev->data;
> int ret, embd_phy;
> + int reg;
> u16 rx_ctl;
>
> ret = asix_write_gpio(dev,
> @@ -359,8 +360,10 @@ static int ax88772_reset(struct usbnet *dev)
> msleep(150);
>
> asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET);
> - asix_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE,
> - ADVERTISE_ALL | ADVERTISE_CSMA);
> + reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_ADVERTISE);
> + if (!reg)
> + reg = ADVERTISE_ALL | ADVERTISE_CSMA;
> + asix_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, reg);
[...]
Why is there no sleep after setting the RESET bit? Doesn't that make
the following register writes unreliable?
Ben.
--
Ben Hutchings
Experience is directly proportional to the value of equipment destroyed.
- Carolyn Scheppner
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next prev parent reply other threads:[~2014-11-12 0:23 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
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 ` Ben Hutchings [this message]
2014-11-12 9:49 ` "asix: Don't reset PHY on if_up for ASIX 88772" breaks net on arndale platform 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=1415751802.3398.107.camel@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=M.Stam@fugro.nl \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=riku.voipio@iki.fi \
/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).