Lines Matching refs:kept

127  * of a "keeps up" and a "kept up" device.  A relationship can be established
130 * "kept up" device must be brought to full power. This relationship is
132 * to a worker thread to bring up the kept device. The caller does not wait.
133 * Scan will not turn down a kept up device.
1125 * Returns true if device needs to be kept up because it exported the
1831 pm_unsatisfy(char *keeper, char *kept)
1836 PMD(PMD_KEEPS, ("%s: keeper=%s, kept=%s\n", pmf, keeper, kept))
1841 strcmp(dp->pdr_kept_paths[0], kept) == 0) {
1856 * We need to release any hold we have on the kept devices, and also
1864 dev_info_t *kept;
1878 kept = pm_name_to_dip(keptpaths[i], 1);
1879 if (kept) {
1881 PM_DEVICE(kept), i))
1898 if (keeper_on && (PM_SKBU(kept) == 0)) {
1899 pm_rele_power(kept);
1900 DEVI(kept)->devi_pm_flags
1905 if (PM_SKBU(kept) == 0) {
1906 pm_rele_power(kept);
1907 DEVI(kept)->devi_pm_flags
1911 ddi_release_devi(kept);
1923 * Device kept is being un power managed, it is kept up by keeper.
1927 pm_unkepts(char *kept, char *keeper)
1930 PMD(PMD_KEEPS, ("%s: kept=%s, keeper=%s\n", pmf, kept, keeper))
1935 pm_unsatisfy(keeper, kept);
1953 * Remove all our kept holds and the dependency records,
1954 * then free up the kept lists.
1972 * path is a path of a kept
1987 /* Remove this device from the kept path lists */
1997 /* Compact the kept paths array */
2042 * Now assume we a kept device, and remove all our records.
2230 pm_dispatch_to_dep_thread(int cmd, char *keeper, char *kept, int wait,
2247 if (kept != NULL) {
2248 new_work->pdw_kept = kmem_zalloc(strlen(kept) + 1, KM_SLEEP);
2249 (void) strcpy(new_work->pdw_kept, kept);
3777 dev_info_t *kept;
3784 * detach processing expects this to increment kidsupcnt of kept.
3795 if ((kept = pm_name_to_dip(kept_path, 1)) == NULL)
3797 wku_info = PM_GET_PM_INFO(kept);
3799 if (kept)
3800 ddi_release_devi(kept);
3808 if (kept)
3809 ddi_release_devi(kept);
3812 bring_pmdep_up(kept, 1);
3813 ddi_release_devi(kept);
3819 * Bring up the 'kept' device passed as argument
3828 * If the kept device has been unmanaged, do nothing.
5098 newpdr(char *kept, char *keeps, int isprop)
5100 size_t size = strlen(kept) + strlen(keeps) + 2 + sizeof (pm_pdr_t);
5107 (void) strcpy(p->pdr_kept, kept);
5108 p->pdr_keeper = (char *)((intptr_t)p->pdr_kept + strlen(kept) + 1);
5119 * keeper -> kept list for simplification. At this point We do not
5128 pm_record_keeper(char *kept, char *keeper, int isprop)
5133 PMD(PMD_KEEPS, ("%s: %s, %s\n", pmf, kept, keeper))
5134 ASSERT(kept && keeper);
5143 if (strcmp(kept, pdr->pdr_kept) == 0 &&
5152 npdr = newpdr(kept, keeper, isprop);
5199 pm_set_keeping(dev_info_t *keeper, dev_info_t *kept)
5205 PMD(PMD_KEEPS, ("%s: keeper=%s@%s(%s#%d), kept=%s@%s(%s#%d)\n", pmf,
5206 PM_DEVICE(keeper), PM_DEVICE(kept)))
5211 ASSERT(keeper != kept);
5215 PM_DEVICE(keeper), PM_DEVICE(kept));
5220 if (PM_GET_PM_INFO(kept) == NULL) {
5223 PM_DEVICE(keeper), PM_DEVICE(kept));
5224 PMD((PMD_FAIL | PMD_KEEPS), ("%s: kept %s@%s(%s#%d) is not"
5225 "power managed\n", pmf, PM_DEVICE(kept)))
5237 /* Bringup and maintain a hold on the kept */
5238 PMD(PMD_KEEPS, ("%s: place a hold on kept %s@%s(%s#%d)\n", pmf,
5239 PM_DEVICE(kept)))
5240 bring_pmdep_up(kept, 1);
5254 * Because we require the kept device to be attached already in order to
5265 dev_info_t *kept = NULL;
5294 kept = pm_name_to_dip(dp->pdr_kept_paths[i], 1);
5295 if (kept == NULL)
5297 ASSERT(ddi_prop_exists(DDI_DEV_T_ANY, kept,
5300 "kept=%s@%s(%s#%d) keptcnt=%d\n",
5301 pmf, PM_DEVICE(dip), PM_DEVICE(kept),
5303 if (kept != dip) {
5304 ret += pm_set_keeping(dip, kept);
5306 ddi_release_devi(kept);
5316 * Should this device be kept up by another device?
5319 * kept device lists.
5324 PMD_FUNC(pmf, "kept")
5329 dev_info_t *kept;
5336 kept = pm_name_to_dip(keptp, 1);
5337 if (kept == NULL)
5339 PMD(PMD_KEEPS, ("%s: %s@%s(%s#%d)\n", pmf, PM_DEVICE(kept)))
5343 if (ddi_prop_exists(DDI_DEV_T_ANY, kept,
5354 "%p\n", pmf, (void *)kept))
5411 ret += pm_set_keeping(keeper, kept);
5421 pmf, (void *)kept))
5445 ddi_release_devi(kept);
5451 * keeper is already known to be the device that keeps up the other (kept) one.
5452 * We have to the whole tree for the "kept" device, then apply
5459 dev_info_t *kept = NULL;
5472 kept = pm_name_to_dip(keptp, 1);
5473 if (kept == NULL)
5475 if (kept) {
5476 PMD(PMD_KEEPS, ("%s: keeper=%s, kept=%s\n", pmf,
5478 if (pm_set_keeping(keeper, kept)) {
5486 ddi_release_devi(kept);
6037 pm_log("%p: %s keeper %s, kept %s, kept count %d, next %p\n",
6042 pm_log("kept list = ");
6322 return ("kept");
6328 return ("check kept");
6345 dev_info_t *kept = NULL;
6355 kept = pm_name_to_dip(kept_path, 1);
6356 if (kept) {
6357 PMD(PMD_KEEPS, ("%s: release kept=%s@%s(%s#%d) "
6358 "of keeper=%s\n", pmf, PM_DEVICE(kept),
6360 ASSERT(DEVI(kept)->devi_pm_kidsupcnt > 0);
6361 pm_rele_power(kept);
6362 ddi_release_devi(kept);
6370 * if our keeper is up since dependency is not honored while a kept
6377 dev_info_t *kept;
6383 kept = pm_name_to_dip(keptpath, 1);
6384 if (kept == NULL)
6386 PMD(PMD_KEEPS, ("%s: kept=%s@%s(%s#%d)\n", pmf, PM_DEVICE(kept)))
6407 if (PM_SKBU(kept))
6408 DEVI(kept)->devi_pm_flags &=
6410 bring_pmdep_up(kept, 1);
6417 ddi_release_devi(kept);
6428 PMD(PMD_DEP, ("%s: keeper=%s, kept=%s\n", pmf,
6434 /* Bring up the kept devices and put a hold on them */
6438 /* Release the kept devices */
6484 PMD(PMD_DEP, ("%s: PM_DEP_WK_CHECK_KEPT: kept=%s, ret=%d\n",
8348 * Returns true if (detached) device needs to be kept up because it exported the