lkml.org 
[lkml]   [2021]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH net-next 14/14] net: ethernet: mtk_eth_soc: use iopoll.h macro for DMA init
    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 <ilya.lipnitskiy@gmail.com>
    > ---
    > 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@lunn.ch>

    Andrew

    \
     
     \ /
      Last update: 2021-04-22 14:21    [W:2.510 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site