@@ -4726,6 +4726,9 @@ static void rtl8169_down(struct rtl8169_
rtl8169_update_counters(tp);
+ pci_clear_master(tp->pci_dev);
+ rtl_pci_commit(tp);
+
rtl8169_cleanup(tp, true);
rtl_pll_power_down(tp);
@@ -4733,6 +4736,7 @@ static void rtl8169_down(struct rtl8169_
static void rtl8169_up(struct rtl8169_private *tp)
{
+ pci_set_master(tp->pci_dev);
rtl_pll_power_up(tp);
rtl8169_init_phy(tp);
napi_enable(&tp->napi);
@@ -5394,8 +5398,6 @@ static int rtl_init_one(struct pci_dev *
rtl_hw_reset(tp);
- pci_set_master(pdev);
-
rc = rtl_alloc_irq(tp);
if (rc < 0) {
dev_err(&pdev->dev, "Can't allocate interrupt\n");