From: claudiu beznea <claudiu.beznea@tuxon.dev>
To: Sergey Shtylyov <s.shtylyov@omp.ru>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, claudiu.beznea.uj@bp.renesas.com,
yoshihiro.shimoda.uh@renesas.com,
wsa+renesas@sang-engineering.com,
niklas.soderlund+renesas@ragnatech.se,
biju.das.jz@bp.renesas.com,
prabhakar.mahadev-lad.rj@bp.renesas.com,
mitsuhiro.kimura.kc@renesas.com, geert+renesas@glider.be
Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 2/2] net: ravb: Check that GTI loading request is done
Date: Fri, 15 Dec 2023 12:13:08 +0200 [thread overview]
Message-ID: <9c5f9c23-d28f-4400-a113-1bafc8f349b8@tuxon.dev> (raw)
In-Reply-To: <884a4c36-25e4-1049-8410-cc5df9bcc4d1@omp.ru>
On 14.12.2023 22:22, Sergey Shtylyov wrote:
> On 12/14/23 2:31 PM, Claudiu wrote:
>
>> From: Claudiu Beznea <claudiu.beznea.uj@bp.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@bp.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
prev parent reply other threads:[~2023-12-15 10:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 11:31 [PATCH net 0/2] net: ravb: fixes for the ravb driver Claudiu
2023-12-14 11:31 ` [PATCH net 1/2] net: ravb: Wait for operation mode to be applied Claudiu
2023-12-14 12:11 ` Niklas Söderlund
2023-12-14 12:25 ` claudiu beznea
2023-12-14 12:39 ` Niklas Söderlund
2023-12-14 12:57 ` claudiu beznea
2023-12-14 19:41 ` Sergey Shtylyov
2023-12-15 10:04 ` claudiu beznea
2023-12-19 16:49 ` Sergey Shtylyov
2023-12-20 11:27 ` claudiu beznea
2023-12-14 11:31 ` [PATCH net 2/2] net: ravb: Check that GTI loading request is done Claudiu
2023-12-14 12:33 ` Niklas Söderlund
2023-12-14 13:02 ` claudiu beznea
2023-12-14 20:22 ` Sergey Shtylyov
2023-12-15 10:13 ` claudiu beznea [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9c5f9c23-d28f-4400-a113-1bafc8f349b8@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=biju.das.jz@bp.renesas.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geert+renesas@glider.be \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mitsuhiro.kimura.kc@renesas.com \
--cc=netdev@vger.kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=pabeni@redhat.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=s.shtylyov@omp.ru \
--cc=wsa+renesas@sang-engineering.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).