[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9c5f9c23-d28f-4400-a113-1bafc8f349b8@tuxon.dev>
Date: Fri, 15 Dec 2023 12:13:08 +0200
From: claudiu beznea <claudiu.beznea@...on.dev>
To: Sergey Shtylyov <s.shtylyov@....ru>, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
claudiu.beznea.uj@...renesas.com, yoshihiro.shimoda.uh@...esas.com,
wsa+renesas@...g-engineering.com, niklas.soderlund+renesas@...natech.se,
biju.das.jz@...renesas.com, prabhakar.mahadev-lad.rj@...renesas.com,
mitsuhiro.kimura.kc@...esas.com, geert+renesas@...der.be
Cc: netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 2/2] net: ravb: Check that GTI loading request is done
On 14.12.2023 22:22, Sergey Shtylyov wrote:
> On 12/14/23 2:31 PM, Claudiu wrote:
>
>> From: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
>>
>> Hardware manual specifies the following for GCCR.LTI bit:
>> 0: Setting completed
>> 1: When written: Issue a configuration request.
>> When read: Completion of settings is pending
>>
>> Thus, check the completion status when setting 1 to GCCR.LTI.
>
> But do we really need to? Seems quite dubious... currently we
> just let it the loading complete asynchronously...
Now, thinking again at it... we should be safe w/o it (even though I said
we need it in a previous thread, I think I was wrong).
>
>> Fixes: 7e09a052dc4e ("ravb: Exclude gPTP feature support for RZ/G2L")
>> Fixes: 568b3ce7a8ef ("ravb: factor out register bit twiddling code")
>> Fixes: 0184165b2f42 ("ravb: add sleep PM suspend/resume support")
>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
>> ---
>> drivers/net/ethernet/renesas/ravb_main.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
>> index ce95eb5af354..1c253403a297 100644
>> --- a/drivers/net/ethernet/renesas/ravb_main.c
>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
>> @@ -2819,6 +2819,10 @@ static int ravb_probe(struct platform_device *pdev)
>>
>> /* Request GTI loading */
>> ravb_modify(ndev, GCCR, GCCR_LTI, GCCR_LTI);
>> + /* Check completion status. */
>> + error = ravb_wait(ndev, GCCR, GCCR_LTI, 0);
>> + if (error)
>> + goto out_disable_refclk;
>> }
>>
>> if (info->internal_delay) {
>> @@ -3041,6 +3045,10 @@ static int __maybe_unused ravb_resume(struct device *dev)
>>
>> /* Request GTI loading */
>> ravb_modify(ndev, GCCR, GCCR_LTI, GCCR_LTI);
>> + /* Check completion status. */
>> + ret = ravb_wait(ndev, GCCR, GCCR_LTI, 0);
>> + if (ret)
>> + return ret;
>> }
>>
>> if (info->internal_delay)
>>
>
> BTW, seems worth factoring out into a separate function...
>
> MBR, Sergey
Powered by blists - more mailing lists