/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* 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
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include "sun_sas.h"
/*
* Discover an HBA node with mtaching path.
* The di_node_t argument should be the root of the device tree.
* This routine assumes the locks have been taken
*/
static int
{
/* Skip stub(instance -1) nodes */
if (IS_STUB_NODE(node)) {
return (DI_WALK_CONTINUE);
}
"sm-hba-supported", &propData);
if (rval < 0) {
return (DI_WALK_CONTINUE);
} else {
/* still continue to see if there is matching one. */
return (DI_WALK_CONTINUE);
}
devpath);
/* add the hba to the hba list */
if (devtree_get_one_hba(node) ==
/* succeed to refresh the adapater. */
}
/* Found a node. No need to walk any more. */
return (DI_WALK_TERMINATE);
}
}
return (DI_WALK_CONTINUE);
}
/*
* Refreshes information about an HBA
*
* Note: This routine holds the locks in write mode
* during most of the processing, and as such, will cause
* all other threads to block on entry into the library
* until the refresh is complete. An optimization would be
* to put fine-grain locking in for the open_handle structures.
*/
void
{
double duration;
/* take a lock for hbas and handles during rerfresh. */
return;
}
/* now we know the associated hba exists in the global list. */
/* Grab device tree */
"Unable to load device tree for reason \"%s\"",
return;
}
"%.6f seconds", duration);
/* found the matching hba node and refresh hba ports and targets. */
match_smhba_sas_hba) != 0) {
return;
}
/* no matching HBA. */
return;
}
/* All done, release the locks */
}