/* Obtain the enclosure logical id for an expander. Returns 0 for success, non-zero for failure.  */
static int _transport_get_enclosure_identifier(struct sas_rphy *rphy, u64 *identifier)
/* Obtain the enclosure logical id for an expander. Returns 0 for success, non-zero for failure.  */
static int _transport_get_enclosure_identifier(struct sas_rphy *rphy, u64 *identifier)
{
	struct MPT2SAS_ADAPTER *ioc = rphy_to_ioc(rphy);
	struct _sas_node *sas_expander;
	unsigned long flags;
	spin_lock_irqsave(&ioc->sas_node_lock, flags);
	sas_expander = mpt2sas_scsih_expander_find_by_sas_address(ioc,
	    rphy->identify.sas_address);
	spin_unlock_irqrestore(&ioc->sas_node_lock, flags);
	if (!sas_expander)
		return -ENXIO;
	*identifier = sas_expander->enclosure_logical_id;
	return 0;
}