From: David Miller <davem@davemloft.net>
To: yoshihiro.shimoda.uh@renesas.com
Cc: sergei.shtylyov@gmail.com, kuba@kernel.org,
dirk.behme@de.bosch.com, Shashikant.Suguni@in.bosch.com,
netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v3] net: ethernet: ravb: exit if re-initialization fails in tx timeout
Date: Tue, 21 Jul 2020 15:34:27 -0700 (PDT) [thread overview]
Message-ID: <20200721.153427.1257555808984580585.davem@davemloft.net> (raw)
In-Reply-To: <1595312592-28666-1-git-send-email-yoshihiro.shimoda.uh@renesas.com>
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: Tue, 21 Jul 2020 15:23:12 +0900
> According to the report of [1], this driver is possible to cause
> the following error in ravb_tx_timeout_work().
>
> ravb e6800000.ethernet ethernet: failed to switch device to config mode
>
> This error means that the hardware could not change the state
> from "Operation" to "Configuration" while some tx and/or rx queue
> are operating. After that, ravb_config() in ravb_dmac_init() will fail,
> and then any descriptors will be not allocaled anymore so that NULL
> pointer dereference happens after that on ravb_start_xmit().
>
> To fix the issue, the ravb_tx_timeout_work() should check
> the return values of ravb_stop_dma() and ravb_dmac_init().
> If ravb_stop_dma() fails, ravb_tx_timeout_work() re-enables TX and RX
> and just exits. If ravb_dmac_init() fails, just exits.
>
> [1]
> https://lore.kernel.org/linux-renesas-soc/20200518045452.2390-1-dirk.behme@de.bosch.com/
>
> Reported-by: Dirk Behme <dirk.behme@de.bosch.com>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com>
Applied, thank you.
next prev parent reply other threads:[~2020-07-21 22:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 6:23 [PATCH v3] net: ethernet: ravb: exit if re-initialization fails in tx timeout Yoshihiro Shimoda
2020-07-21 22:34 ` David Miller [this message]
2020-07-22 8:18 ` Sergei Shtylyov
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=20200721.153427.1257555808984580585.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Shashikant.Suguni@in.bosch.com \
--cc=dirk.behme@de.bosch.com \
--cc=kuba@kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@gmail.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
/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).