sbmac_orig_hwaddr[idx] = SBMAC_READCSR(IOADDR(port+R_MAC_ETHERNET_ADDR)); 
sbmac_orig_hwaddr[idx] = __raw_readq(IOADDR(port+R_MAC_ETHERNET_ADDR)); 
sbmac_init_module(void){	int idx;	struct net_device *dev;	sbmac_port_t port;	int chip_max_units;		/*	 * For bringup when not using the firmware, we can pre-fill	 * the MAC addresses using the environment variables	 * specified in this file (or maybe from the config file?)	 */#ifdef SBMAC_ETH0_HWADDR	sbmac_setup_hwaddr(0,SBMAC_ETH0_HWADDR);#endif#ifdef SBMAC_ETH1_HWADDR	sbmac_setup_hwaddr(1,SBMAC_ETH1_HWADDR);#endif#ifdef SBMAC_ETH2_HWADDR	sbmac_setup_hwaddr(2,SBMAC_ETH2_HWADDR);#endif	/*	 * Walk through the Ethernet controllers and find	 * those who have their MAC addresses set.	 */	switch (soc_type) {	case K_SYS_SOC_TYPE_BCM1250:	case K_SYS_SOC_TYPE_BCM1250_ALT:		chip_max_units = 3;		break;	case K_SYS_SOC_TYPE_BCM1120:	case K_SYS_SOC_TYPE_BCM1125:	case K_SYS_SOC_TYPE_BCM1125H:	case K_SYS_SOC_TYPE_BCM1250_ALT2: /* Hybrid */		chip_max_units = 2;		break;	default:		chip_max_units = 0;		break;	}	if (chip_max_units > MAX_UNITS)		chip_max_units = MAX_UNITS;	for (idx = 0; idx < chip_max_units; idx++) {	        /*	         * This is the base address of the MAC.		 */	        port = A_MAC_CHANNEL_BASE(idx);		/*			 * The R_MAC_ETHERNET_ADDR register will be set to some nonzero		 * value for us by the firmware if we're going to use this MAC.		 * If we find a zero, skip this MAC.		 */		sbmac_orig_hwaddr[idx] = SBMAC_READCSR(IOADDR(port+R_MAC_ETHERNET_ADDR));		if (sbmac_orig_hwaddr[idx] == 0) {			printk(KERN_DEBUG "sbmac: not configuring MAC at "			       "%lx\n", port);		    continue;		}		/*		 * Okay, cool.  Initialize this MAC.		 */		dev = alloc_etherdev(sizeof(struct sbmac_softc));		if (!dev) 			return -ENOMEM;	/* return ENOMEM */		printk(KERN_DEBUG "sbmac: configuring MAC at %lx\n", port);		dev->irq = K_INT_MAC_0 + idx;		dev->base_addr = port;		dev->mem_end = 0;		if (sbmac_init(dev, idx)) {			port = A_MAC_CHANNEL_BASE(idx);			SBMAC_WRITECSR(IOADDR(port+R_MAC_ETHERNET_ADDR),				       sbmac_orig_hwaddr[idx]);			free_netdev(dev);			continue;		}		dev_sbmac[idx] = dev;	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/2039973af59889fea0d14362eae56792cfe8d25a/sb1250-mac.c/buggy/drivers/net/sb1250-mac.c