FreeBSD/sys/dev/cxgb/common/cxgb_xgmac.c
/*
 * Returns a reasonable A_XGM_RESET_CTRL value for the mac specified.
 */
Returns a reasonable A_XGM_RESET_CTRL value for the mac specified.
Returns a reasonable A_XGM_RESET_CTRL value for the mac specified .
static inline int xgm_reset_ctrl(const struct cmac *mac)
{
	adapter_t *adap = mac->adapter;
	int val = F_MAC_RESET_ | F_XGMAC_STOP_EN;
	if (is_10G(adap)) {
		int cfg = t3_read_reg(adap, A_XGM_PORT_CFG + mac->offset);
		val |= F_PCS_RESET_;
		if (G_PORTSPEED(cfg) != 3)	
			val |= F_XG2G_RESET_;
	} else if (uses_xaui(adap))
		val |= F_PCS_RESET_ | F_XG2G_RESET_;
	else
		val |= F_RGMII_RESET_ | F_XG2G_RESET_;
	return (val);
}
static inline int xgm_reset_ctrl ( const struct cmac * mac ) { adapter_t * adap = mac -> adapter ; int val = F_MAC_RESET_ | F_XGMAC_STOP_EN ; if ( is_10G ( adap ) ) { int cfg = t3_read_reg ( adap , A_XGM_PORT_CFG + mac -> offset ) ; val |= F_PCS_RESET_ ; if ( G_PORTSPEED ( cfg ) != 3 ) val |= F_XG2G_RESET_ ; } else if ( uses_xaui ( adap ) ) val |= F_PCS_RESET_ | F_XG2G_RESET_ ; else val |= F_RGMII_RESET_ | F_XG2G_RESET_ ; return ( val ) ; }
Returns a reasonable A_XGM_RESET_CTRL value for the mac specified.
Returns a reasonable A_XGM_RESET_CTRL value for the mac specified .
/* not running at 10G */