Commit 1ca01512 authored by Yijing Wang's avatar Yijing Wang Committed by David S. Miller

net/trivial: replace numeric with standard PM state macros

Use standard PM state macros PCI_Dx instead of numeric 0/1/2..
Signed-off-by: default avatarYijing Wang <wangyijing@huawei.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3b233fe0
...@@ -676,7 +676,7 @@ static int ne2k_pci_resume (struct pci_dev *pdev) ...@@ -676,7 +676,7 @@ static int ne2k_pci_resume (struct pci_dev *pdev)
struct net_device *dev = pci_get_drvdata (pdev); struct net_device *dev = pci_get_drvdata (pdev);
int rc; int rc;
pci_set_power_state(pdev, 0); pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev); pci_restore_state(pdev);
rc = pci_enable_device(pdev); rc = pci_enable_device(pdev);
......
...@@ -4364,7 +4364,7 @@ static int be_resume(struct pci_dev *pdev) ...@@ -4364,7 +4364,7 @@ static int be_resume(struct pci_dev *pdev)
if (status) if (status)
return status; return status;
pci_set_power_state(pdev, 0); pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev); pci_restore_state(pdev);
/* tell fw we're ready to fire cmds */ /* tell fw we're ready to fire cmds */
...@@ -4460,7 +4460,7 @@ static pci_ers_result_t be_eeh_reset(struct pci_dev *pdev) ...@@ -4460,7 +4460,7 @@ static pci_ers_result_t be_eeh_reset(struct pci_dev *pdev)
return PCI_ERS_RESULT_DISCONNECT; return PCI_ERS_RESULT_DISCONNECT;
pci_set_master(pdev); pci_set_master(pdev);
pci_set_power_state(pdev, 0); pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev); pci_restore_state(pdev);
/* Check if card is ok and fw is ready */ /* Check if card is ok and fw is ready */
......
...@@ -3069,7 +3069,7 @@ static int e100_resume(struct pci_dev *pdev) ...@@ -3069,7 +3069,7 @@ static int e100_resume(struct pci_dev *pdev)
pci_set_power_state(pdev, PCI_D0); pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev); pci_restore_state(pdev);
/* ack any pending wake events, disable PME */ /* ack any pending wake events, disable PME */
pci_enable_wake(pdev, 0, 0); pci_enable_wake(pdev, PCI_D0, 0);
/* disable reverse auto-negotiation */ /* disable reverse auto-negotiation */
if (nic->phy == phy_82552_v) { if (nic->phy == phy_82552_v) {
...@@ -3160,7 +3160,7 @@ static void e100_io_resume(struct pci_dev *pdev) ...@@ -3160,7 +3160,7 @@ static void e100_io_resume(struct pci_dev *pdev)
struct nic *nic = netdev_priv(netdev); struct nic *nic = netdev_priv(netdev);
/* ack any pending wake events, disable PME */ /* ack any pending wake events, disable PME */
pci_enable_wake(pdev, 0, 0); pci_enable_wake(pdev, PCI_D0, 0);
netif_device_attach(netdev); netif_device_attach(netdev);
if (netif_running(netdev)) { if (netif_running(netdev)) {
......
...@@ -3299,7 +3299,7 @@ static int myri10ge_resume(struct pci_dev *pdev) ...@@ -3299,7 +3299,7 @@ static int myri10ge_resume(struct pci_dev *pdev)
if (mgp == NULL) if (mgp == NULL)
return -EINVAL; return -EINVAL;
netdev = mgp->dev; netdev = mgp->dev;
pci_set_power_state(pdev, 0); /* zeros conf space as a side effect */ pci_set_power_state(pdev, PCI_D0); /* zeros conf space as a side effect */
msleep(5); /* give card time to respond */ msleep(5); /* give card time to respond */
pci_read_config_word(mgp->pdev, PCI_VENDOR_ID, &vendor); pci_read_config_word(mgp->pdev, PCI_VENDOR_ID, &vendor);
if (vendor == 0xffff) { if (vendor == 0xffff) {
......
...@@ -1817,7 +1817,7 @@ static int cp_set_eeprom(struct net_device *dev, ...@@ -1817,7 +1817,7 @@ static int cp_set_eeprom(struct net_device *dev,
/* Put the board into D3cold state and wait for WakeUp signal */ /* Put the board into D3cold state and wait for WakeUp signal */
static void cp_set_d3_state (struct cp_private *cp) static void cp_set_d3_state (struct cp_private *cp)
{ {
pci_enable_wake (cp->pdev, 0, 1); /* Enable PME# generation */ pci_enable_wake(cp->pdev, PCI_D0, 1); /* Enable PME# generation */
pci_set_power_state (cp->pdev, PCI_D3hot); pci_set_power_state (cp->pdev, PCI_D3hot);
} }
......
...@@ -372,7 +372,7 @@ static int tlan_resume(struct pci_dev *pdev) ...@@ -372,7 +372,7 @@ static int tlan_resume(struct pci_dev *pdev)
pci_set_power_state(pdev, PCI_D0); pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev); pci_restore_state(pdev);
pci_enable_wake(pdev, 0, 0); pci_enable_wake(pdev, PCI_D0, 0);
netif_device_attach(dev); netif_device_attach(dev);
if (netif_running(dev)) if (netif_running(dev))
......
...@@ -3211,7 +3211,7 @@ static int velocity_resume(struct device *dev) ...@@ -3211,7 +3211,7 @@ static int velocity_resume(struct device *dev)
velocity_set_power_state(vptr, PCI_D0); velocity_set_power_state(vptr, PCI_D0);
if (vptr->pdev) { if (vptr->pdev) {
pci_enable_wake(vptr->pdev, 0, 0); pci_enable_wake(vptr->pdev, PCI_D0, 0);
pci_restore_state(vptr->pdev); pci_restore_state(vptr->pdev);
} }
......
...@@ -38,7 +38,7 @@ static int orinoco_pci_resume(struct pci_dev *pdev) ...@@ -38,7 +38,7 @@ static int orinoco_pci_resume(struct pci_dev *pdev)
struct net_device *dev = priv->ndev; struct net_device *dev = priv->ndev;
int err; int err;
pci_set_power_state(pdev, 0); pci_set_power_state(pdev, PCI_D0);
err = pci_enable_device(pdev); err = pci_enable_device(pdev);
if (err) { if (err) {
printk(KERN_ERR "%s: pci_enable_device failed on resume\n", printk(KERN_ERR "%s: pci_enable_device failed on resume\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment