changeset 13211:631c6b653e61

176 assertion failed: kept_info, file: ../../common/os/sunpm.c, line: 5219 Reviewed by: richlowe@richlowe.net Approved by: gwr@nexenta.com
author Garrett D'Amore <garrett@nexenta.com>
date Wed, 13 Oct 2010 13:28:06 -0700
parents f351141eee23
children d616c772ab3c
files usr/src/uts/common/os/sunpm.c
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/os/sunpm.c	Mon Oct 11 19:35:43 2010 -0400
+++ b/usr/src/uts/common/os/sunpm.c	Wed Oct 13 13:28:06 2010 -0700
@@ -22,6 +22,9 @@
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ */
 
 /*
  * sunpm.c builds sunpm.o	"power management framework"
@@ -5196,7 +5199,6 @@
 pm_set_keeping(dev_info_t *keeper, dev_info_t *kept)
 {
 	PMD_FUNC(pmf, "set_keeping")
-	pm_info_t *kept_info;
 	int j, up = 0, circ;
 	void prdeps(char *);
 
@@ -5215,8 +5217,15 @@
 		    "power managed\n", pmf, PM_DEVICE(keeper)))
 		return (0);
 	}
-	kept_info = PM_GET_PM_INFO(kept);
-	ASSERT(kept_info);
+	if (PM_GET_PM_INFO(kept) == NULL) {
+		cmn_err(CE_CONT, "!device %s@%s(%s#%d) keeps up device "
+		    "%s@%s(%s#%d), but the latter is not power managed",
+		    PM_DEVICE(keeper), PM_DEVICE(kept));
+		PMD((PMD_FAIL | PMD_KEEPS), ("%s: kept %s@%s(%s#%d) is not"
+		    "power managed\n", pmf, PM_DEVICE(kept)))
+		return (0);
+	}
+
 	PM_LOCK_POWER(keeper, &circ);
 	for (j = 0; j < PM_NUMCMPTS(keeper); j++) {
 		if (PM_CURPOWER(keeper, j)) {