[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220615093656.tahj3ncojeh6slmq@microsemi.com>
Date: Wed, 15 Jun 2022 15:06:56 +0530
From: Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
To: Andrew Lunn <andrew@...n.ch>
CC: <netdev@...r.kernel.org>, <davem@...emloft.net>, <kuba@...nel.org>,
<linux-kernel@...r.kernel.org>, <bryan.whitehead@...rochip.com>,
<lxu@...linear.com>, <richardcochran@...il.com>,
<UNGLinuxDriver@...rochip.com>, <Ian.Saturley@...rochip.com>
Subject: Re: [PATCH net-next 3/5] net: lan743x: Add support to SGMII block
access functions
Hi Andrew,
Thank you for review comments.
The 06/14/2022 23:03, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On Tue, Jun 14, 2022 at 04:04:22PM +0530, Raju Lakkaraju wrote:
> > Add SGMII access read and write functions
> >
> > Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
> > ---
> > drivers/net/ethernet/microchip/lan743x_main.c | 69 +++++++++++++++++++
> > drivers/net/ethernet/microchip/lan743x_main.h | 12 ++++
> > 2 files changed, 81 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
> > index 6352cba19691..e496769efb54 100644
> > --- a/drivers/net/ethernet/microchip/lan743x_main.c
> > +++ b/drivers/net/ethernet/microchip/lan743x_main.c
> > @@ -909,6 +909,74 @@ static int lan743x_mdiobus_c45_write(struct mii_bus *bus,
> > return ret;
> > }
> >
> > +static int lan743x_sgmii_wait_till_not_busy(struct lan743x_adapter *adapter)
> > +{
> > + u32 data;
> > + int ret;
> > +
> > + ret = readx_poll_timeout(LAN743X_CSR_READ_OP, SGMII_ACC, data,
> > + !(data & SGMII_ACC_SGMII_BZY_), 100, 1000000);
> > + if (unlikely(ret < 0))
>
> unlikely() seems pointless here. You have just done a blocking poll,
> so you don't care about high performance, this is not the fast path.
>
> Andrew
Accepted.
I will remove the unlinkely().
--
Thanks,
Raju
Powered by blists - more mailing lists