diff options
author | ambrisko <ambrisko@FreeBSD.org> | 2003-02-05 03:37:42 +0000 |
---|---|---|
committer | ambrisko <ambrisko@FreeBSD.org> | 2003-02-05 03:37:42 +0000 |
commit | 9a4fb866c26c0f486cf7978f3d00a047ad58c4f3 (patch) | |
tree | 29481a893cd0d42c222d159a9eb7cc631d66f870 /sys/dev/an/if_an_pci.c | |
parent | 914d9fc8a8a96b9270275e4aa0a60882ba661e91 (diff) | |
download | FreeBSD-src-9a4fb866c26c0f486cf7978f3d00a047ad58c4f3.zip FreeBSD-src-9a4fb866c26c0f486cf7978f3d00a047ad58c4f3.tar.gz |
Support for suspend/resume in laptops. Loosely based on the wi(4) patches
but not quite. The memory descriptors and most of the card parameters
need to be writen to the card.
MFC in: 3 days
Diffstat (limited to 'sys/dev/an/if_an_pci.c')
-rw-r--r-- | sys/dev/an/if_an_pci.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/dev/an/if_an_pci.c b/sys/dev/an/if_an_pci.c index 2fe45e0..c219024 100644 --- a/sys/dev/an/if_an_pci.c +++ b/sys/dev/an/if_an_pci.c @@ -116,6 +116,8 @@ static struct an_type an_devs[] = { static int an_probe_pci (device_t); static int an_attach_pci (device_t); static int an_detach_pci (device_t); +static int an_suspend_pci (device_t); +static int an_resume_pci (device_t); static int an_probe_pci(device_t dev) @@ -261,12 +263,30 @@ an_detach_pci(device_t dev) return (0); } +static int +an_suspend_pci(device_t dev) +{ + an_shutdown(dev); + + return (0); +} + +static int +an_resume_pci(device_t dev) +{ + an_resume(dev); + + return (0); +} + static device_method_t an_pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, an_probe_pci), DEVMETHOD(device_attach, an_attach_pci), DEVMETHOD(device_detach, an_detach_pci), DEVMETHOD(device_shutdown, an_shutdown), + DEVMETHOD(device_suspend, an_suspend_pci), + DEVMETHOD(device_resume, an_resume_pci), { 0, 0 } }; |