SBMAC_WRITECSR(s->sbm_framecfg,framecfg); SBMAC_WRITECSR(s->sbm_maccfg,cfg); 
__raw_writeq(framecfg, s->sbm_framecfg); __raw_writeq(cfg, s->sbm_maccfg); 
static int sbmac_set_speed(struct sbmac_softc *s,sbmac_speed_t speed){	uint64_t cfg;	uint64_t framecfg;	/*	 * Save new current values	 */		s->sbm_speed = speed;		if (s->sbm_state == sbmac_state_on)		return 0;	/* save for next restart */	/*	 * Read current register values 	 */		cfg = SBMAC_READCSR(s->sbm_maccfg);	framecfg = SBMAC_READCSR(s->sbm_framecfg);		/*	 * Mask out the stuff we want to change	 */		cfg &= ~(M_MAC_BURST_EN | M_MAC_SPEED_SEL);	framecfg &= ~(M_MAC_IFG_RX | M_MAC_IFG_TX | M_MAC_IFG_THRSH |		      M_MAC_SLOT_SIZE);		/*	 * Now add in the new bits	 */		switch (speed) {	case sbmac_speed_10:		framecfg |= V_MAC_IFG_RX_10 |			V_MAC_IFG_TX_10 |			K_MAC_IFG_THRSH_10 |			V_MAC_SLOT_SIZE_10;		cfg |= V_MAC_SPEED_SEL_10MBPS;		break;			case sbmac_speed_100:		framecfg |= V_MAC_IFG_RX_100 |			V_MAC_IFG_TX_100 |			V_MAC_IFG_THRSH_100 |			V_MAC_SLOT_SIZE_100;		cfg |= V_MAC_SPEED_SEL_100MBPS ;		break;			case sbmac_speed_1000:		framecfg |= V_MAC_IFG_RX_1000 |			V_MAC_IFG_TX_1000 |			V_MAC_IFG_THRSH_1000 |			V_MAC_SLOT_SIZE_1000;		cfg |= V_MAC_SPEED_SEL_1000MBPS | M_MAC_BURST_EN;		break;			case sbmac_speed_auto:		/* XXX not implemented */		/* fall through */	default:		return 0;	}		/*	 * Send the bits back to the hardware 	 */		SBMAC_WRITECSR(s->sbm_framecfg,framecfg);	SBMAC_WRITECSR(s->sbm_maccfg,cfg);		return 1;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/2039973af59889fea0d14362eae56792cfe8d25a/sb1250-mac.c/buggy/drivers/net/sb1250-mac.c