Commit ee7a1beb authored by Chun-Hao Lin's avatar Chun-Hao Lin Committed by David S. Miller

r8169:call "rtl8168_driver_start" "rtl8168_driver_stop" only when hardware dash function is enabled

These two functions are used to inform dash firmware that driver is been
brought up or brought down. So call these two functions only when hardware dash
function is enabled.
Signed-off-by: default avatarChun-Hao Lin <hau@realtek.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2a9b4d96
...@@ -7387,9 +7387,10 @@ static void rtl_remove_one(struct pci_dev *pdev) ...@@ -7387,9 +7387,10 @@ static void rtl_remove_one(struct pci_dev *pdev)
struct net_device *dev = pci_get_drvdata(pdev); struct net_device *dev = pci_get_drvdata(pdev);
struct rtl8169_private *tp = netdev_priv(dev); struct rtl8169_private *tp = netdev_priv(dev);
if (tp->mac_version == RTL_GIGA_MAC_VER_27 || if ((tp->mac_version == RTL_GIGA_MAC_VER_27 ||
tp->mac_version == RTL_GIGA_MAC_VER_28 || tp->mac_version == RTL_GIGA_MAC_VER_28 ||
tp->mac_version == RTL_GIGA_MAC_VER_31) { tp->mac_version == RTL_GIGA_MAC_VER_31) &&
r8168_check_dash(tp)) {
rtl8168_driver_stop(tp); rtl8168_driver_stop(tp);
} }
...@@ -7822,9 +7823,10 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -7822,9 +7823,10 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
rtl_chip_infos[chipset].jumbo_tx_csum ? "ok" : "ko"); rtl_chip_infos[chipset].jumbo_tx_csum ? "ok" : "ko");
} }
if (tp->mac_version == RTL_GIGA_MAC_VER_27 || if ((tp->mac_version == RTL_GIGA_MAC_VER_27 ||
tp->mac_version == RTL_GIGA_MAC_VER_28 || tp->mac_version == RTL_GIGA_MAC_VER_28 ||
tp->mac_version == RTL_GIGA_MAC_VER_31) { tp->mac_version == RTL_GIGA_MAC_VER_31) &&
r8168_check_dash(tp)) {
rtl8168_driver_start(tp); rtl8168_driver_start(tp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment