diff options
author | françois romieu <romieu@fr.zoreil.com> | 2011-01-07 21:17:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-09 21:15:08 -0500 |
commit | eee3a96c6368f47df8df5bd4ed1843600652b337 (patch) | |
tree | c97fb17df1400e0da70d5cbeb07eec2eeed2d835 /drivers/net/r8169.c | |
parent | 697d0e338c7fd392cf73bf120150ab6e5516a3a3 (diff) |
r8169: delay phy init until device opens.
It workarounds the 60s firmware load failure timeout for the
non-modular case.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r-- | drivers/net/r8169.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 27a7c20f64cd..dd758cdb55c4 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -3069,15 +3069,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3069 | rtl8168_driver_start(tp); | 3069 | rtl8168_driver_start(tp); |
3070 | } | 3070 | } |
3071 | 3071 | ||
3072 | rtl8169_init_phy(dev, tp); | ||
3073 | |||
3074 | /* | ||
3075 | * Pretend we are using VLANs; This bypasses a nasty bug where | ||
3076 | * Interrupts stop flowing on high load on 8110SCd controllers. | ||
3077 | */ | ||
3078 | if (tp->mac_version == RTL_GIGA_MAC_VER_05) | ||
3079 | RTL_W16(CPlusCmd, RTL_R16(CPlusCmd) | RxVlan); | ||
3080 | |||
3081 | device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL); | 3072 | device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL); |
3082 | 3073 | ||
3083 | if (pci_dev_run_wake(pdev)) | 3074 | if (pci_dev_run_wake(pdev)) |
@@ -3127,6 +3118,7 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev) | |||
3127 | static int rtl8169_open(struct net_device *dev) | 3118 | static int rtl8169_open(struct net_device *dev) |
3128 | { | 3119 | { |
3129 | struct rtl8169_private *tp = netdev_priv(dev); | 3120 | struct rtl8169_private *tp = netdev_priv(dev); |
3121 | void __iomem *ioaddr = tp->mmio_addr; | ||
3130 | struct pci_dev *pdev = tp->pci_dev; | 3122 | struct pci_dev *pdev = tp->pci_dev; |
3131 | int retval = -ENOMEM; | 3123 | int retval = -ENOMEM; |
3132 | 3124 | ||
@@ -3162,6 +3154,15 @@ static int rtl8169_open(struct net_device *dev) | |||
3162 | 3154 | ||
3163 | napi_enable(&tp->napi); | 3155 | napi_enable(&tp->napi); |
3164 | 3156 | ||
3157 | rtl8169_init_phy(dev, tp); | ||
3158 | |||
3159 | /* | ||
3160 | * Pretend we are using VLANs; This bypasses a nasty bug where | ||
3161 | * Interrupts stop flowing on high load on 8110SCd controllers. | ||
3162 | */ | ||
3163 | if (tp->mac_version == RTL_GIGA_MAC_VER_05) | ||
3164 | RTL_W16(CPlusCmd, RTL_R16(CPlusCmd) | RxVlan); | ||
3165 | |||
3165 | rtl_pll_power_up(tp); | 3166 | rtl_pll_power_up(tp); |
3166 | 3167 | ||
3167 | rtl_hw_start(dev); | 3168 | rtl_hw_start(dev); |
@@ -3171,7 +3172,7 @@ static int rtl8169_open(struct net_device *dev) | |||
3171 | tp->saved_wolopts = 0; | 3172 | tp->saved_wolopts = 0; |
3172 | pm_runtime_put_noidle(&pdev->dev); | 3173 | pm_runtime_put_noidle(&pdev->dev); |
3173 | 3174 | ||
3174 | rtl8169_check_link_status(dev, tp, tp->mmio_addr); | 3175 | rtl8169_check_link_status(dev, tp, ioaddr); |
3175 | out: | 3176 | out: |
3176 | return retval; | 3177 | return retval; |
3177 | 3178 | ||