summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata_wdc.c6
-rw-r--r--sys/dev/pci/ahci.c18
-rw-r--r--sys/dev/pci/files.pci4
3 files changed, 24 insertions, 4 deletions
diff --git a/sys/dev/ata/ata_wdc.c b/sys/dev/ata/ata_wdc.c
index 88bc1a51b85..1276ca7f10c 100644
--- a/sys/dev/ata/ata_wdc.c
+++ b/sys/dev/ata/ata_wdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ata_wdc.c,v 1.42 2011/11/13 23:13:28 mlarkin Exp $ */
+/* $OpenBSD: ata_wdc.c,v 1.43 2011/11/14 00:25:17 mlarkin Exp $ */
/* $NetBSD: ata_wdc.c,v 1.21 1999/08/09 09:43:11 bouyer Exp $ */
/*
@@ -128,6 +128,10 @@ wd_hibernate_io(dev_t dev, daddr_t blkno, vaddr_t addr, size_t size, int op, voi
struct ata_bio *ata_bio;
extern struct cfdriver wd_cd;
+ /* early call for initialization */
+ if (op == HIB_INIT)
+ return(0);
+
real_wd = (struct wd_softc *)disk_lookup(&wd_cd, DISKUNIT(dev));
if (real_wd == NULL)
return (ENODEV);
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index 59f163648dc..6c07f248a6c 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.184 2011/10/27 08:03:50 jmatthew Exp $ */
+/* $OpenBSD: ahci.c,v 1.185 2011/11/14 00:25:17 mlarkin Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -525,6 +525,13 @@ void ahci_pci_attach(struct device *, struct device *,
int ahci_pci_detach(struct device *, int);
int ahci_pci_activate(struct device *, int);
+#ifdef HIBERNATE
+#include <sys/hibernate.h>
+
+int ahci_hibernate_io(dev_t dev, daddr_t blkno,
+ vaddr_t addr, size_t size, int wr, void *page);
+#endif
+
struct cfattach ahci_pci_ca = {
sizeof(struct ahci_softc),
ahci_pci_match,
@@ -3707,3 +3714,12 @@ ahci_pmp_identify(struct ahci_port *ap, int *ret_nports)
*ret_nports = nports;
return (0);
}
+
+#ifdef HIBERNATE
+int
+ahci_hibernate_io(dev_t dev, daddr_t blkno, vaddr_t addr, size_t size,
+ int op, void *page)
+{
+ return (EIO);
+}
+#endif /* HIBERNATE */
diff --git a/sys/dev/pci/files.pci b/sys/dev/pci/files.pci
index 961e9919e4f..ad258f51deb 100644
--- a/sys/dev/pci/files.pci
+++ b/sys/dev/pci/files.pci
@@ -1,4 +1,4 @@
-# $OpenBSD: files.pci,v 1.279 2011/05/18 14:21:21 sthen Exp $
+# $OpenBSD: files.pci,v 1.280 2011/11/14 00:25:17 mlarkin Exp $
# $NetBSD: files.pci,v 1.20 1996/09/24 17:47:15 christos Exp $
#
# Config file and device description for machine-independent PCI code.
@@ -87,7 +87,7 @@ file dev/pci/jmb.c jmb
device ahci: scsi, atascsi
attach ahci at pci with ahci_pci
attach ahci at jmb with ahci_jmb
-file dev/pci/ahci.c ahci | ahci_pci | ahci_jmb
+file dev/pci/ahci.c ahci | ahci_pci | ahci_jmb needs-flag
# AMI MegaRAID Express x00/Elite 1500/Express 1x00 RAID Controllers
attach ami at pci with ami_pci