linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Nisar.Sayed@microchip.com>
To: <frieder.schrempf@exceet.de>, <steve.glendinning@shawell.net>,
	<UNGLinuxDriver@microchip.com>, <davem@davemloft.net>,
	<netdev@vger.kernel.org>
Cc: <oneukum@suse.com>, <linux-usb@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: RE: SMSC9730 Autosuspend/Resume Questions
Date: Mon, 22 Oct 2018 07:03:54 +0000	[thread overview]
Message-ID: <CE371C1263339941885964188A0225FA44571A@CHN-SV-EXMX03.mchp-main.com> (raw)
In-Reply-To: <69e14429-a4d9-dd5c-5e70-c22086490cc0@exceet.de>

Hi Frieder,

> Hi,
> 
> I recently tested a board with SMSC9730 connected via USB HSIC to an
> i.MX6S SOC. I used these patches on top of v4.14-rc8 for the USB HSIC
> support: [1].
> 
> When I turned on autosuspend, the smsc95xx stopped in the middle of the
> suspending routine and /sys/bus/usb/devices/usb3/3-
> 1/power/runtime_status reported "suspending"
> forever.
> 
> With some debug logs I found out, that the last line of code that was
> executed is [2], after that I didn't get any further messages.
> 
> Then I applied the following diff and the suspend/resume started to work
> reliably:
> 
> @@ -1382,10 +1385,11 @@ static int smsc95xx_link_ok_nopm(struct usbnet
> *dev)
>          ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, MII_BMSR);
>          if (ret < 0)
>                  return ret;
> -
> +       /*
>          ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, MII_BMSR);
>          if (ret < 0)
>                  return ret;
> +       */
> 
>          return !!(ret & BMSR_LSTATUS);
>   }
> 
> So it seems like the dummy read, that is commented with "first, a dummy
> read, needed to latch some MII phys" causes problems in my setup. Do you
> have an idea what could be the reason? Is this a proper fix?
>
 
Link status bit is latch low register and needs to be read twice. You may get wrong Link status with this fix.

- Nisar

  reply	other threads:[~2018-10-22  7:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17 15:21 SMSC9730 Autosuspend/Resume Questions Frieder Schrempf
2018-10-22  7:03 ` Nisar.Sayed [this message]
2018-10-22  7:14   ` Frieder Schrempf

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=CE371C1263339941885964188A0225FA44571A@CHN-SV-EXMX03.mchp-main.com \
    --to=nisar.sayed@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=frieder.schrempf@exceet.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=steve.glendinning@shawell.net \
    /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).