diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 14:44:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 14:44:36 -0400 |
commit | 1cfd2bda8c486ae0e7a8005354758ebb68172bca (patch) | |
tree | 76ce15f377d8d6eb3ae4aa8b8b0b415457e38d36 /drivers/net | |
parent | b57bdda58cda0aaf6def042d101dd85977a286ed (diff) | |
parent | 763e9db9994e27a7d2cb3701c8a097a867d0e0b4 (diff) |
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (30 commits)
PCI: update for owner removal from struct device_attribute
PCI: Fix warnings when CONFIG_DMI unset
PCI: Do not run NVidia quirks related to MSI with MSI disabled
x86/PCI: use for_each_pci_dev()
PCI: use for_each_pci_dev()
PCI: MSI: Restore read_msi_msg_desc(); add get_cached_msi_msg_desc()
PCI: export SMBIOS provided firmware instance and label to sysfs
PCI: Allow read/write access to sysfs I/O port resources
x86/PCI: use host bridge _CRS info on ASRock ALiveSATA2-GLAN
PCI: remove unused HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_{SIZE|BOUNDARY}
PCI: disable mmio during bar sizing
PCI: MSI: Remove unsafe and unnecessary hardware access
PCI: Default PCIe ASPM control to on and require !EMBEDDED to disable
PCI: kernel oops on access to pci proc file while hot-removal
PCI: pci-sysfs: remove casts from void*
ACPI: Disable ASPM if the platform won't provide _OSC control for PCIe
PCI hotplug: make sure child bridges are enabled at hotplug time
PCI hotplug: shpchp: Removed check for hotplug of display devices
PCI hotplug: pciehp: Fixed return value sign for pciehp_unconfigure_device
PCI: Don't enable aspm before drivers have had a chance to veto it
...
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 16 | ||||
-rw-r--r-- | drivers/net/r8169.c | 16 |
2 files changed, 8 insertions, 24 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 36d31a416320..521c6ee1f32a 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -5825,11 +5825,8 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
5825 | 5825 | ||
5826 | e1000_print_device_info(adapter); | 5826 | e1000_print_device_info(adapter); |
5827 | 5827 | ||
5828 | if (pci_dev_run_wake(pdev)) { | 5828 | if (pci_dev_run_wake(pdev)) |
5829 | pm_runtime_set_active(&pdev->dev); | 5829 | pm_runtime_put_noidle(&pdev->dev); |
5830 | pm_runtime_enable(&pdev->dev); | ||
5831 | } | ||
5832 | pm_schedule_suspend(&pdev->dev, MSEC_PER_SEC); | ||
5833 | 5830 | ||
5834 | return 0; | 5831 | return 0; |
5835 | 5832 | ||
@@ -5875,8 +5872,6 @@ static void __devexit e1000_remove(struct pci_dev *pdev) | |||
5875 | struct e1000_adapter *adapter = netdev_priv(netdev); | 5872 | struct e1000_adapter *adapter = netdev_priv(netdev); |
5876 | bool down = test_bit(__E1000_DOWN, &adapter->state); | 5873 | bool down = test_bit(__E1000_DOWN, &adapter->state); |
5877 | 5874 | ||
5878 | pm_runtime_get_sync(&pdev->dev); | ||
5879 | |||
5880 | /* | 5875 | /* |
5881 | * flush_scheduled work may reschedule our watchdog task, so | 5876 | * flush_scheduled work may reschedule our watchdog task, so |
5882 | * explicitly disable watchdog tasks from being rescheduled | 5877 | * explicitly disable watchdog tasks from being rescheduled |
@@ -5901,11 +5896,8 @@ static void __devexit e1000_remove(struct pci_dev *pdev) | |||
5901 | clear_bit(__E1000_DOWN, &adapter->state); | 5896 | clear_bit(__E1000_DOWN, &adapter->state); |
5902 | unregister_netdev(netdev); | 5897 | unregister_netdev(netdev); |
5903 | 5898 | ||
5904 | if (pci_dev_run_wake(pdev)) { | 5899 | if (pci_dev_run_wake(pdev)) |
5905 | pm_runtime_disable(&pdev->dev); | 5900 | pm_runtime_get_noresume(&pdev->dev); |
5906 | pm_runtime_set_suspended(&pdev->dev); | ||
5907 | } | ||
5908 | pm_runtime_put_noidle(&pdev->dev); | ||
5909 | 5901 | ||
5910 | /* | 5902 | /* |
5911 | * Release control of h/w to f/w. If f/w is AMT enabled, this | 5903 | * Release control of h/w to f/w. If f/w is AMT enabled, this |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 35540411990d..078bbf4e6f19 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -3219,11 +3219,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3219 | 3219 | ||
3220 | device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL); | 3220 | device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL); |
3221 | 3221 | ||
3222 | if (pci_dev_run_wake(pdev)) { | 3222 | if (pci_dev_run_wake(pdev)) |
3223 | pm_runtime_set_active(&pdev->dev); | 3223 | pm_runtime_put_noidle(&pdev->dev); |
3224 | pm_runtime_enable(&pdev->dev); | ||
3225 | } | ||
3226 | pm_runtime_idle(&pdev->dev); | ||
3227 | 3224 | ||
3228 | out: | 3225 | out: |
3229 | return rc; | 3226 | return rc; |
@@ -3246,17 +3243,12 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev) | |||
3246 | struct net_device *dev = pci_get_drvdata(pdev); | 3243 | struct net_device *dev = pci_get_drvdata(pdev); |
3247 | struct rtl8169_private *tp = netdev_priv(dev); | 3244 | struct rtl8169_private *tp = netdev_priv(dev); |
3248 | 3245 | ||
3249 | pm_runtime_get_sync(&pdev->dev); | ||
3250 | |||
3251 | flush_scheduled_work(); | 3246 | flush_scheduled_work(); |
3252 | 3247 | ||
3253 | unregister_netdev(dev); | 3248 | unregister_netdev(dev); |
3254 | 3249 | ||
3255 | if (pci_dev_run_wake(pdev)) { | 3250 | if (pci_dev_run_wake(pdev)) |
3256 | pm_runtime_disable(&pdev->dev); | 3251 | pm_runtime_get_noresume(&pdev->dev); |
3257 | pm_runtime_set_suspended(&pdev->dev); | ||
3258 | } | ||
3259 | pm_runtime_put_noidle(&pdev->dev); | ||
3260 | 3252 | ||
3261 | /* restore original MAC address */ | 3253 | /* restore original MAC address */ |
3262 | rtl_rar_set(tp, dev->perm_addr); | 3254 | rtl_rar_set(tp, dev->perm_addr); |