printk(KERN_NOTICE "%s: multicast setup failed.\n", 
printk(KERN_NOTICE "%s: multicast setup failed.\n", 
set_multicast_list(struct net_device *dev){	struct eepro_local *lp = netdev_priv(dev);	short ioaddr = dev->base_addr;	unsigned short mode;	struct dev_mc_list *dmi=dev->mc_list;	if (dev->flags&(IFF_ALLMULTI|IFF_PROMISC) || dev->mc_count > 63)	{		/*		 *	We must make the kernel realise we had to move		 *	into promisc mode or we start all out war on		 *	the cable. If it was a promisc request the		 *	flag is already set. If not we assert it.		 */		dev->flags|=IFF_PROMISC;		eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */		mode = inb(ioaddr + REG2);		outb(mode | PRMSC_Mode, ioaddr + REG2);		mode = inb(ioaddr + REG3);		outb(mode, ioaddr + REG3); /* writing reg. 3 to complete the update */		eepro_sw2bank0(ioaddr); /* Return to BANK 0 now */		printk(KERN_INFO "%s: promiscuous mode enabled.\n", dev->name);	}	else if (dev->mc_count==0 )	{		eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */		mode = inb(ioaddr + REG2);		outb(mode & 0xd6, ioaddr + REG2); /* Turn off Multi-IA and PRMSC_Mode bits */		mode = inb(ioaddr + REG3);		outb(mode, ioaddr + REG3); /* writing reg. 3 to complete the update */		eepro_sw2bank0(ioaddr); /* Return to BANK 0 now */	}	else	{		unsigned short status, *eaddrs;		int i, boguscount = 0;		/* Disable RX and TX interrupts.  Necessary to avoid		   corruption of the HOST_ADDRESS_REG by interrupt		   service routines. */		eepro_dis_int(ioaddr);		eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */		mode = inb(ioaddr + REG2);		outb(mode | Multi_IA, ioaddr + REG2);		mode = inb(ioaddr + REG3);		outb(mode, ioaddr + REG3); /* writing reg. 3 to complete the update */		eepro_sw2bank0(ioaddr); /* Return to BANK 0 now */		outw(lp->tx_end, ioaddr + HOST_ADDRESS_REG);		outw(MC_SETUP, ioaddr + IO_PORT);		outw(0, ioaddr + IO_PORT);		outw(0, ioaddr + IO_PORT);		outw(6*(dev->mc_count + 1), ioaddr + IO_PORT);		for (i = 0; i < dev->mc_count; i++)		{			eaddrs=(unsigned short *)dmi->dmi_addr;			dmi=dmi->next;			outw(*eaddrs++, ioaddr + IO_PORT);			outw(*eaddrs++, ioaddr + IO_PORT);			outw(*eaddrs++, ioaddr + IO_PORT);		}		eaddrs = (unsigned short *) dev->dev_addr;		outw(eaddrs[0], ioaddr + IO_PORT);		outw(eaddrs[1], ioaddr + IO_PORT);		outw(eaddrs[2], ioaddr + IO_PORT);		outw(lp->tx_end, ioaddr + lp->xmt_bar);		outb(MC_SETUP, ioaddr);		/* Update the transmit queue */		i = lp->tx_end + XMT_HEADER + 6*(dev->mc_count + 1);		if (lp->tx_start != lp->tx_end)		{			/* update the next address and the chain bit in the			   last packet */			outw(lp->tx_last + XMT_CHAIN, ioaddr + HOST_ADDRESS_REG);			outw(i, ioaddr + IO_PORT);			outw(lp->tx_last + XMT_COUNT, ioaddr + HOST_ADDRESS_REG);			status = inw(ioaddr + IO_PORT);			outw(status | CHAIN_BIT, ioaddr + IO_PORT);			lp->tx_end = i ;		}		else {			lp->tx_start = lp->tx_end = i ;		}		/* Acknowledge that the MC setup is done */		do { /* We should be doing this in the eepro_interrupt()! */			SLOW_DOWN;			SLOW_DOWN;			if (inb(ioaddr + STATUS_REG) & 0x08)			{				i = inb(ioaddr);				outb(0x08, ioaddr + STATUS_REG);				if (i & 0x20) { /* command ABORTed */					printk(KERN_NOTICE "%s: multicast setup failed.\n", 						dev->name);					break;				} else if ((i & 0x0f) == 0x03)	{ /* MC-Done */					printk(KERN_DEBUG "%s: set Rx mode to %d address%s.\n",						dev->name, dev->mc_count,						dev->mc_count > 1 ? "es":"");					break;				}			}		} while (++boguscount < 100);		/* Re-enable RX and TX interrupts */		eepro_en_int(ioaddr);	}	if (lp->eepro == LAN595FX_10ISA) {		eepro_complete_selreset(ioaddr);	}	else		eepro_en_rx(ioaddr);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d61780c0d384939ef31c46b47442854d5def4623/eepro.c/buggy/drivers/net/eepro.c