All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH] net: eth-uclass: avoid running start() twice without stop()
Date: Tue, 19 Jan 2021 15:00:41 -0500	[thread overview]
Message-ID: <20210119200041.GK9782@bill-the-cat> (raw)
In-Reply-To: <20201104134514.28413-1-matthias.schiffer@ew.tq-group.com>

On Wed, Nov 04, 2020 at 02:45:14PM +0100, Matthias Schiffer wrote:

> Running the start() handler twice without a stop() inbetween completely
> breaks communication for some ethernet drivers like fec_mxc.
> 
> eth_halt() is called before each eth_init(). Due to the switch to
> eth_is_active() in commit 68acb51f442f ("net: Only call halt on a driver
> that has been init'ed"), this is not sufficient anymore when netconsole
> is active: eth_init_state_only()/eth_halt_state_only() manipulate the
> state check that is performed by eth_is_active() without actually
> calling into the driver.
> 
> The issue can be triggered by starting a network operation (e.g. ping or
> tftp) while netconsole is active.
> 
> Add an additional "running" flag that reflects the actual state of the
> driver and use it to ensure that eth_halt() actually stops the device as
> it is supposed to.
> 
> Fixes: 68acb51f442f ("net: Only call halt on a driver that has been init'ed")
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210119/037880d8/attachment.sig>

      reply	other threads:[~2021-01-19 20:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 13:45 [PATCH] net: eth-uclass: avoid running start() twice without stop() Matthias Schiffer
2021-01-19 20:00 ` Tom Rini [this message]

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=20210119200041.GK9782@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.