[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <06d5b5ab8833445691a26e238235f9a0@realtek.com>
Date: Thu, 6 Oct 2022 14:23:08 +0000
From: Hau <hau@...ltek.com>
To: Heiner Kallweit <hkallweit1@...il.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
nic_swsd <nic_swsd@...ltek.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"grundler@...omium.org" <grundler@...omium.org>
Subject: RE: [PATCH net] r8169: fix rtl8125b dmar pte write access not set error
>
> I think the following simple change should also fix the issue.
> DMA is enabled only after the chip has been reset in rtl_reset_work().
> This should ensure that there are no stale RX DMA descriptors any longer.
> Could you please test it?
>
>
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c
> b/drivers/net/ethernet/realtek/r8169_main.c
> index 114f88497..1d72691a4 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -4610,13 +4610,13 @@ static void rtl8169_down(struct rtl8169_private
> *tp)
>
> static void rtl8169_up(struct rtl8169_private *tp) {
> - pci_set_master(tp->pci_dev);
> phy_init_hw(tp->phydev);
> phy_resume(tp->phydev);
> rtl8169_init_phy(tp);
> napi_enable(&tp->napi);
> set_bit(RTL_FLAG_TASK_ENABLED, tp->wk.flags);
> rtl_reset_work(tp);
> + pci_set_master(tp->pci_dev);
>
> phy_start(tp->phydev);
> }
> --
> 2.38.0
>
This can fix the issue. But it will cause another error message " rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100)".
Because if rx is enabled, packet will be move to fifo. When driver check if fifo is empty on device open,
hardware will not dma this packet because bus master is disabled, fifo will always not empty.
So it might be better to disable txrx when close device.
------Please consider the environment before printing this e-mail.
Powered by blists - more mailing lists