diff options
-rw-r--r-- | drivers/net/sk98lin/skge.c | 63 | ||||
-rw-r--r-- | drivers/pcmcia/yenta_socket.c | 9 | ||||
-rw-r--r-- | sound/pci/intel8x0.c | 6 |
3 files changed, 77 insertions, 1 deletions
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c index 05b827f79f54..7bfaef9305b2 100644 --- a/drivers/net/sk98lin/skge.c +++ b/drivers/net/sk98lin/skge.c | |||
@@ -5134,6 +5134,67 @@ static void __devexit skge_remove_one(struct pci_dev *pdev) | |||
5134 | kfree(pAC); | 5134 | kfree(pAC); |
5135 | } | 5135 | } |
5136 | 5136 | ||
5137 | #ifdef CONFIG_PM | ||
5138 | static int skge_suspend(struct pci_dev *pdev, pm_message_t state) | ||
5139 | { | ||
5140 | struct net_device *dev = pci_get_drvdata(pdev); | ||
5141 | DEV_NET *pNet = netdev_priv(dev); | ||
5142 | SK_AC *pAC = pNet->pAC; | ||
5143 | struct net_device *otherdev = pAC->dev[1]; | ||
5144 | |||
5145 | if (pNet->Up) { | ||
5146 | pAC->WasIfUp[0] = SK_TRUE; | ||
5147 | DoPrintInterfaceChange = SK_FALSE; | ||
5148 | SkDrvDeInitAdapter(pAC, 0); /* performs SkGeClose */ | ||
5149 | } | ||
5150 | if (otherdev != dev) { | ||
5151 | pNet = netdev_priv(otherdev); | ||
5152 | if (pNet->Up) { | ||
5153 | pAC->WasIfUp[1] = SK_TRUE; | ||
5154 | DoPrintInterfaceChange = SK_FALSE; | ||
5155 | SkDrvDeInitAdapter(pAC, 1); /* performs SkGeClose */ | ||
5156 | } | ||
5157 | } | ||
5158 | |||
5159 | pci_save_state(pdev); | ||
5160 | pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); | ||
5161 | if (pAC->AllocFlag & SK_ALLOC_IRQ) { | ||
5162 | free_irq(dev->irq, dev); | ||
5163 | } | ||
5164 | pci_disable_device(pdev); | ||
5165 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | ||
5166 | |||
5167 | return 0; | ||
5168 | } | ||
5169 | |||
5170 | static int skge_resume(struct pci_dev *pdev) | ||
5171 | { | ||
5172 | struct net_device *dev = pci_get_drvdata(pdev); | ||
5173 | DEV_NET *pNet = netdev_priv(dev); | ||
5174 | SK_AC *pAC = pNet->pAC; | ||
5175 | |||
5176 | pci_set_power_state(pdev, PCI_D0); | ||
5177 | pci_restore_state(pdev); | ||
5178 | pci_enable_device(pdev); | ||
5179 | pci_set_master(pdev); | ||
5180 | if (pAC->GIni.GIMacsFound == 2) | ||
5181 | request_irq(dev->irq, SkGeIsr, SA_SHIRQ, pAC->Name, dev); | ||
5182 | else | ||
5183 | request_irq(dev->irq, SkGeIsrOnePort, SA_SHIRQ, pAC->Name, dev); | ||
5184 | |||
5185 | if (pAC->WasIfUp[0] == SK_TRUE) { | ||
5186 | DoPrintInterfaceChange = SK_FALSE; | ||
5187 | SkDrvInitAdapter(pAC, 0); /* first device */ | ||
5188 | } | ||
5189 | if (pAC->dev[1] != dev && pAC->WasIfUp[1] == SK_TRUE) { | ||
5190 | DoPrintInterfaceChange = SK_FALSE; | ||
5191 | SkDrvInitAdapter(pAC, 1); /* first device */ | ||
5192 | } | ||
5193 | |||
5194 | return 0; | ||
5195 | } | ||
5196 | #endif | ||
5197 | |||
5137 | static struct pci_device_id skge_pci_tbl[] = { | 5198 | static struct pci_device_id skge_pci_tbl[] = { |
5138 | { PCI_VENDOR_ID_3COM, 0x1700, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 5199 | { PCI_VENDOR_ID_3COM, 0x1700, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
5139 | { PCI_VENDOR_ID_3COM, 0x80eb, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 5200 | { PCI_VENDOR_ID_3COM, 0x80eb, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
@@ -5159,6 +5220,8 @@ static struct pci_driver skge_driver = { | |||
5159 | .id_table = skge_pci_tbl, | 5220 | .id_table = skge_pci_tbl, |
5160 | .probe = skge_probe_one, | 5221 | .probe = skge_probe_one, |
5161 | .remove = __devexit_p(skge_remove_one), | 5222 | .remove = __devexit_p(skge_remove_one), |
5223 | .suspend = skge_suspend, | ||
5224 | .resume = skge_resume, | ||
5162 | }; | 5225 | }; |
5163 | 5226 | ||
5164 | static int __init skge_init(void) | 5227 | static int __init skge_init(void) |
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index caf7159a54be..a8a9d954bcf4 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -1034,6 +1034,8 @@ static int yenta_dev_suspend (struct pci_dev *dev, pm_message_t state) | |||
1034 | pci_read_config_dword(dev, 17*4, &socket->saved_state[1]); | 1034 | pci_read_config_dword(dev, 17*4, &socket->saved_state[1]); |
1035 | pci_disable_device(dev); | 1035 | pci_disable_device(dev); |
1036 | 1036 | ||
1037 | free_irq(dev->irq, socket); | ||
1038 | |||
1037 | /* | 1039 | /* |
1038 | * Some laptops (IBM T22) do not like us putting the Cardbus | 1040 | * Some laptops (IBM T22) do not like us putting the Cardbus |
1039 | * bridge into D3. At a guess, some other laptop will | 1041 | * bridge into D3. At a guess, some other laptop will |
@@ -1059,6 +1061,13 @@ static int yenta_dev_resume (struct pci_dev *dev) | |||
1059 | pci_enable_device(dev); | 1061 | pci_enable_device(dev); |
1060 | pci_set_master(dev); | 1062 | pci_set_master(dev); |
1061 | 1063 | ||
1064 | if (socket->cb_irq) | ||
1065 | if (request_irq(socket->cb_irq, yenta_interrupt, | ||
1066 | SA_SHIRQ, "yenta", socket)) { | ||
1067 | printk(KERN_WARNING "Yenta: request_irq() failed on resume!\n"); | ||
1068 | socket->cb_irq = 0; | ||
1069 | } | ||
1070 | |||
1062 | if (socket->type && socket->type->restore_state) | 1071 | if (socket->type && socket->type->restore_state) |
1063 | socket->type->restore_state(socket); | 1072 | socket->type->restore_state(socket); |
1064 | } | 1073 | } |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 8b33b12fa5dc..2a7e63b5757f 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -2367,6 +2367,8 @@ static int intel8x0_suspend(snd_card_t *card, pm_message_t state) | |||
2367 | for (i = 0; i < 3; i++) | 2367 | for (i = 0; i < 3; i++) |
2368 | if (chip->ac97[i]) | 2368 | if (chip->ac97[i]) |
2369 | snd_ac97_suspend(chip->ac97[i]); | 2369 | snd_ac97_suspend(chip->ac97[i]); |
2370 | if (chip->irq >= 0) | ||
2371 | free_irq(chip->irq, (void *)chip); | ||
2370 | pci_disable_device(chip->pci); | 2372 | pci_disable_device(chip->pci); |
2371 | return 0; | 2373 | return 0; |
2372 | } | 2374 | } |
@@ -2378,7 +2380,9 @@ static int intel8x0_resume(snd_card_t *card) | |||
2378 | 2380 | ||
2379 | pci_enable_device(chip->pci); | 2381 | pci_enable_device(chip->pci); |
2380 | pci_set_master(chip->pci); | 2382 | pci_set_master(chip->pci); |
2381 | snd_intel8x0_chip_init(chip, 0); | 2383 | request_irq(chip->irq, snd_intel8x0_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip); |
2384 | synchronize_irq(chip->irq); | ||
2385 | snd_intel8x0_chip_init(chip, 1); | ||
2382 | 2386 | ||
2383 | /* refill nocache */ | 2387 | /* refill nocache */ |
2384 | if (chip->fix_nocache) | 2388 | if (chip->fix_nocache) |