Re: [-mm PATCH] driver model: PM type conversions in drivers/net
On Fri, Feb 04, 2005 at 08:01:17PM -0500, Jeff Garzik wrote: > Why does this one have three arguments? Because it's a platform device driver suspend method. -- Russell King Linux kernel2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [-mm PATCH] driver model: PM type conversions in drivers/net
On Fri, Feb 04, 2005 at 08:01:17PM -0500, Jeff Garzik wrote: Why does this one have three arguments? Because it's a platform device driver suspend method. -- Russell King Linux kernel2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [-mm PATCH] driver model: PM type conversions in drivers/net
Daniel Drake wrote: diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/bmac.c linux-dsd/drivers/net/bmac.c --- linux-2.6.11-rc2-mm2/drivers/net/bmac.c 2005-02-02 21:54:17.353663112 + +++ linux-dsd/drivers/net/bmac.c 2005-02-02 20:52:48.0 + @@ -455,7 +455,7 @@ static void bmac_init_chip(struct net_de } #ifdef CONFIG_PM -static int bmac_suspend(struct macio_dev *mdev, u32 state) +static int bmac_suspend(struct macio_dev *mdev, pm_message_t state) { struct net_device* dev = macio_get_drvdata(mdev); struct bmac_data *bp = netdev_priv(dev); diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/irda/sa1100_ir.c linux-dsd/drivers/net/irda/sa1100_ir.c --- linux-2.6.11-rc2-mm2/drivers/net/irda/sa1100_ir.c 2004-12-24 21:35:50.0 + +++ linux-dsd/drivers/net/irda/sa1100_ir.c 2005-02-02 20:59:28.0 + @@ -291,7 +291,7 @@ static void sa1100_irda_shutdown(struct /* * Suspend the IrDA interface. */ -static int sa1100_irda_suspend(struct device *_dev, u32 state, u32 level) +static int sa1100_irda_suspend(struct device *_dev, pm_message_t state, u32 level) Why does this one have three arguments? Jeff - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[-mm PATCH] driver model: PM type conversions in drivers/net
This fixes PM driver model type checking for drivers/net. Acked by Pavel Machek. Signed-off-by: Daniel Drake <[EMAIL PROTECTED]> diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/8139cp.c linux-dsd/drivers/net/8139cp.c --- linux-2.6.11-rc2-mm2/drivers/net/8139cp.c 2005-02-02 21:55:22.417771864 + +++ linux-dsd/drivers/net/8139cp.c 2005-02-02 20:52:06.0 + @@ -1862,7 +1862,7 @@ static void cp_remove_one (struct pci_de } #ifdef CONFIG_PM -static int cp_suspend (struct pci_dev *pdev, u32 state) +static int cp_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev; struct cp_private *cp; diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/bmac.c linux-dsd/drivers/net/bmac.c --- linux-2.6.11-rc2-mm2/drivers/net/bmac.c 2005-02-02 21:54:17.353663112 + +++ linux-dsd/drivers/net/bmac.c 2005-02-02 20:52:48.0 + @@ -455,7 +455,7 @@ static void bmac_init_chip(struct net_de } #ifdef CONFIG_PM -static int bmac_suspend(struct macio_dev *mdev, u32 state) +static int bmac_suspend(struct macio_dev *mdev, pm_message_t state) { struct net_device* dev = macio_get_drvdata(mdev); struct bmac_data *bp = netdev_priv(dev); diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/irda/sa1100_ir.c linux-dsd/drivers/net/irda/sa1100_ir.c --- linux-2.6.11-rc2-mm2/drivers/net/irda/sa1100_ir.c 2004-12-24 21:35:50.0 + +++ linux-dsd/drivers/net/irda/sa1100_ir.c 2005-02-02 20:59:28.0 + @@ -291,7 +291,7 @@ static void sa1100_irda_shutdown(struct /* * Suspend the IrDA interface. */ -static int sa1100_irda_suspend(struct device *_dev, u32 state, u32 level) +static int sa1100_irda_suspend(struct device *_dev, pm_message_t state, u32 level) { struct net_device *dev = dev_get_drvdata(_dev); struct sa1100_irda *si; diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/irda/stir4200.c linux-dsd/drivers/net/irda/stir4200.c --- linux-2.6.11-rc2-mm2/drivers/net/irda/stir4200.c 2005-02-02 21:54:17.0 + +++ linux-dsd/drivers/net/irda/stir4200.c 2005-02-02 20:58:41.0 + @@ -1128,7 +1128,7 @@ static void stir_disconnect(struct usb_i #ifdef CONFIG_PM /* Power management suspend, so power off the transmitter/receiver */ -static int stir_suspend(struct usb_interface *intf, u32 state) +static int stir_suspend(struct usb_interface *intf, pm_message_t state) { struct stir_cb *stir = usb_get_intfdata(intf); diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/irda/vlsi_ir.c linux-dsd/drivers/net/irda/vlsi_ir.c --- linux-2.6.11-rc2-mm2/drivers/net/irda/vlsi_ir.c 2005-02-02 21:54:17.0 + +++ linux-dsd/drivers/net/irda/vlsi_ir.c 2005-02-02 21:19:25.0 + @@ -1737,7 +1737,7 @@ static void __devexit vlsi_irda_remove(s */ -static int vlsi_irda_suspend(struct pci_dev *pdev, u32 state) +static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *ndev = pci_get_drvdata(pdev); vlsi_irda_dev_t *idev; @@ -1755,7 +1755,7 @@ static int vlsi_irda_suspend(struct pci_ down(>sem); if (pdev->current_state != 0) { /* already suspended */ if (state > pdev->current_state) { /* simply go deeper */ - pci_set_power_state(pdev,state); + pci_set_power_state(pdev, pci_choose_state(pdev, state)); pdev->current_state = state; } else @@ -1774,7 +1774,7 @@ static int vlsi_irda_suspend(struct pci_ idev->new_baud = idev->baud; } - pci_set_power_state(pdev,state); + pci_set_power_state(pdev, pci_choose_state(pdev, state)); pdev->current_state = state; idev->resume_ok = 1; up(>sem); @@ -1798,7 +1798,7 @@ static int vlsi_irda_resume(struct pci_d return 0; } - pci_set_power_state(pdev, 0); + pci_set_power_state(pdev, PCI_D0); pdev->current_state = 0; if (!idev->resume_ok) { diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/ixgb/ixgb_main.c linux-dsd/drivers/net/ixgb/ixgb_main.c --- linux-2.6.11-rc2-mm2/drivers/net/ixgb/ixgb_main.c 2005-02-02 21:54:18.0 + +++ linux-dsd/drivers/net/ixgb/ixgb_main.c 2005-02-02 21:20:34.0 + @@ -2101,7 +2101,7 @@ ixgb_notify_reboot(struct notifier_block * @param state power state to enter **/ static int -ixgb_suspend(struct pci_dev *pdev, uint32_t state) +ixgb_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *netdev = pci_get_drvdata(pdev); struct ixgb_adapter *adapter = netdev->priv; @@ -2113,7 +2113,7 @@ ixgb_suspend(struct pci_dev *pdev, uint3 pci_save_state(pdev); - state = (state > 0) ? 3 : 0; + state = (state > 0) ? PCI_D3hot : PCI_D0; pci_set_power_state(pdev, state); msec_delay(200); diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/ne2k-pci.c linux-dsd/drivers/net/ne2k-pci.c --- linux-2.6.11-rc2-mm2/drivers/net/ne2k-pci.c 2005-02-02 21:55:22.999683400 + +++ linux-dsd/drivers/net/ne2k-pci.c 2005-02-02 21:20:52.0 + @@ -669,7 +669,7 @@ static int ne2k_pci_resume (struct pci_d { struct net_device *dev = pci_get_drvdata
[-mm PATCH] driver model: PM type conversions in drivers/net
This fixes PM driver model type checking for drivers/net. Acked by Pavel Machek. Signed-off-by: Daniel Drake [EMAIL PROTECTED] diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/8139cp.c linux-dsd/drivers/net/8139cp.c --- linux-2.6.11-rc2-mm2/drivers/net/8139cp.c 2005-02-02 21:55:22.417771864 + +++ linux-dsd/drivers/net/8139cp.c 2005-02-02 20:52:06.0 + @@ -1862,7 +1862,7 @@ static void cp_remove_one (struct pci_de } #ifdef CONFIG_PM -static int cp_suspend (struct pci_dev *pdev, u32 state) +static int cp_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev; struct cp_private *cp; diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/bmac.c linux-dsd/drivers/net/bmac.c --- linux-2.6.11-rc2-mm2/drivers/net/bmac.c 2005-02-02 21:54:17.353663112 + +++ linux-dsd/drivers/net/bmac.c 2005-02-02 20:52:48.0 + @@ -455,7 +455,7 @@ static void bmac_init_chip(struct net_de } #ifdef CONFIG_PM -static int bmac_suspend(struct macio_dev *mdev, u32 state) +static int bmac_suspend(struct macio_dev *mdev, pm_message_t state) { struct net_device* dev = macio_get_drvdata(mdev); struct bmac_data *bp = netdev_priv(dev); diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/irda/sa1100_ir.c linux-dsd/drivers/net/irda/sa1100_ir.c --- linux-2.6.11-rc2-mm2/drivers/net/irda/sa1100_ir.c 2004-12-24 21:35:50.0 + +++ linux-dsd/drivers/net/irda/sa1100_ir.c 2005-02-02 20:59:28.0 + @@ -291,7 +291,7 @@ static void sa1100_irda_shutdown(struct /* * Suspend the IrDA interface. */ -static int sa1100_irda_suspend(struct device *_dev, u32 state, u32 level) +static int sa1100_irda_suspend(struct device *_dev, pm_message_t state, u32 level) { struct net_device *dev = dev_get_drvdata(_dev); struct sa1100_irda *si; diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/irda/stir4200.c linux-dsd/drivers/net/irda/stir4200.c --- linux-2.6.11-rc2-mm2/drivers/net/irda/stir4200.c 2005-02-02 21:54:17.0 + +++ linux-dsd/drivers/net/irda/stir4200.c 2005-02-02 20:58:41.0 + @@ -1128,7 +1128,7 @@ static void stir_disconnect(struct usb_i #ifdef CONFIG_PM /* Power management suspend, so power off the transmitter/receiver */ -static int stir_suspend(struct usb_interface *intf, u32 state) +static int stir_suspend(struct usb_interface *intf, pm_message_t state) { struct stir_cb *stir = usb_get_intfdata(intf); diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/irda/vlsi_ir.c linux-dsd/drivers/net/irda/vlsi_ir.c --- linux-2.6.11-rc2-mm2/drivers/net/irda/vlsi_ir.c 2005-02-02 21:54:17.0 + +++ linux-dsd/drivers/net/irda/vlsi_ir.c 2005-02-02 21:19:25.0 + @@ -1737,7 +1737,7 @@ static void __devexit vlsi_irda_remove(s */ -static int vlsi_irda_suspend(struct pci_dev *pdev, u32 state) +static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *ndev = pci_get_drvdata(pdev); vlsi_irda_dev_t *idev; @@ -1755,7 +1755,7 @@ static int vlsi_irda_suspend(struct pci_ down(idev-sem); if (pdev-current_state != 0) { /* already suspended */ if (state pdev-current_state) { /* simply go deeper */ - pci_set_power_state(pdev,state); + pci_set_power_state(pdev, pci_choose_state(pdev, state)); pdev-current_state = state; } else @@ -1774,7 +1774,7 @@ static int vlsi_irda_suspend(struct pci_ idev-new_baud = idev-baud; } - pci_set_power_state(pdev,state); + pci_set_power_state(pdev, pci_choose_state(pdev, state)); pdev-current_state = state; idev-resume_ok = 1; up(idev-sem); @@ -1798,7 +1798,7 @@ static int vlsi_irda_resume(struct pci_d return 0; } - pci_set_power_state(pdev, 0); + pci_set_power_state(pdev, PCI_D0); pdev-current_state = 0; if (!idev-resume_ok) { diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/ixgb/ixgb_main.c linux-dsd/drivers/net/ixgb/ixgb_main.c --- linux-2.6.11-rc2-mm2/drivers/net/ixgb/ixgb_main.c 2005-02-02 21:54:18.0 + +++ linux-dsd/drivers/net/ixgb/ixgb_main.c 2005-02-02 21:20:34.0 + @@ -2101,7 +2101,7 @@ ixgb_notify_reboot(struct notifier_block * @param state power state to enter **/ static int -ixgb_suspend(struct pci_dev *pdev, uint32_t state) +ixgb_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *netdev = pci_get_drvdata(pdev); struct ixgb_adapter *adapter = netdev-priv; @@ -2113,7 +2113,7 @@ ixgb_suspend(struct pci_dev *pdev, uint3 pci_save_state(pdev); - state = (state 0) ? 3 : 0; + state = (state 0) ? PCI_D3hot : PCI_D0; pci_set_power_state(pdev, state); msec_delay(200); diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/ne2k-pci.c linux-dsd/drivers/net/ne2k-pci.c --- linux-2.6.11-rc2-mm2/drivers/net/ne2k-pci.c 2005-02-02 21:55:22.999683400 + +++ linux-dsd/drivers/net/ne2k-pci.c 2005-02-02 21:20:52.0 + @@ -669,7 +669,7 @@ static int ne2k_pci_resume (struct pci_d { struct net_device *dev = pci_get_drvdata (pdev); -
Re: [-mm PATCH] driver model: PM type conversions in drivers/net
Daniel Drake wrote: diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/bmac.c linux-dsd/drivers/net/bmac.c --- linux-2.6.11-rc2-mm2/drivers/net/bmac.c 2005-02-02 21:54:17.353663112 + +++ linux-dsd/drivers/net/bmac.c 2005-02-02 20:52:48.0 + @@ -455,7 +455,7 @@ static void bmac_init_chip(struct net_de } #ifdef CONFIG_PM -static int bmac_suspend(struct macio_dev *mdev, u32 state) +static int bmac_suspend(struct macio_dev *mdev, pm_message_t state) { struct net_device* dev = macio_get_drvdata(mdev); struct bmac_data *bp = netdev_priv(dev); diff -urNpX dontdiff linux-2.6.11-rc2-mm2/drivers/net/irda/sa1100_ir.c linux-dsd/drivers/net/irda/sa1100_ir.c --- linux-2.6.11-rc2-mm2/drivers/net/irda/sa1100_ir.c 2004-12-24 21:35:50.0 + +++ linux-dsd/drivers/net/irda/sa1100_ir.c 2005-02-02 20:59:28.0 + @@ -291,7 +291,7 @@ static void sa1100_irda_shutdown(struct /* * Suspend the IrDA interface. */ -static int sa1100_irda_suspend(struct device *_dev, u32 state, u32 level) +static int sa1100_irda_suspend(struct device *_dev, pm_message_t state, u32 level) Why does this one have three arguments? Jeff - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/