aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2005-09-03 18:56:56 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 03:06:15 -0400
commit829ca9a30a2ddb727981d80fabdbff2ea86bc9ea (patch)
tree044087fb18aa4b5f5bbd233f54f9eec3439ad6de /drivers/net/bnx2.c
parent7e958883bced7e435f5a76349e15684858d3477c (diff)
[PATCH] swsusp: fix remaining u32 vs. pm_message_t confusion
Fix remaining bits of u32 vs. pm_message confusion. Should not break anything. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 7babf6af4e28..55a72c7ad001 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -2004,14 +2004,14 @@ bnx2_init_cpus(struct bnx2 *bp)
2004} 2004}
2005 2005
2006static int 2006static int
2007bnx2_set_power_state(struct bnx2 *bp, int state) 2007bnx2_set_power_state(struct bnx2 *bp, pci_power_t state)
2008{ 2008{
2009 u16 pmcsr; 2009 u16 pmcsr;
2010 2010
2011 pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &pmcsr); 2011 pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &pmcsr);
2012 2012
2013 switch (state) { 2013 switch (state) {
2014 case 0: { 2014 case PCI_D0: {
2015 u32 val; 2015 u32 val;
2016 2016
2017 pci_write_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, 2017 pci_write_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL,
@@ -2032,7 +2032,7 @@ bnx2_set_power_state(struct bnx2 *bp, int state)
2032 REG_WR(bp, BNX2_RPM_CONFIG, val); 2032 REG_WR(bp, BNX2_RPM_CONFIG, val);
2033 break; 2033 break;
2034 } 2034 }
2035 case 3: { 2035 case PCI_D3hot: {
2036 int i; 2036 int i;
2037 u32 val, wol_msg; 2037 u32 val, wol_msg;
2038 2038
@@ -3886,7 +3886,7 @@ bnx2_open(struct net_device *dev)
3886 struct bnx2 *bp = dev->priv; 3886 struct bnx2 *bp = dev->priv;
3887 int rc; 3887 int rc;
3888 3888
3889 bnx2_set_power_state(bp, 0); 3889 bnx2_set_power_state(bp, PCI_D0);
3890 bnx2_disable_int(bp); 3890 bnx2_disable_int(bp);
3891 3891
3892 rc = bnx2_alloc_mem(bp); 3892 rc = bnx2_alloc_mem(bp);
@@ -4197,7 +4197,7 @@ bnx2_close(struct net_device *dev)
4197 bnx2_free_mem(bp); 4197 bnx2_free_mem(bp);
4198 bp->link_up = 0; 4198 bp->link_up = 0;
4199 netif_carrier_off(bp->dev); 4199 netif_carrier_off(bp->dev);
4200 bnx2_set_power_state(bp, 3); 4200 bnx2_set_power_state(bp, PCI_D3hot);
4201 return 0; 4201 return 0;
4202} 4202}
4203 4203
@@ -5203,7 +5203,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
5203 BNX2_PCICFG_MISC_CONFIG_REG_WINDOW_ENA | 5203 BNX2_PCICFG_MISC_CONFIG_REG_WINDOW_ENA |
5204 BNX2_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP); 5204 BNX2_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP);
5205 5205
5206 bnx2_set_power_state(bp, 0); 5206 bnx2_set_power_state(bp, PCI_D0);
5207 5207
5208 bp->chip_id = REG_RD(bp, BNX2_MISC_ID); 5208 bp->chip_id = REG_RD(bp, BNX2_MISC_ID);
5209 5209
@@ -5495,7 +5495,7 @@ bnx2_remove_one(struct pci_dev *pdev)
5495} 5495}
5496 5496
5497static int 5497static int
5498bnx2_suspend(struct pci_dev *pdev, u32 state) 5498bnx2_suspend(struct pci_dev *pdev, pm_message_t state)
5499{ 5499{
5500 struct net_device *dev = pci_get_drvdata(pdev); 5500 struct net_device *dev = pci_get_drvdata(pdev);
5501 struct bnx2 *bp = dev->priv; 5501 struct bnx2 *bp = dev->priv;
@@ -5513,7 +5513,7 @@ bnx2_suspend(struct pci_dev *pdev, u32 state)
5513 reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL; 5513 reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL;
5514 bnx2_reset_chip(bp, reset_code); 5514 bnx2_reset_chip(bp, reset_code);
5515 bnx2_free_skbs(bp); 5515 bnx2_free_skbs(bp);
5516 bnx2_set_power_state(bp, state); 5516 bnx2_set_power_state(bp, pci_choose_state(pdev, state));
5517 return 0; 5517 return 0;
5518} 5518}
5519 5519
@@ -5526,7 +5526,7 @@ bnx2_resume(struct pci_dev *pdev)
5526 if (!netif_running(dev)) 5526 if (!netif_running(dev))
5527 return 0; 5527 return 0;
5528 5528
5529 bnx2_set_power_state(bp, 0); 5529 bnx2_set_power_state(bp, PCI_D0);
5530 netif_device_attach(dev); 5530 netif_device_attach(dev);
5531 bnx2_init_nic(bp); 5531 bnx2_init_nic(bp);
5532 bnx2_netif_start(bp); 5532 bnx2_netif_start(bp);