提交 59715171 编写于 作者: H Heiner Kallweit 提交者: David S. Miller

r8169: fix MAC address being lost in PCI D3

(At least) RTL8168e forgets its MAC address in PCI D3. To fix this set
the MAC address when resuming. For resuming from runtime-suspend we
had this in place already, for resuming from S3/S5 it was missing.

The commit referenced as being fixed isn't wrong, it's just the first
one where the patch applies cleanly.

Fixes: 0f07bd85 ("r8169: use dev_get_drvdata where possible")
Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
Reported-by: NAlbert Astals Cid <aacid@kde.org>
Tested-by: NAlbert Astals Cid <aacid@kde.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 200c6758
......@@ -6722,6 +6722,8 @@ static int rtl8169_resume(struct device *device)
struct net_device *dev = dev_get_drvdata(device);
struct rtl8169_private *tp = netdev_priv(dev);
rtl_rar_set(tp, dev->dev_addr);
clk_prepare_enable(tp->clk);
if (netif_running(dev))
......@@ -6755,6 +6757,7 @@ static int rtl8169_runtime_resume(struct device *device)
{
struct net_device *dev = dev_get_drvdata(device);
struct rtl8169_private *tp = netdev_priv(dev);
rtl_rar_set(tp, dev->dev_addr);
if (!tp->TxDescArray)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册