/*
* 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.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* 1394 Services Layer Connection Management Procedures Support Routines
*/
#include <sys/tnf_probe.h>
/*
* number of retries to notify registered targets in case target list
* changes while the list rwlock is dropped for the time of callback
*/
4,
{
NULL,
},
0
};
4,
{
NULL,
},
0
};
int
{
/*
* if registering the first target, claim and initialize addresses
*/
&s1394_cmp_ompr_descr) != DDI_SUCCESS) {
return (DDI_FAILURE);
}
&s1394_cmp_impr_descr) != DDI_SUCCESS) {
return (DDI_FAILURE);
}
}
/* Add on the target list (we only use one list) */
evts = &default_evts;
}
return (DDI_SUCCESS);
}
int
{
"");
S1394_FA_TYPE_CMP) == DDI_SUCCESS) {
}
} else {
S1394_TNF_SL_CMP_ERROR, "");
}
"");
return (DDI_SUCCESS);
}
int
{
if (reg == T1394_CMP_OMPR) {
ret = DDI_SUCCESS;
} else if (reg == T1394_CMP_IMPR) {
ret = DDI_SUCCESS;
}
return (ret);
}
int
{
if (reg == T1394_CMP_OMPR) {
}
} else if (reg == T1394_CMP_IMPR) {
}
} else {
ret = DDI_FAILURE;
}
/* notify other targets */
if (ret == DDI_SUCCESS) {
}
return (ret);
}
static void
{
}
static void
{
}
/*
*/
static void
{
S1394_TNF_SL_CMP_STACK, "");
} else {
}
S1394_TNF_SL_CMP_STACK, "");
}
static void
{
S1394_TNF_SL_CMP_STACK, "");
} else {
}
S1394_TNF_SL_CMP_STACK, "");
}
static void
{
S1394_TNF_SL_CMP_STACK, "");
} else {
/* write only allowed bits */
}
}
/* notify all targets */
if (notify) {
}
S1394_TNF_SL_CMP_STACK, "");
}
static void
{
S1394_TNF_SL_CMP_STACK, "");
} else {
/* write only allowed bits */
}
}
/* notify all targets */
if (notify) {
}
S1394_TNF_SL_CMP_STACK, "");
}
/*
* Notify registered targets except 'self' about register value change
*/
static void
{
int num_retries = 0;
S1394_TNF_SL_CMP_STACK, "");
/*
* even if the target list changes when the lock is dropped,
* comparing with self is safe because the target should
* not unregister until all CMP operations are completed
*/
continue;
}
continue;
}
/*
* List could change while we dropped the lock. In such
* case, start all over again, because missing a register
* change can have more serious consequences for a
* target than receiving same notification more than once
*/
if (++num_retries <= s1394_cmp_notify_retry_cnt) {
goto start;
} else {
break;
}
}
}
S1394_TNF_SL_CMP_STACK, "");
}