From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 658F1C43460 for ; Thu, 22 Apr 2021 12:20:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23707613FA for ; Thu, 22 Apr 2021 12:20:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236221AbhDVMVa (ORCPT ); Thu, 22 Apr 2021 08:21:30 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:35564 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235977AbhDVMV3 (ORCPT ); Thu, 22 Apr 2021 08:21:29 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lZYK8-000Ujw-Tx; Thu, 22 Apr 2021 14:20:48 +0200 Date: Thu, 22 Apr 2021 14:20:48 +0200 From: Andrew Lunn To: Ilya Lipnitskiy Cc: Felix Fietkau , John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Jakub Kicinski , Matthias Brugger , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH net-next 14/14] net: ethernet: mtk_eth_soc: use iopoll.h macro for DMA init Message-ID: References: <20210422040914.47788-1-ilya.lipnitskiy@gmail.com> <20210422040914.47788-15-ilya.lipnitskiy@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210422040914.47788-15-ilya.lipnitskiy@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 21, 2021 at 09:09:14PM -0700, Ilya Lipnitskiy wrote: > Replace a tight busy-wait loop without a pause with a standard > readx_poll_timeout_atomic routine with a 5 us poll period. > > Tested by booting a MT7621 device to ensure the driver initializes > properly. > > Signed-off-by: Ilya Lipnitskiy > --- > drivers/net/ethernet/mediatek/mtk_eth_soc.c | 29 +++++++++------------ > drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +- > 2 files changed, 14 insertions(+), 17 deletions(-) > > diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c > index 8c863322587e..720d73d0c007 100644 > --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c > +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c > @@ -2037,25 +2037,22 @@ static int mtk_set_features(struct net_device *dev, netdev_features_t features) > /* wait for DMA to finish whatever it is doing before we start using it again */ > static int mtk_dma_busy_wait(struct mtk_eth *eth) > { > - unsigned long t_start = jiffies; > + u32 val; > + int ret; > + unsigned int reg; Nit: Reverse christmass tree. Reviewed-by: Andrew Lunn Andrew