summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/dktp
diff options
context:
space:
mode:
authorrandyf <none@none>2007-10-20 16:00:42 -0700
committerrandyf <none@none>2007-10-20 16:00:42 -0700
commit2df1fe9ca32bb227b9158c67f5c00b54c20b10fd (patch)
tree358c576f885c00d42a760d9e35e5b66e77209fe2 /usr/src/uts/common/sys/dktp
parent10b3fbf593a6678eec9b50a01903ef4eb73111e4 (diff)
downloadillumos-joyent-2df1fe9ca32bb227b9158c67f5c00b54c20b10fd.tar.gz
PSARC/2005/469 X86 Energy Star compliance
PSARC/2006/632 PSMI extension for state save and restore 6330209 nge needs to support DDI_SUSPEND/DDI_RESUME 6381827 Suspend to RAM on x86 6393154 audio810 needs to support DDI_SUSPEND/DDI_RESUME 6397047 fd, fdc needs to support Suspend/Resume 6401974 cannot enter S3 with ohci PME enable set on Tyan 2865 with Sun or Tyan 2.01 BIOS 6422613 memscrubber doesn't re-acquire lock before CALLB_CPR_EXIT 6455736 ata/dadk/cmdk should support DDI_SUSPEND/DDI_RESUME 6511370 CPR on SPARC regression 6586018 TODOP Macros in i86pc/sys/machclock.h not in sun4u/sun4v equivilent (Sparc only) 6610124 It takes more than 3 minutes after printing "pci_pre_resume nv_sata:0" 6617143 powerd/pmconfig emits a different default message for an existing on or off action. --HG-- rename : usr/src/cmd/power/power.conf => usr/src/cmd/power/power.conf.sparc
Diffstat (limited to 'usr/src/uts/common/sys/dktp')
-rw-r--r--usr/src/uts/common/sys/dktp/cmdk.h24
-rw-r--r--usr/src/uts/common/sys/dktp/dadk.h6
2 files changed, 25 insertions, 5 deletions
diff --git a/usr/src/uts/common/sys/dktp/cmdk.h b/usr/src/uts/common/sys/dktp/cmdk.h
index 05dff32d9a..11b1bd9d78 100644
--- a/usr/src/uts/common/sys/dktp/cmdk.h
+++ b/usr/src/uts/common/sys/dktp/cmdk.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -73,10 +73,26 @@ struct cmdk {
uint32_t dk_altused; /* num entries in V_ALTSCTR */
uint32_t *dk_slc_cnt; /* entries per slice */
struct alts_ent **dk_slc_ent; /* link to remap data */
+
+ /*
+ * for power management
+ */
+ kmutex_t dk_pm_mutex;
+ kcondvar_t dk_suspend_cv;
+ uint32_t dk_pm_level;
+ uint32_t dk_pm_is_enabled;
};
+/*
+ * Power Management definitions
+ */
+#define CMDK_SPINDLE_UNINIT ((uint_t)(-1))
+#define CMDK_SPINDLE_OFF 0x0
+#define CMDK_SPINDLE_ON 0x1
+
/* common disk flags definitions */
#define CMDK_OPEN 0x1
+#define CMDK_SUSPEND 0x2
#define CMDK_TGDK_OPEN 0x4
#define CMDKUNIT(dev) (getminor((dev)) >> CMDK_UNITSHF)
diff --git a/usr/src/uts/common/sys/dktp/dadk.h b/usr/src/uts/common/sys/dktp/dadk.h
index 0f07c5a89f..f5c990e7c0 100644
--- a/usr/src/uts/common/sys/dktp/dadk.h
+++ b/usr/src/uts/common/sys/dktp/dadk.h
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -63,6 +63,8 @@ struct dadk {
uchar_t dad_thread_cnt; /* reference count on removable */
/* - disk state watcher thread */
kstat_t *dad_errstats; /* error stats */
+ kmutex_t dad_cmd_mutex;
+ int dad_cmd_count;
};
#define DAD_SECSIZ dad_phyg.g_secsiz
@@ -132,6 +134,8 @@ static void dadk_watch_thread(struct dadk *dadkp);
int dadk_inquiry(opaque_t objp, opaque_t *inqpp);
void dadk_cleanup(struct tgdk_obj *dkobjp);
+int dadk_getcmds(opaque_t objp);
+
#ifdef __cplusplus
}
#endif