# HG changeset patch # User Garrett D'Amore # Date 1287001686 25200 # Node ID 631c6b653e615c7efd9194f7d4853a5f9c9b008b # Parent f351141eee23bba4215d8b0a6d958ba8bec22d19 176 assertion failed: kept_info, file: ../../common/os/sunpm.c, line: 5219 Reviewed by: richlowe@richlowe.net Approved by: gwr@nexenta.com diff -r f351141eee23 -r 631c6b653e61 usr/src/uts/common/os/sunpm.c --- 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)) {