Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1717844
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 0/2] net: Fix crashes due to activity during suspend |
| Date | Tue, 22 Aug 2017 23:20:01 +0200 |
| Message-ID | <uhoKB-7YR-1@gated-at.bofh.it> (permalink) |
| References | <uhmfL-6aC-3@gated-at.bofh.it> <uhmz7-6kj-1@gated-at.bofh.it> |
| X-Original-To | Florian Fainelli <f.fainelli@gmail.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=EMk083FB9B806/kRSDjatMKDJc9i/HsvU3fKR9A3qi0=; b=AMeGs753C2zHHjOCTgoNR0POZQphefT/lZz3s33IjOP77A1BAy5hfZGlRG6T9kP7FC 1oBIPIrawCXHGGZ44Wwr7mRCB/pEJqtbVog7YFT/97vxyQixOkUuvPlLbAA7YOJsEqI8 GTUiiSQ/bZEbXQTbLRFPgUVydobU7d2NhejGHtJVQJoe85uimHt8iFnJoqm0TNzDehgr vbOSFyXpC3OpKZNprCcmBB5izO5TE+o3GAQZ11VHitezmXQ+usGIDa8exUxHGV/0RhsC Tjazzad13yFGSzQeJCxyCmdZyQyhlt0kyNJPpJZdvlXIrn25ZUAFRhhI5fL5BvLqYWss 7zUA== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=EMk083FB9B806/kRSDjatMKDJc9i/HsvU3fKR9A3qi0=; b=QdPZj2CkrasP+eVKi0YEiYo0FtOWufF4R8BCfK9fp2EnZA6A4osLR65jpACUaF3fIU VvCrZhdTTIb9W8GPltvFBZAQ4Np2pAExtrVcSoBpOwD7BS2DSRQslCuuDFdwz+8nRKXE EOaBEtaDL2Rcp9Exk5/JAhnen7ibMMpD10ChqVZXngl8+AGwSOpJsYvTATumxMf2wp4H lUzzuAyYvRJCnq898Os5fvrxjJMEDt9LujYv1xKwNanHwGwiYi2zEbwuQ8v0+G3VGD0f UqgXNfwbO0ZgJNAlQvt6f0btwFzC/7DQWo4jPrjiHVNlC4XOmzWan0y0mVZhq5QAu0Rq vP5g== |
| X-Gm-Message-State | AHYfb5gDJzrONU/niKw5M3rewYlN9OxFc6i44o1QKSuVGkWcmCIRCK5G fQniSnKDj8tuBzMy9KikcpSquBq0Vw== |
| X-Received | by 10.84.217.145 with SMTP id p17mr508581pli.13.1503436600295; Tue, 22 Aug 2017 14:16:40 -0700 (PDT) |
| MIME-Version | 1.0 |
| X-Google-Sender-Auth | 3ZUygdZJYgRPc-0duYwf5ohkmxY |
| Content-Type | text/plain; charset="UTF-8" |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 54 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Geert Uytterhoeven <geert+renesas@glider.be>, "David S . Miller" <davem@davemloft.net>, Steve Glendinning <steve.glendinning@shawell.net>, Andrew Lunn <andrew@lunn.ch>, Lukas Wunner <lukas@wunner.de>, "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>, "netdev@vger.kernel.org" <netdev@vger.kernel.org>, Linux PM list <linux-pm@vger.kernel.org>, Linux-Renesas <linux-renesas-soc@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> |
| X-Original-Date | Tue, 22 Aug 2017 23:16:39 +0200 |
| X-Original-Message-ID | <CAMuHMdUyz9BeXpWxLwpLtb0bpLmcbbKW5UQA9-k-NPG4TWXTxg@mail.gmail.com> |
| X-Original-References | <1503427046-17618-1-git-send-email-geert+renesas@glider.be> <757f672b-d3cf-9189-0533-cb45e325c6b8@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1717844 |
Show key headers only | View raw
Hi Florian,
On Tue, Aug 22, 2017 at 8:49 PM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> On 08/22/2017 11:37 AM, Geert Uytterhoeven wrote:
>> If an Ethernet device is used while the device is suspended, the system may
>> crash.
>>
>> E.g. on sh73a0/kzm9g and r8a73a4/ape6evm, the external Ethernet chip is
>> driven by a PM controlled clock. If the Ethernet registers are accessed
>> while the clock is not running, the system will crash with an imprecise
>> external abort.
>>
>> This patch series fixes two of such crashes:
>> 1. The first patch prevents the PHY polling state machine from accessing
>> PHY registers while a device is suspended,
>> 2. The second patch prevents the net core from trying to transmit packets
>> when an smsc911x device is suspended.
>>
>> Both crashes can be reproduced on sh73a0/kzm9g and r8a73a4/ape6evm during
>> s2ram (rarely), or by using pm_test (more likely to trigger):
>>
>> # echo 0 > /sys/module/printk/parameters/console_suspend
>> # echo platform > /sys/power/pm_test
>> # echo mem > /sys/power/state
>>
>> With this series applied, my test systems survive a loop of 100 test
>> suspends.
>
> It seems to me like part, if not the entire problem is that smsc91xx's
> suspend and resume functions are way too simplistic and absolutely do
> not manage the PHY during suspend/resume, the PHY state machine is not
> even stopped, so of course, this will cause bus errors if you access
> those registers.
>
> You are addressing this as part of patch 2, but this seems to me like
> this is still a bit incomplete and you'd need at least phy_stop() and/or
> phy_suspend() (does a power down of the PHY) and phy_start() and/or
> phy_resume() calls to complete the PHY state machine shutdown during
> suspend.
>
> Have you tried that?
Thank you, I will give that a try!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] net: Fix crashes due to activity during suspend Geert Uytterhoeven <geert+renesas@glider.be> - 2017-08-22 20:40 +0200
[PATCH 2/2] net: smsc911x: Quiten netif during suspend Geert Uytterhoeven <geert+renesas@glider.be> - 2017-08-22 20:40 +0200
Re: [PATCH 2/2] net: smsc911x: Quiten netif during suspend Andrew Lunn <andrew@lunn.ch> - 2017-08-22 22:20 +0200
[PATCH 1/2] net: phy: Freeze PHY polling before suspending devices Geert Uytterhoeven <geert+renesas@glider.be> - 2017-08-22 20:40 +0200
Re: [PATCH 0/2] net: Fix crashes due to activity during suspend Florian Fainelli <f.fainelli@gmail.com> - 2017-08-22 21:00 +0200
Re: [PATCH 0/2] net: Fix crashes due to activity during suspend Geert Uytterhoeven <geert@linux-m68k.org> - 2017-08-22 23:20 +0200
Re: [PATCH 0/2] net: Fix crashes due to activity during suspend Geert Uytterhoeven <geert@linux-m68k.org> - 2017-08-23 13:50 +0200
Re: [PATCH 0/2] net: Fix crashes due to activity during suspend Florian Fainelli <f.fainelli@gmail.com> - 2017-08-23 19:20 +0200
csiph-web