ALT Linux Bugzilla
– Attachment 1511 Details for
Bug 9671
slamr module 2.9.11 suspend patch
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
slamr module 2.9.11 suspend patch
slmodem-2.9.11-suspend.patch (text/plain), 1.32 KB, created by
Artem Delendik
on 2006-06-05 00:38:22 MSD
(
hide
)
Description:
slamr module 2.9.11 suspend patch
Filename:
MIME Type:
Creator:
Artem Delendik
Created:
2006-06-05 00:38:22 MSD
Size:
1.32 KB
patch
obsolete
>diff -ur kernel-source-slmodem-2.9.11.orig/drivers/amrmo_init.c kernel-source-slmodem-2.9.11/drivers/amrmo_init.c >--- kernel-source-slmodem-2.9.11.orig/drivers/amrmo_init.c 2005-10-10 00:14:13 +0300 >+++ kernel-source-slmodem-2.9.11/drivers/amrmo_init.c 2006-06-04 12:54:18 +0300 >@@ -688,12 +688,43 @@ > return; > } > >+#ifdef CONFIG_PM >+static int amrmo_suspend(struct pci_dev *pci_dev, u32 state) >+{ >+ struct amrmo_struct *amrmo = pci_get_drvdata(pci_dev); >+ >+ printk(KERN_INFO "slamr: suspending %d-th card...\n", amrmo->num); >+ amrmo_card_disable(amrmo->card); >+ pci_save_state(pci_dev); >+ pci_set_power_state(pci_dev, PCI_D3hot); >+ return 0; >+} >+ >+static int amrmo_resume(struct pci_dev *pci_dev) >+{ >+ struct amrmo_struct *amrmo = pci_get_drvdata(pci_dev); >+ int ret; >+ >+ pci_set_power_state(pci_dev, PCI_D0); >+ pci_restore_state(pci_dev); >+ printk(KERN_INFO "slamr: coming from suspend, enabling card %d ...\n", amrmo->num); >+ ret = amrmo_card_enable(amrmo->card,NULL); >+ if (ret) >+ printk(KERN_ERR "slamr: cannot reinit card %d after suspend!\n", amrmo->num); >+ >+ return 0; >+} >+#endif > > static struct pci_driver amrmo_pci_driver = { > .name = AMRMO_MODULE_NAME, > .id_table = amrmo_pci_tbl, > .probe = amrmo_pci_probe, > .remove = amrmo_pci_remove, >+#ifdef CONFIG_PM >+ .suspend = amrmo_suspend, >+ .resume = amrmo_resume, >+#endif > }; > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 9671
: 1511