sonic_dcr = SONIC_DCR_RFT1 | SONIC_DCR_TFT0 | SONIC_DCR_PO1 | SONIC_DCR_BMS; 
sonic_dcr = SONIC_DCR_RFT1 | SONIC_DCR_TFT0 | SONIC_DCR_PO1 | SONIC_DCR_BMS; 
int __init mac_nubus_sonic_probe(struct net_device* dev){	static int slots;	struct nubus_dev* ndev = NULL;	unsigned long base_addr, prom_addr;	u16 sonic_dcr;	int id;	int i;	int dma_bitmode;	/* Find the first SONIC that hasn't been initialized already */	while ((ndev = nubus_find_type(NUBUS_CAT_NETWORK,				       NUBUS_TYPE_ETHERNET, ndev)) != NULL)	{		/* Have we seen it already? */		if (slots & (1<<ndev->board->slot))			continue;		slots |= 1<<ndev->board->slot;		/* Is it one of ours? */		if ((id = macsonic_ident(ndev)) != -1)			break;	}	if (ndev == NULL)		return -ENODEV;	switch (id) {	case MACSONIC_DUODOCK:		base_addr = ndev->board->slot_addr + DUODOCK_SONIC_REGISTERS;		prom_addr = ndev->board->slot_addr + DUODOCK_SONIC_PROM_BASE;		sonic_dcr = SONIC_DCR_EXBUS | SONIC_DCR_RFT0 | SONIC_DCR_RFT1			| SONIC_DCR_TFT0;		reg_offset = 2;		dma_bitmode = 1;		break;	case MACSONIC_APPLE:		base_addr = ndev->board->slot_addr + APPLE_SONIC_REGISTERS;		prom_addr = ndev->board->slot_addr + APPLE_SONIC_PROM_BASE;		sonic_dcr = SONIC_DCR_BMS | SONIC_DCR_RFT1 | SONIC_DCR_TFT0;		reg_offset = 0;		dma_bitmode = 1;		break;	case MACSONIC_APPLE16:		base_addr = ndev->board->slot_addr + APPLE_SONIC_REGISTERS;		prom_addr = ndev->board->slot_addr + APPLE_SONIC_PROM_BASE;		sonic_dcr = SONIC_DCR_EXBUS 			| SONIC_DCR_RFT1 | SONIC_DCR_TFT0			| SONIC_DCR_PO1 | SONIC_DCR_BMS; 		reg_offset = 0;		dma_bitmode = 0;		break;	case MACSONIC_DAYNALINK:		base_addr = ndev->board->slot_addr + APPLE_SONIC_REGISTERS;		prom_addr = ndev->board->slot_addr + DAYNALINK_PROM_BASE;		sonic_dcr = SONIC_DCR_RFT1 | SONIC_DCR_TFT0			| SONIC_DCR_PO1 | SONIC_DCR_BMS; 		reg_offset = 0;		dma_bitmode = 0;		break;	case MACSONIC_DAYNA:		base_addr = ndev->board->slot_addr + DAYNA_SONIC_REGISTERS;		prom_addr = ndev->board->slot_addr + DAYNA_SONIC_MAC_ADDR;		sonic_dcr = SONIC_DCR_BMS			| SONIC_DCR_RFT1 | SONIC_DCR_TFT0 | SONIC_DCR_PO1;		reg_offset = 0;		dma_bitmode = 0;		break;	default:		printk(KERN_ERR "macsonic: WTF, id is %d\n", id);		return -ENODEV;	}	/* Danger!  My arms are flailing wildly!  You *must* set this           before using sonic_read() */	dev->base_addr = base_addr;	dev->irq = SLOT2IRQ(ndev->board->slot);	if (!sonic_version_printed) {		printk(KERN_INFO "%s", version);		sonic_version_printed = 1;	}	printk(KERN_INFO "%s: %s in slot %X\n",	       dev->name, ndev->board->name, ndev->board->slot);	printk(KERN_INFO "%s: revision 0x%04x, using %d bit DMA and register offset %d\n",	       dev->name, sonic_read(dev, SONIC_SR), dma_bitmode?32:16, reg_offset);	if(reg_offset) {		printk("%s: register offset unsupported.  please fix this if you know what it is.\n", dev->name);		return -ENODEV;	}	/* Software reset, then initialize control registers. */	sonic_write(dev, SONIC_CMD, SONIC_CR_RST);	sonic_write(dev, SONIC_DCR, sonic_dcr		    | (dma_bitmode ? SONIC_DCR_DW : 0));	/* Clear *and* disable interrupts to be on the safe side */	sonic_write(dev, SONIC_ISR,0x7fff);	sonic_write(dev, SONIC_IMR,0);	/* Now look for the MAC address. */	if (mac_nubus_sonic_ethernet_addr(dev, prom_addr, id) != 0)		return -ENODEV;	printk(KERN_INFO "MAC ");	for (i = 0; i < 6; i++) {		printk("%2.2x", dev->dev_addr[i]);		if (i < 5)			printk(":");	}	printk(" IRQ %d\n", dev->irq);	/* Shared init code */	return macsonic_init(dev);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/efcce839360fb3a7b6dedeacaec80f68b0f2d052/macsonic.c/clean/drivers/net/macsonic.c