diff options
-rw-r--r-- | drivers/net/wireless/hostap/hostap_pci.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco_pci.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_hotplug.c | 20 |
5 files changed, 43 insertions, 8 deletions
diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c index c2fa011be291..d1de9766c831 100644 --- a/drivers/net/wireless/hostap/hostap_pci.c +++ b/drivers/net/wireless/hostap/hostap_pci.c | |||
@@ -425,8 +425,14 @@ static int prism2_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
425 | static int prism2_pci_resume(struct pci_dev *pdev) | 425 | static int prism2_pci_resume(struct pci_dev *pdev) |
426 | { | 426 | { |
427 | struct net_device *dev = pci_get_drvdata(pdev); | 427 | struct net_device *dev = pci_get_drvdata(pdev); |
428 | int err; | ||
428 | 429 | ||
429 | pci_enable_device(pdev); | 430 | err = pci_enable_device(pdev); |
431 | if (err) { | ||
432 | printk(KERN_ERR "%s: pci_enable_device failed on resume\n", | ||
433 | dev->name); | ||
434 | return err; | ||
435 | } | ||
430 | pci_restore_state(pdev); | 436 | pci_restore_state(pdev); |
431 | prism2_hw_config(dev, 0); | 437 | prism2_hw_config(dev, 0); |
432 | if (netif_running(dev)) { | 438 | if (netif_running(dev)) { |
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 5bf4d4119c3d..3bc6be9d20f8 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -6423,6 +6423,7 @@ static int ipw2100_resume(struct pci_dev *pci_dev) | |||
6423 | { | 6423 | { |
6424 | struct ipw2100_priv *priv = pci_get_drvdata(pci_dev); | 6424 | struct ipw2100_priv *priv = pci_get_drvdata(pci_dev); |
6425 | struct net_device *dev = priv->net_dev; | 6425 | struct net_device *dev = priv->net_dev; |
6426 | int err; | ||
6426 | u32 val; | 6427 | u32 val; |
6427 | 6428 | ||
6428 | if (IPW2100_PM_DISABLED) | 6429 | if (IPW2100_PM_DISABLED) |
@@ -6433,7 +6434,12 @@ static int ipw2100_resume(struct pci_dev *pci_dev) | |||
6433 | IPW_DEBUG_INFO("%s: Coming out of suspend...\n", dev->name); | 6434 | IPW_DEBUG_INFO("%s: Coming out of suspend...\n", dev->name); |
6434 | 6435 | ||
6435 | pci_set_power_state(pci_dev, PCI_D0); | 6436 | pci_set_power_state(pci_dev, PCI_D0); |
6436 | pci_enable_device(pci_dev); | 6437 | err = pci_enable_device(pci_dev); |
6438 | if (err) { | ||
6439 | printk(KERN_ERR "%s: pci_enable_device failed on resume\n", | ||
6440 | dev->name); | ||
6441 | return err; | ||
6442 | } | ||
6437 | pci_restore_state(pci_dev); | 6443 | pci_restore_state(pci_dev); |
6438 | 6444 | ||
6439 | /* | 6445 | /* |
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 72120d5c2f7b..c692d01a76ca 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -11727,12 +11727,18 @@ static int ipw_pci_resume(struct pci_dev *pdev) | |||
11727 | { | 11727 | { |
11728 | struct ipw_priv *priv = pci_get_drvdata(pdev); | 11728 | struct ipw_priv *priv = pci_get_drvdata(pdev); |
11729 | struct net_device *dev = priv->net_dev; | 11729 | struct net_device *dev = priv->net_dev; |
11730 | int err; | ||
11730 | u32 val; | 11731 | u32 val; |
11731 | 11732 | ||
11732 | printk(KERN_INFO "%s: Coming out of suspend...\n", dev->name); | 11733 | printk(KERN_INFO "%s: Coming out of suspend...\n", dev->name); |
11733 | 11734 | ||
11734 | pci_set_power_state(pdev, PCI_D0); | 11735 | pci_set_power_state(pdev, PCI_D0); |
11735 | pci_enable_device(pdev); | 11736 | err = pci_enable_device(pdev); |
11737 | if (err) { | ||
11738 | printk(KERN_ERR "%s: pci_enable_device failed on resume\n", | ||
11739 | dev->name); | ||
11740 | return err; | ||
11741 | } | ||
11736 | pci_restore_state(pdev); | 11742 | pci_restore_state(pdev); |
11737 | 11743 | ||
11738 | /* | 11744 | /* |
diff --git a/drivers/net/wireless/orinoco_pci.h b/drivers/net/wireless/orinoco_pci.h index be1abea4b64f..f4e5e06760c1 100644 --- a/drivers/net/wireless/orinoco_pci.h +++ b/drivers/net/wireless/orinoco_pci.h | |||
@@ -60,7 +60,12 @@ static int orinoco_pci_resume(struct pci_dev *pdev) | |||
60 | int err; | 60 | int err; |
61 | 61 | ||
62 | pci_set_power_state(pdev, 0); | 62 | pci_set_power_state(pdev, 0); |
63 | pci_enable_device(pdev); | 63 | err = pci_enable_device(pdev); |
64 | if (err) { | ||
65 | printk(KERN_ERR "%s: pci_enable_device failed on resume\n", | ||
66 | dev->name); | ||
67 | return err; | ||
68 | } | ||
64 | pci_restore_state(pdev); | 69 | pci_restore_state(pdev); |
65 | 70 | ||
66 | err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, | 71 | err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, |
diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c index f6354b1cbc28..e0bca3abdf68 100644 --- a/drivers/net/wireless/prism54/islpci_hotplug.c +++ b/drivers/net/wireless/prism54/islpci_hotplug.c | |||
@@ -170,14 +170,15 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
170 | pci_set_master(pdev); | 170 | pci_set_master(pdev); |
171 | 171 | ||
172 | /* enable MWI */ | 172 | /* enable MWI */ |
173 | pci_set_mwi(pdev); | 173 | if (pci_set_mwi(pdev)) |
174 | goto do_pci_release_regions; | ||
174 | 175 | ||
175 | /* setup the network device interface and its structure */ | 176 | /* setup the network device interface and its structure */ |
176 | if (!(ndev = islpci_setup(pdev))) { | 177 | if (!(ndev = islpci_setup(pdev))) { |
177 | /* error configuring the driver as a network device */ | 178 | /* error configuring the driver as a network device */ |
178 | printk(KERN_ERR "%s: could not configure network device\n", | 179 | printk(KERN_ERR "%s: could not configure network device\n", |
179 | DRV_NAME); | 180 | DRV_NAME); |
180 | goto do_pci_release_regions; | 181 | goto do_pci_clear_mwi; |
181 | } | 182 | } |
182 | 183 | ||
183 | priv = netdev_priv(ndev); | 184 | priv = netdev_priv(ndev); |
@@ -207,6 +208,8 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
207 | pci_set_drvdata(pdev, NULL); | 208 | pci_set_drvdata(pdev, NULL); |
208 | free_netdev(ndev); | 209 | free_netdev(ndev); |
209 | priv = NULL; | 210 | priv = NULL; |
211 | do_pci_clear_mwi: | ||
212 | pci_clear_mwi(pdev); | ||
210 | do_pci_release_regions: | 213 | do_pci_release_regions: |
211 | pci_release_regions(pdev); | 214 | pci_release_regions(pdev); |
212 | do_pci_disable_device: | 215 | do_pci_disable_device: |
@@ -254,6 +257,8 @@ prism54_remove(struct pci_dev *pdev) | |||
254 | free_netdev(ndev); | 257 | free_netdev(ndev); |
255 | priv = NULL; | 258 | priv = NULL; |
256 | 259 | ||
260 | pci_clear_mwi(pdev); | ||
261 | |||
257 | pci_release_regions(pdev); | 262 | pci_release_regions(pdev); |
258 | 263 | ||
259 | pci_disable_device(pdev); | 264 | pci_disable_device(pdev); |
@@ -287,12 +292,19 @@ prism54_resume(struct pci_dev *pdev) | |||
287 | { | 292 | { |
288 | struct net_device *ndev = pci_get_drvdata(pdev); | 293 | struct net_device *ndev = pci_get_drvdata(pdev); |
289 | islpci_private *priv = ndev ? netdev_priv(ndev) : NULL; | 294 | islpci_private *priv = ndev ? netdev_priv(ndev) : NULL; |
290 | BUG_ON(!priv); | 295 | int err; |
291 | 296 | ||
292 | pci_enable_device(pdev); | 297 | BUG_ON(!priv); |
293 | 298 | ||
294 | printk(KERN_NOTICE "%s: got resume request\n", ndev->name); | 299 | printk(KERN_NOTICE "%s: got resume request\n", ndev->name); |
295 | 300 | ||
301 | err = pci_enable_device(pdev); | ||
302 | if (err) { | ||
303 | printk(KERN_ERR "%s: pci_enable_device failed on resume\n", | ||
304 | ndev->name); | ||
305 | return err; | ||
306 | } | ||
307 | |||
296 | pci_restore_state(pdev); | 308 | pci_restore_state(pdev); |
297 | 309 | ||
298 | /* alright let's go into the PREBOOT state */ | 310 | /* alright let's go into the PREBOOT state */ |