SBMAC_WRITECSR(port,reg); 
__raw_writeq(reg, port); 
static void sbmac_setmulti(struct sbmac_softc *sc){	uint64_t reg;	sbmac_port_t port;	int idx;	struct dev_mc_list *mclist;	struct net_device *dev = sc->sbm_dev;		/* 	 * Clear out entire multicast table.  We do this by nuking	 * the entire hash table and all the direct matches except	 * the first one, which is used for our station address 	 */		for (idx = 1; idx < MAC_ADDR_COUNT; idx++) {		port = sc->sbm_base + R_MAC_ADDR_BASE+(idx*sizeof(uint64_t));		SBMAC_WRITECSR(port,0);		}		for (idx = 0; idx < MAC_HASH_COUNT; idx++) {		port = sc->sbm_base + R_MAC_HASH_BASE+(idx*sizeof(uint64_t));		SBMAC_WRITECSR(port,0);		}		/*	 * Clear the filter to say we don't want any multicasts.	 */		reg = SBMAC_READCSR(sc->sbm_rxfilter);	reg &= ~(M_MAC_MCAST_INV | M_MAC_MCAST_EN);	SBMAC_WRITECSR(sc->sbm_rxfilter,reg);		if (dev->flags & IFF_ALLMULTI) {		/* 		 * Enable ALL multicasts.  Do this by inverting the 		 * multicast enable bit. 		 */		reg = SBMAC_READCSR(sc->sbm_rxfilter);		reg |= (M_MAC_MCAST_INV | M_MAC_MCAST_EN);		SBMAC_WRITECSR(sc->sbm_rxfilter,reg);		return;	}		/* 	 * Progam new multicast entries.  For now, only use the	 * perfect filter.  In the future we'll need to use the	 * hash filter if the perfect filter overflows	 */		/* XXX only using perfect filter for now, need to use hash	 * XXX if the table overflows */		idx = 1;		/* skip station address */	mclist = dev->mc_list;	while (mclist && (idx < MAC_ADDR_COUNT)) {		reg = sbmac_addr2reg(mclist->dmi_addr);		port = sc->sbm_base + R_MAC_ADDR_BASE+(idx * sizeof(uint64_t));		SBMAC_WRITECSR(port,reg);		idx++;		mclist = mclist->next;	}		/*		 * Enable the "accept multicast bits" if we programmed at least one	 * multicast. 	 */		if (idx > 1) {		reg = SBMAC_READCSR(sc->sbm_rxfilter);		reg |= M_MAC_MCAST_EN;		SBMAC_WRITECSR(sc->sbm_rxfilter,reg);	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/2039973af59889fea0d14362eae56792cfe8d25a/sb1250-mac.c/buggy/drivers/net/sb1250-mac.c