FreeBSD/sys/dev/cxgb/common/cxgb_t3_hw.c
/**
 *	t3_mps_set_active_ports - configure port failover
 *	@adap: the adapter
 *	@port_mask: bitmap of active ports
 *
 *	Sets the active ports according to the supplied bitmap.
 */
configure port failover
@adap: the adapter
@port_mask: bitmap of active ports

Sets the active ports according to the supplied bitmap.
configure port failover @adap : the adapter @port_mask : bitmap of active ports Sets the active ports according to the supplied bitmap .
int t3_mps_set_active_ports(adapter_t *adap, unsigned int port_mask)
{
	if (port_mask & ~((1 << adap->params.nports) - 1))
		return -EINVAL;
	t3_set_reg_field(adap, A_MPS_CFG, F_PORT1ACTIVE | F_PORT0ACTIVE,
			 port_mask << S_PORT0ACTIVE);
	return 0;
}
int t3_mps_set_active_ports ( adapter_t * adap , unsigned int port_mask ) { if ( port_mask & ~ ( ( 1 << adap -> params . nports ) - 1 ) ) return - EINVAL ; t3_set_reg_field ( adap , A_MPS_CFG , F_PORT1ACTIVE | F_PORT0ACTIVE , port_mask << S_PORT0ACTIVE ) ; return 0 ; }
t3_mps_set_active_ports - configure port failover
      @adap: the adapter
      @port_mask: bitmap of active ports
t3_mps_set_active_ports - configure port failover @adap : the adapter @port_mask : bitmap of active ports