[ACPI] fix resume issues on Asus L5D

http://bugzilla.kernel.org/show_bug.cgi?id=4416

Signed-off-by: Rafael J. Wysocki <rjwysocki@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by Rafael J. Wysocki and committed by Len Brown 90158b83 4b31e774

+77 -1
+63
drivers/net/sk98lin/skge.c
··· 5134 kfree(pAC); 5135 } 5136 5137 static struct pci_device_id skge_pci_tbl[] = { 5138 { 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 }, ··· 5220 .id_table = skge_pci_tbl, 5221 .probe = skge_probe_one, 5222 .remove = __devexit_p(skge_remove_one), 5223 }; 5224 5225 static int __init skge_init(void)
··· 5134 kfree(pAC); 5135 } 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 + 5198 static struct pci_device_id skge_pci_tbl[] = { 5199 { PCI_VENDOR_ID_3COM, 0x1700, 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 .id_table = skge_pci_tbl, 5160 .probe = skge_probe_one, 5161 .remove = __devexit_p(skge_remove_one), 5162 + .suspend = skge_suspend, 5163 + .resume = skge_resume, 5164 }; 5165 5166 static int __init skge_init(void)
+9
drivers/pcmcia/yenta_socket.c
··· 1034 pci_read_config_dword(dev, 17*4, &socket->saved_state[1]); 1035 pci_disable_device(dev); 1036 1037 /* 1038 * Some laptops (IBM T22) do not like us putting the Cardbus 1039 * bridge into D3. At a guess, some other laptop will ··· 1060 pci_write_config_dword(dev, 17*4, socket->saved_state[1]); 1061 pci_enable_device(dev); 1062 pci_set_master(dev); 1063 1064 if (socket->type && socket->type->restore_state) 1065 socket->type->restore_state(socket);
··· 1034 pci_read_config_dword(dev, 17*4, &socket->saved_state[1]); 1035 pci_disable_device(dev); 1036 1037 + free_irq(dev->irq, socket); 1038 + 1039 /* 1040 * Some laptops (IBM T22) do not like us putting the Cardbus 1041 * bridge into D3. At a guess, some other laptop will ··· 1058 pci_write_config_dword(dev, 17*4, socket->saved_state[1]); 1059 pci_enable_device(dev); 1060 pci_set_master(dev); 1061 + 1062 + if (socket->cb_irq) 1063 + if (request_irq(socket->cb_irq, yenta_interrupt, 1064 + SA_SHIRQ, "yenta", socket)) { 1065 + printk(KERN_WARNING "Yenta: request_irq() failed on resume!\n"); 1066 + socket->cb_irq = 0; 1067 + } 1068 1069 if (socket->type && socket->type->restore_state) 1070 socket->type->restore_state(socket);
+5 -1
sound/pci/intel8x0.c
··· 2367 for (i = 0; i < 3; i++) 2368 if (chip->ac97[i]) 2369 snd_ac97_suspend(chip->ac97[i]); 2370 pci_disable_device(chip->pci); 2371 return 0; 2372 } ··· 2380 2381 pci_enable_device(chip->pci); 2382 pci_set_master(chip->pci); 2383 - snd_intel8x0_chip_init(chip, 0); 2384 2385 /* refill nocache */ 2386 if (chip->fix_nocache)
··· 2367 for (i = 0; i < 3; i++) 2368 if (chip->ac97[i]) 2369 snd_ac97_suspend(chip->ac97[i]); 2370 + if (chip->irq >= 0) 2371 + free_irq(chip->irq, (void *)chip); 2372 pci_disable_device(chip->pci); 2373 return 0; 2374 } ··· 2378 2379 pci_enable_device(chip->pci); 2380 pci_set_master(chip->pci); 2381 + request_irq(chip->irq, snd_intel8x0_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip); 2382 + synchronize_irq(chip->irq); 2383 + snd_intel8x0_chip_init(chip, 1); 2384 2385 /* refill nocache */ 2386 if (chip->fix_nocache)