All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: yoshihiro.shimoda.uh@renesas.com
Cc: sergei.shtylyov@cogentembedded.com, netdev@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2] net: sh_eth: fix mdio access in sh_eth_close() for R-Car Gen2 and RZ/A1 SoCs
Date: Wed, 29 May 2019 13:25:18 -0700 (PDT)	[thread overview]
Message-ID: <20190529.132518.1102678070487513053.davem@davemloft.net> (raw)
In-Reply-To: <1559016646-7293-1-git-send-email-yoshihiro.shimoda.uh@renesas.com>

From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: Tue, 28 May 2019 13:10:46 +0900

> The sh_eth_close() resets the MAC and then calls phy_stop()
> so that mdio read access result is incorrect without any error
> according to kernel trace like below:
> 
> ifconfig-216   [003] .n..   109.133124: mdio_access: ee700000.ethernet-ffffffff read  phy:0x01 reg:0x00 val:0xffff
> 
> According to the hardware manual, the RMII mode should be set to 1
> before operation the Ethernet MAC. However, the previous code was not
> set to 1 after the driver issued the soft_reset in sh_eth_dev_exit()
> so that the mdio read access result seemed incorrect. To fix the issue,
> this patch adds a condition and set the RMII mode register in
> sh_eth_dev_exit() for R-Car Gen2 and RZ/A1 SoCs.
> 
> Note that when I have tried to move the sh_eth_dev_exit() calling
> after phy_stop() on sh_eth_close(), but it gets worse (kernel panic
> happened and it seems that a register is accessed while the clock is
> off).
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
>  Changes from v1 (https://patchwork.kernel.org/patch/10944265/):
>  - Revise the subject, commit log and the comment of the code.
>  - Move the RMII setting to right after soft_reset.

Applied, thank you.

  reply	other threads:[~2019-05-29 20:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28  4:10 [PATCH v2] net: sh_eth: fix mdio access in sh_eth_close() for R-Car Gen2 and RZ/A1 SoCs Yoshihiro Shimoda
2019-05-29 20:25 ` David Miller [this message]
2019-06-05 18:19 ` 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=20190529.132518.1102678070487513053.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.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 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.