From: Heiner Kallweit <hkallweit1@gmail.com>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>, nic_swsd@realtek.com
Cc: "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 v3] r8169: Fix PCI error on system resume
Date: Fri, 22 Dec 2023 18:38:51 +0100 [thread overview]
Message-ID: <e8dd259a-85d0-4c9f-9382-ae8f3097939d@gmail.com> (raw)
In-Reply-To: <20231222043410.464730-1-kai.heng.feng@canonical.com>
On 22.12.2023 05:34, Kai-Heng Feng wrote:
> Some r8168 NICs stop working upon system resume:
>
> [ 688.051096] r8169 0000:02:00.1 enp2s0f1: rtl_ep_ocp_read_cond == 0 (loop: 10, delay: 10000).
> [ 688.175131] r8169 0000:02:00.1 enp2s0f1: Link is Down
> ...
> [ 691.534611] r8169 0000:02:00.1 enp2s0f1: PCI error (cmd = 0x0407, status_errs = 0x0000)
>
> Not sure if it's related, but those NICs have a BMC device at function
> 0:
> 02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Realtek RealManage BMC [10ec:816e] (rev 1a)
>
> Trial and error shows that increase the loop wait on
> rtl_ep_ocp_read_cond to 30 can eliminate the issue, so let
> rtl8168ep_driver_start() to wait a bit longer.
>
> Fixes: e6d6ca6e1204 ("r8169: Add support for another RTL8168FP")
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
> v3:
> - Wording
> - Add Fixes tag
> - Denote 'net' in subject
>
> v2:
> - Wording
>
> drivers/net/ethernet/realtek/r8169_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index bb787a52bc75..81fd31f6fac4 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -1211,7 +1211,7 @@ static void rtl8168ep_driver_start(struct rtl8169_private *tp)
> {
> r8168ep_ocp_write(tp, 0x01, 0x180, OOB_CMD_DRIVER_START);
> r8168ep_ocp_write(tp, 0x01, 0x30, r8168ep_ocp_read(tp, 0x30) | 0x01);
> - rtl_loop_wait_high(tp, &rtl_ep_ocp_read_cond, 10000, 10);
> + rtl_loop_wait_high(tp, &rtl_ep_ocp_read_cond, 10000, 30);
> }
>
> static void rtl8168_driver_start(struct rtl8169_private *tp)
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
next prev parent reply other threads:[~2023-12-22 17:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-22 4:34 [PATCH net v3] r8169: Fix PCI error on system resume Kai-Heng Feng
2023-12-22 17:38 ` Heiner Kallweit [this message]
2024-01-01 14:50 ` patchwork-bot+netdevbpf
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=e8dd259a-85d0-4c9f-9382-ae8f3097939d@gmail.com \
--to=hkallweit1@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kai.heng.feng@canonical.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.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;
as well as URLs for NNTP newsgroup(s).