netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mason <slash.tmp@free.fr>
To: Florian Fainelli <f.fainelli@gmail.com>,
	David Miller <davem@davemloft.net>,
	Mans Rullgard <mans@mansr.com>
Cc: netdev <netdev@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH v2 0/2] nb8800 suspend/resume support
Date: Wed, 2 Aug 2017 16:41:07 +0200	[thread overview]
Message-ID: <aa8885b8-e6bb-3624-2bf9-0bb40505ac54@free.fr> (raw)
In-Reply-To: <33d1ab47-6098-5e3f-8a3c-f72626d07113@free.fr>

On 01/08/2017 18:32, Mason wrote:

> I need suspend/resume support in the nb8800 driver.
> On tango platforms, suspend loses all context (MMIO registers).
> To make the task easy, we just close the device on suspend,
> and open it again on resume. This requires properly resetting
> the HW on resume.
> 
> Patch 1 moves all the HW init to nb8800_init()
> Patch 2 adds suspend/resume support

I have now confirmed that the "flow control" issue I reported
in another thread has nothing to do with flow control per se.

The problem is that nb8800_pause_config() calls nb8800_dma_stop()
and when it does, RX is borked.

On a GigE switch:
[   21.444268] ENTER nb8800_pause_config
[   21.448604] rxcr=06100a8f pause_rx=1 pause_tx=0 pause=1 asym_pause=1
[   21.455020] nb8800 26000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

In this case, pause_tx and RCR_FL match, so we skip the
silly dance.

On a FastE switch:
[   11.611613] ENTER nb8800_pause_config
[   11.615942] rxcr=06100a8f pause_rx=1 pause_tx=1 pause=1 asym_pause=0
[   11.825535] nb8800 26000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

In this case pause_tx and RCR_FL don't match, so we hit
nb8800_dma_stop() and the HW block becomes deaf.

In conclusion, two issues I've been discussing:
A) RX wedged after ndo_close
B) flow control breaks on FastE switches
are in fact two symptoms of the same root issue.

Regards.

  parent reply	other threads:[~2017-08-02 14:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 16:32 [RFC PATCH v2 0/2] nb8800 suspend/resume support Mason
2017-08-01 16:37 ` [RFC PATCH v2 1/2] net: ethernet: nb8800: Reset HW block in ndo_open Mason
2017-08-02 11:02   ` Måns Rullgård
2017-08-02 11:54     ` Mason
2017-08-02 13:54       ` Andrew Lunn
2017-08-02 14:33       ` Måns Rullgård
2017-08-01 16:43 ` [RFC PATCH v2 2/2] net: ethernet: nb8800: Add suspend/resume support Mason
2017-08-02 14:41 ` Mason [this message]
2017-08-02 15:26   ` [RFC PATCH v2 0/2] nb8800 " Mason
2017-08-02 15:36     ` Måns Rullgård
2017-08-02 15:52       ` Mason
2017-08-02 15:56         ` Måns Rullgård
2017-08-02 16:07           ` Mason
2017-08-02 16:10             ` Måns Rullgård
2017-08-02 16:19               ` David Laight
2017-08-02 16:39               ` Mason
2017-08-02 16:43                 ` Måns Rullgård
2017-08-02 17:31               ` Mason
2017-08-02 20:02                 ` Mason
2017-08-03  8:34                   ` Mason
2017-08-03 12:19                     ` Måns Rullgård
2017-08-03 12:18                   ` Måns Rullgård

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=aa8885b8-e6bb-3624-2bf9-0bb40505ac54@free.fr \
    --to=slash.tmp@free.fr \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mans@mansr.com \
    --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).