netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, lorenzo.bianconi@redhat.com,
	nbd@nbd.name, john@phrozen.org, sean.wang@mediatek.com,
	Mark-MC.Lee@mediatek.com, sujuan.chen@mediatek.com,
	daniel@makrotopia.org
Subject: Re: [PATCH v3 net-next 3/5] net: ethernet: mtk_eth_soc: align reset procedure to vendor sdk
Date: Sun, 8 Jan 2023 15:44:09 +0200	[thread overview]
Message-ID: <Y7rIqUhWdX1yoaKO@unreal> (raw)
In-Reply-To: <af8547b94b6cad76f17c1c467b507bd915a0e2c0.1673102767.git.lorenzo@kernel.org>

On Sat, Jan 07, 2023 at 03:50:52PM +0100, Lorenzo Bianconi wrote:
> Avoid to power-down the ethernet chip during hw reset and align reset
> procedure to vendor sdk.
> 
> Tested-by: Daniel Golle <daniel@makrotopia.org>
> Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com>
> Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  drivers/net/ethernet/mediatek/mtk_eth_soc.c  | 94 +++++++++++++++-----
>  drivers/net/ethernet/mediatek/mtk_eth_soc.h  | 12 +++
>  drivers/net/ethernet/mediatek/mtk_ppe.c      | 27 ++++++
>  drivers/net/ethernet/mediatek/mtk_ppe.h      |  1 +
>  drivers/net/ethernet/mediatek/mtk_ppe_regs.h |  6 ++
>  5 files changed, 116 insertions(+), 24 deletions(-)

mdelay is macro wrapper around udelay, to account for possible overflow when
passing large arguments to udelay. In general, use of mdelay is discouraged
and code should be refactored to allow for the use of msleep.

https://www.kernel.org/doc/html/latest/timers/timers-howto.html#delays-information-on-the-various-kern

It is not your case as you are passing small numbers and can use udelay instead.

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

  reply	other threads:[~2023-01-08 13:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07 14:50 [PATCH v3 net-next 0/5] net: ethernet: mtk_wed: introduce reset support Lorenzo Bianconi
2023-01-07 14:50 ` [PATCH v3 net-next 1/5] net: ethernet: mtk_eth_soc: introduce mtk_hw_reset utility routine Lorenzo Bianconi
2023-01-08 13:38   ` Leon Romanovsky
2023-01-07 14:50 ` [PATCH v3 net-next 2/5] net: ethernet: mtk_eth_soc: introduce mtk_hw_warm_reset support Lorenzo Bianconi
2023-01-08 13:41   ` Leon Romanovsky
2023-01-07 14:50 ` [PATCH v3 net-next 3/5] net: ethernet: mtk_eth_soc: align reset procedure to vendor sdk Lorenzo Bianconi
2023-01-08 13:44   ` Leon Romanovsky [this message]
2023-01-10  0:28     ` Jakub Kicinski
2023-01-07 14:50 ` [PATCH v3 net-next 4/5] net: ethernet: mtk_eth_soc: add dma checks to mtk_hw_reset_check Lorenzo Bianconi
2023-01-08 13:45   ` Leon Romanovsky
2023-01-07 14:50 ` [PATCH v3 net-next 5/5] net: ethernet: mtk_wed: add reset/reset_complete callbacks Lorenzo Bianconi

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=Y7rIqUhWdX1yoaKO@unreal \
    --to=leon@kernel.org \
    --cc=Mark-MC.Lee@mediatek.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=john@phrozen.org \
    --cc=kuba@kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sean.wang@mediatek.com \
    --cc=sujuan.chen@mediatek.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).