diff options
author | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2018-03-20 04:18:41 +0000 |
---|---|---|
committer | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2018-03-20 04:18:41 +0000 |
commit | c197a2671fbc08ee04c0abf2b9c9234d1068a3a7 (patch) | |
tree | 5b3f31f860e1492dec5fe86010f865c8e85fced8 /sys/arch/i386 | |
parent | bd46ffe0b1436669d82cab30d7f84932ab86c278 (diff) |
Add hibernate IO path for sdmmc(4). This requires some help from the
sdmmc chipset driver, currently only implemented in sdhc(4), but
mostly uses the regular path. sdhc(4) also needed the ability to
perform IO while cold.
ok deraadt@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/hibernate_machdep.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/hibernate_machdep.c b/sys/arch/i386/i386/hibernate_machdep.c index 5bc05033673..f98d6c5a49e 100644 --- a/sys/arch/i386/i386/hibernate_machdep.c +++ b/sys/arch/i386/i386/hibernate_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hibernate_machdep.c,v 1.50 2018/02/10 05:11:06 jmatthew Exp $ */ +/* $OpenBSD: hibernate_machdep.c,v 1.51 2018/03/20 04:18:40 jmatthew Exp $ */ /* * Copyright (c) 2011 Mike Larkin <mlarkin@openbsd.org> @@ -45,6 +45,7 @@ #include "ahci.h" #include "softraid.h" #include "sd.h" +#include "sdmmc.h" /* Hibernate support */ void hibernate_enter_resume_4k_pte(vaddr_t, paddr_t); @@ -97,6 +98,8 @@ get_hibernate_io_function(dev_t dev) vaddr_t addr, size_t size, int op, void *page); extern int sr_hibernate_io(dev_t dev, daddr_t blkno, vaddr_t addr, size_t size, int op, void *page); + extern int sdmmc_scsi_hibernate_io(dev_t dev, daddr_t blkno, + vaddr_t addr, size_t size, int op, void *page); struct device *dv = disk_lookup(&sd_cd, DISKUNIT(dev)); struct { const char *driver; @@ -108,6 +111,9 @@ get_hibernate_io_function(dev_t dev) #if NSOFTRAID > 0 { "softraid", sr_hibernate_io }, #endif +#if SDMMC > 0 + { "sdmmc", sdmmc_scsi_hibernate_io }, +#endif }; if (dv && dv->dv_parent && dv->dv_parent->dv_parent) { |