Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp422921pxy; Thu, 22 Apr 2021 05:24:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1Zn4/gwJRR5SsBmoIOeqH0KOinYYWuJvzt1Tj8rLSiUYd8quI3IR1O/NGo9FDWgtlHHdT X-Received: by 2002:a05:6402:cbb:: with SMTP id cn27mr3612496edb.222.1619094280960; Thu, 22 Apr 2021 05:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619094280; cv=none; d=google.com; s=arc-20160816; b=D0iiJ9bTq9o6O2F4LoZxfX7Zl/UEB/xSBADIgAx8v6Jf5u9zcAE0dVvqymiDMiVAap 6JQS8p13xkKhvieMNjGSVTCS2ehaJOJlxpRodglP86gkR2ZJRN8chgZ8/q1+lUMQQCq4 3PG7L+2SiejnG2FK+wgp2iWdAIUqbOqIGURIl1zTs392Y/YNGTzqMVBYFT4XDQNN2auO 7je8G+N0L610kNweeZE3VKXhMveDMB3k7NbeB3bQjlR8mpIrShPdHCbqcMvQd8BjUXKq nLXPPk8HbwRGgXLbdk3pDd+vQXTUKZTX6eXwvo1uzNC7QbLCtsYHhuaEx9cB4oeRE84x g+VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=u2cGQfeGetEx/8JXnJ0fMnzvoAHBWjefQb8NyCGxBqM=; b=AtS98GNxq3gZGyyXNvTuS4g5bnmEemRC18wk/shHZ4Uxxh0RPgbuufdbR+OOduhUZx hgcJPCNS2/xdevsw4pbOnLmgIFbkLIPeT7I2DbT4Yj5frj09DM36Qh9V63C0YWpwoIDF f5YzrFwG3SToysSZDNeG/FM7i5540aupvfYoEvaCdmnO6GpwB76mK6PT3dV8pY+129FG Za/OGGvqhuOrCDS9VxgSDkLC9T+tiQprH5FTTznIYHjK+W0fnrpGIqvapU0UdxsKqclu r/ODaMKs4KC0pXftG5frfkrzdIvtd9+NH0qDbVsHcqxQ0QwAjiibO7/+U2lxeD8N0NSi ALFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si2712694edb.41.2021.04.22.05.24.17; Thu, 22 Apr 2021 05:24:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236144AbhDVMVa (ORCPT + 99 others); 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