From: Pavel Machek This should fix confusion in network device drivers. No code changes. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton --- 25-akpm/drivers/net/3c59x.c | 2 +- 25-akpm/drivers/net/8139too.c | 2 +- 25-akpm/drivers/net/amd8111e.c | 2 +- 25-akpm/drivers/net/b44.c | 2 +- 25-akpm/drivers/net/e100.c | 4 ++-- 25-akpm/drivers/net/eepro100.c | 6 +++--- 25-akpm/drivers/net/epic100.c | 2 +- 25-akpm/drivers/net/irda/donauboe.c | 2 +- 25-akpm/drivers/net/natsemi.c | 2 +- 25-akpm/drivers/net/ne2k-pci.c | 4 ++-- 25-akpm/drivers/net/sis900.c | 2 +- 25-akpm/drivers/net/sungem.c | 2 +- 25-akpm/drivers/net/tg3.c | 4 ++-- 25-akpm/drivers/net/tulip/tulip_core.c | 2 +- 25-akpm/drivers/net/typhoon.c | 10 +++++----- 25-akpm/drivers/net/via-rhine.c | 2 +- 25-akpm/drivers/net/via-velocity.c | 4 ++-- 17 files changed, 27 insertions(+), 27 deletions(-) diff -puN drivers/net/3c59x.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/3c59x.c --- 25/drivers/net/3c59x.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/3c59x.c 2005-02-22 18:55:36.000000000 -0800 @@ -964,7 +964,7 @@ static void poll_vortex(struct net_devic #ifdef CONFIG_PM -static int vortex_suspend (struct pci_dev *pdev, u32 state) +static int vortex_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); diff -puN drivers/net/8139too.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/8139too.c --- 25/drivers/net/8139too.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/8139too.c 2005-02-22 18:55:36.000000000 -0800 @@ -2558,7 +2558,7 @@ static void rtl8139_set_rx_mode (struct #ifdef CONFIG_PM -static int rtl8139_suspend (struct pci_dev *pdev, u32 state) +static int rtl8139_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata (pdev); struct rtl8139_private *tp = netdev_priv(dev); diff -puN drivers/net/amd8111e.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/amd8111e.c --- 25/drivers/net/amd8111e.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/amd8111e.c 2005-02-22 18:55:36.000000000 -0800 @@ -1797,7 +1797,7 @@ static void amd8111e_tx_timeout(struct n if(!err) netif_wake_queue(dev); } -static int amd8111e_suspend(struct pci_dev *pci_dev, u32 state) +static int amd8111e_suspend(struct pci_dev *pci_dev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pci_dev); struct amd8111e_priv *lp = netdev_priv(dev); diff -puN drivers/net/b44.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/b44.c --- 25/drivers/net/b44.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/b44.c 2005-02-22 18:55:36.000000000 -0800 @@ -1910,7 +1910,7 @@ static void __devexit b44_remove_one(str } } -static int b44_suspend(struct pci_dev *pdev, u32 state) +static int b44_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); struct b44 *bp = netdev_priv(dev); diff -puN drivers/net/e100.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/e100.c --- 25/drivers/net/e100.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/e100.c 2005-02-22 18:55:36.000000000 -0800 @@ -2310,7 +2310,7 @@ static void __devexit e100_remove(struct } #ifdef CONFIG_PM -static int e100_suspend(struct pci_dev *pdev, u32 state) +static int e100_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *netdev = pci_get_drvdata(pdev); struct nic *nic = netdev_priv(netdev); @@ -2321,7 +2321,7 @@ static int e100_suspend(struct pci_dev * netif_device_detach(netdev); pci_save_state(pdev); - pci_enable_wake(pdev, state, nic->flags & (wol_magic | e100_asf(nic))); + pci_enable_wake(pdev, pci_choose_state(pdev, state), nic->flags & (wol_magic | e100_asf(nic))); pci_disable_device(pdev); pci_set_power_state(pdev, pci_choose_state(pdev, state)); diff -puN drivers/net/eepro100.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/eepro100.c --- 25/drivers/net/eepro100.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/eepro100.c 2005-02-22 18:55:36.000000000 -0800 @@ -2271,7 +2271,7 @@ static void set_rx_mode(struct net_devic } #ifdef CONFIG_PM -static int eepro100_suspend(struct pci_dev *pdev, u32 state) +static int eepro100_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata (pdev); struct speedo_private *sp = netdev_priv(dev); @@ -2289,7 +2289,7 @@ static int eepro100_suspend(struct pci_d /* XXX call pci_set_power_state ()? */ pci_disable_device(pdev); - pci_set_power_state (pdev, 3); + pci_set_power_state (pdev, PCI_D3hot); return 0; } @@ -2299,7 +2299,7 @@ static int eepro100_resume(struct pci_de struct speedo_private *sp = netdev_priv(dev); void __iomem *ioaddr = sp->regs; - pci_set_power_state(pdev, 0); + pci_set_power_state(pdev, PCI_D0); pci_restore_state(pdev); pci_enable_device(pdev); pci_set_master(pdev); diff -puN drivers/net/epic100.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/epic100.c --- 25/drivers/net/epic100.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/epic100.c 2005-02-22 18:55:36.000000000 -0800 @@ -1624,7 +1624,7 @@ static void __devexit epic_remove_one (s #ifdef CONFIG_PM -static int epic_suspend (struct pci_dev *pdev, u32 state) +static int epic_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); long ioaddr = dev->base_addr; diff -puN drivers/net/irda/donauboe.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/irda/donauboe.c --- 25/drivers/net/irda/donauboe.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/irda/donauboe.c 2005-02-22 18:55:36.000000000 -0800 @@ -1712,7 +1712,7 @@ freeself: } static int -toshoboe_gotosleep (struct pci_dev *pci_dev, u32 crap) +toshoboe_gotosleep (struct pci_dev *pci_dev, pm_message_t crap) { struct toshoboe_cb *self = (struct toshoboe_cb*)pci_get_drvdata(pci_dev); unsigned long flags; diff -puN drivers/net/natsemi.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/natsemi.c --- 25/drivers/net/natsemi.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/natsemi.c 2005-02-22 18:55:37.000000000 -0800 @@ -3173,7 +3173,7 @@ static void __devexit natsemi_remove1 (s * Interrupts must be disabled, otherwise hands_off can cause irq storms. */ -static int natsemi_suspend (struct pci_dev *pdev, u32 state) +static int natsemi_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata (pdev); struct netdev_private *np = netdev_priv(dev); diff -puN drivers/net/ne2k-pci.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/ne2k-pci.c --- 25/drivers/net/ne2k-pci.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/ne2k-pci.c 2005-02-22 18:55:37.000000000 -0800 @@ -654,13 +654,13 @@ static void __devexit ne2k_pci_remove_on } #ifdef CONFIG_PM -static int ne2k_pci_suspend (struct pci_dev *pdev, u32 state) +static int ne2k_pci_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata (pdev); netif_device_detach(dev); pci_save_state(pdev); - pci_set_power_state(pdev, state); + pci_set_power_state(pdev, pci_choose_state(pdev, state)); return 0; } diff -puN drivers/net/sis900.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/sis900.c --- 25/drivers/net/sis900.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/sis900.c 2005-02-22 18:55:37.000000000 -0800 @@ -2267,7 +2267,7 @@ static void __devexit sis900_remove(stru #ifdef CONFIG_PM -static int sis900_suspend(struct pci_dev *pci_dev, u32 state) +static int sis900_suspend(struct pci_dev *pci_dev, pm_message_t state) { struct net_device *net_dev = pci_get_drvdata(pci_dev); long ioaddr = net_dev->base_addr; diff -puN drivers/net/sungem.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/sungem.c --- 25/drivers/net/sungem.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/sungem.c 2005-02-22 18:55:37.000000000 -0800 @@ -2356,7 +2356,7 @@ static int gem_close(struct net_device * } #ifdef CONFIG_PM -static int gem_suspend(struct pci_dev *pdev, u32 state) +static int gem_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); struct gem *gp = dev->priv; diff -puN drivers/net/tg3.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/tg3.c --- 25/drivers/net/tg3.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/tg3.c 2005-02-22 18:55:37.000000000 -0800 @@ -8940,7 +8940,7 @@ static void __devexit tg3_remove_one(str } } -static int tg3_suspend(struct pci_dev *pdev, u32 state) +static int tg3_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); struct tg3 *tp = netdev_priv(dev); @@ -8967,7 +8967,7 @@ static int tg3_suspend(struct pci_dev *p spin_unlock(&tp->tx_lock); spin_unlock_irq(&tp->lock); - err = tg3_set_power_state(tp, state); + err = tg3_set_power_state(tp, pci_choose_state(pdev, state)); if (err) { spin_lock_irq(&tp->lock); spin_lock(&tp->tx_lock); diff -puN drivers/net/tulip/tulip_core.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/tulip/tulip_core.c --- 25/drivers/net/tulip/tulip_core.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/tulip/tulip_core.c 2005-02-22 18:55:37.000000000 -0800 @@ -1749,7 +1749,7 @@ err_out_free_netdev: #ifdef CONFIG_PM -static int tulip_suspend (struct pci_dev *pdev, u32 state) +static int tulip_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); diff -puN drivers/net/typhoon.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/typhoon.c --- 25/drivers/net/typhoon.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/typhoon.c 2005-02-22 18:55:37.000000000 -0800 @@ -1874,7 +1874,7 @@ typhoon_free_rx_rings(struct typhoon *tp } static int -typhoon_sleep(struct typhoon *tp, int state, u16 events) +typhoon_sleep(struct typhoon *tp, pci_power_t state, u16 events) { struct pci_dev *pdev = tp->pdev; void __iomem *ioaddr = tp->ioaddr; @@ -2155,7 +2155,7 @@ out_sleep: goto out; } - if(typhoon_sleep(tp, 3, 0) < 0) + if(typhoon_sleep(tp, PCI_D3hot, 0) < 0) printk(KERN_ERR "%s: unable to go back to sleep\n", dev->name); out: @@ -2182,7 +2182,7 @@ typhoon_close(struct net_device *dev) if(typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST) < 0) printk(KERN_ERR "%s: unable to boot sleep image\n", dev->name); - if(typhoon_sleep(tp, 3, 0) < 0) + if(typhoon_sleep(tp, PCI_D3hot, 0) < 0) printk(KERN_ERR "%s: unable to put card to sleep\n", dev->name); return 0; @@ -2222,7 +2222,7 @@ reset: } static int -typhoon_suspend(struct pci_dev *pdev, u32 state) +typhoon_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); struct typhoon *tp = netdev_priv(dev); @@ -2532,7 +2532,7 @@ typhoon_init_one(struct pci_dev *pdev, c if(xp_resp[0].numDesc != 0) tp->capabilities |= TYPHOON_WAKEUP_NEEDS_RESET; - if(typhoon_sleep(tp, 3, 0) < 0) { + if(typhoon_sleep(tp, PCI_D3hot, 0) < 0) { printk(ERR_PFX "%s: cannot put adapter to sleep\n", pci_name(pdev)); err = -EIO; diff -puN drivers/net/via-rhine.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/via-rhine.c --- 25/drivers/net/via-rhine.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/via-rhine.c 2005-02-22 18:55:37.000000000 -0800 @@ -1937,7 +1937,7 @@ static void rhine_shutdown (struct devic } #ifdef CONFIG_PM -static int rhine_suspend(struct pci_dev *pdev, u32 state) +static int rhine_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); struct rhine_private *rp = netdev_priv(dev); diff -puN drivers/net/via-velocity.c~fix-u32-vs-pm_message_t-in-network-device-drivers drivers/net/via-velocity.c --- 25/drivers/net/via-velocity.c~fix-u32-vs-pm_message_t-in-network-device-drivers 2005-02-22 18:55:36.000000000 -0800 +++ 25-akpm/drivers/net/via-velocity.c 2005-02-22 18:55:37.000000000 -0800 @@ -263,7 +263,7 @@ static int velocity_set_media_mode(struc #ifdef CONFIG_PM -static int velocity_suspend(struct pci_dev *pdev, u32 state); +static int velocity_suspend(struct pci_dev *pdev, pm_message_t state); static int velocity_resume(struct pci_dev *pdev); static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr); @@ -3210,7 +3210,7 @@ static int velocity_set_wol(struct veloc return 0; } -static int velocity_suspend(struct pci_dev *pdev, u32 state) +static int velocity_suspend(struct pci_dev *pdev, pm_message_t state) { struct velocity_info *vptr = pci_get_drvdata(pdev); unsigned long flags; _