cfg = SBMAC_READCSR(s->sbm_maccfg); 
cfg = __raw_readq(s->sbm_maccfg); 
static int sbmac_set_duplex(struct sbmac_softc *s,sbmac_duplex_t duplex,sbmac_fc_t fc){	uint64_t cfg;		/*	 * Save new current values	 */		s->sbm_duplex = duplex;	s->sbm_fc = fc;		if (s->sbm_state == sbmac_state_on)		return 0;	/* save for next restart */		/*	 * Read current register values 	 */		cfg = SBMAC_READCSR(s->sbm_maccfg);		/*	 * Mask off the stuff we're about to change	 */		cfg &= ~(M_MAC_FC_SEL | M_MAC_FC_CMD | M_MAC_HDX_EN);			switch (duplex) {	case sbmac_duplex_half:		switch (fc) {		case sbmac_fc_disabled:			cfg |= M_MAC_HDX_EN | V_MAC_FC_CMD_DISABLED;			break;					case sbmac_fc_collision:			cfg |= M_MAC_HDX_EN | V_MAC_FC_CMD_ENABLED;			break;					case sbmac_fc_carrier:			cfg |= M_MAC_HDX_EN | V_MAC_FC_CMD_ENAB_FALSECARR;			break;					case sbmac_fc_auto:		/* XXX not implemented */			/* fall through */					   		case sbmac_fc_frame:		/* not valid in half duplex */		default:			/* invalid selection */			return 0;		}		break;			case sbmac_duplex_full:		switch (fc) {		case sbmac_fc_disabled:			cfg |= V_MAC_FC_CMD_DISABLED;			break;					case sbmac_fc_frame:			cfg |= V_MAC_FC_CMD_ENABLED;			break;					case sbmac_fc_collision:	/* not valid in full duplex */		case sbmac_fc_carrier:		/* not valid in full duplex */		case sbmac_fc_auto:		/* XXX not implemented */			/* fall through */					   		default:			return 0;		}		break;	case sbmac_duplex_auto:		/* XXX not implemented */		break;	}		/*	 * Send the bits back to the hardware 	 */		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