From: Linus Walleij <linusw@kernel.org>
To: Stanislaw Pal <kuncy7@gmail.com>
Cc: "Luiz Angelo Daros de Luca" <luizluca@gmail.com>,
"Alvin Šipraga" <alvin.sipraga@analog.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Vladimir Oltean" <olteanv@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3] net: dsa: realtek: rtl8365mb: wait out the full chip reset time
Date: Wed, 9 Sep 2026 14:30:13 +0200 [thread overview]
Message-ID: <CAD++jLm4KOheiTFeJsBNABap4vMa3NhfYaX-rWAiNs5VRTOJOA@mail.gmail.com> (raw)
In-Reply-To: <20260909120825.33350-1-kuncy7@gmail.com>
On Wed, Sep 9, 2026 at 2:08 PM Stanislaw Pal <kuncy7@gmail.com> wrote:
> Realtek documentation gives the chip 1 second to reset, and the driver
> says so in a comment, but it only sleeps 100 ms and then polls the reset
> bit and continues as soon as that bit clears. The bit reports that the
> register block is back, not that the chip has finished its internal
> bring-up: Luiz notes that older parts such as the RTL8367R need
> noticeable extra time after it clears, so a driver that keys off the bit
> alone is relying on that margin being zero.
>
> Sleep out the documented second before touching anything, then read the
> bit once and fail with -ETIMEDOUT if the chip has not come out of reset.
>
> Probe therefore takes 1 s on every chip the driver supports, not only on
> the part this was found on.
>
> Signed-off-by: Stanislaw Pal <kuncy7@gmail.com>
(...)
> I have deliberately not carried Linus's Reviewed-by from v2, since this
> revision replaces the implementation he reviewed.
OK this works too, I was too quick in endorsing the hairy microoptimization.
Reviewed-by: Linus Walleij <linusw@kernel.org>
Yours,
Linus Walleij
next prev parent reply other threads:[~2026-09-09 12:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 12:08 Stanislaw Pal
2026-09-09 12:30 ` Linus Walleij [this message]
2026-09-09 13:55 ` Alvin Šipraga
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=CAD++jLm4KOheiTFeJsBNABap4vMa3NhfYaX-rWAiNs5VRTOJOA@mail.gmail.com \
--to=linusw@kernel.org \
--cc=alvin.sipraga@analog.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=kuncy7@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luizluca@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®