if (!(tp->chip_id == ULI526X && (tp->revision = 0x40 || tp->revision == 0x50))) { 
if (!(tp->chip_id == ULI526X && (tp->revision == 0x40 || tp->revision == 0x50))) { 
static void set_rx_mode(struct net_device *dev){	struct tulip_private *tp = netdev_priv(dev);	void __iomem *ioaddr = tp->base_addr;	int csr6;	csr6 = ioread32(ioaddr + CSR6) & ~0x00D5;	tp->csr6 &= ~0x00D5;	if (dev->flags & IFF_PROMISC) {			/* Set promiscuous. */		tp->csr6 |= AcceptAllMulticast | AcceptAllPhys;		csr6 |= AcceptAllMulticast | AcceptAllPhys;		/* Unconditionally log net taps. */		printk(KERN_INFO "%s: Promiscuous mode enabled.\n", dev->name);	} else if ((dev->mc_count > 1000)  ||  (dev->flags & IFF_ALLMULTI)) {		/* Too many to filter well -- accept all multicasts. */		tp->csr6 |= AcceptAllMulticast;		csr6 |= AcceptAllMulticast;	} else	if (tp->flags & MC_HASH_ONLY) {		/* Some work-alikes have only a 64-entry hash filter table. */		/* Should verify correctness on big-endian/__powerpc__ */		struct dev_mc_list *mclist;		int i;		if (dev->mc_count > 64) {		/* Arbitrary non-effective limit. */			tp->csr6 |= AcceptAllMulticast;			csr6 |= AcceptAllMulticast;		} else {			u32 mc_filter[2] = {0, 0};		 /* Multicast hash filter */			int filterbit;			for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;				 i++, mclist = mclist->next) {				if (tp->flags & COMET_MAC_ADDR)					filterbit = ether_crc_le(ETH_ALEN, mclist->dmi_addr);				else					filterbit = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;				filterbit &= 0x3f;				mc_filter[filterbit >> 5] |= 1 << (filterbit & 31);				if (tulip_debug > 2) {					printk(KERN_INFO "%s: Added filter for %2.2x:%2.2x:%2.2x:"						   "%2.2x:%2.2x:%2.2x  %8.8x bit %d.\n", dev->name,						   mclist->dmi_addr[0], mclist->dmi_addr[1],						   mclist->dmi_addr[2], mclist->dmi_addr[3],						   mclist->dmi_addr[4], mclist->dmi_addr[5],						   ether_crc(ETH_ALEN, mclist->dmi_addr), filterbit);				}			}			if (mc_filter[0] == tp->mc_filter[0]  &&				mc_filter[1] == tp->mc_filter[1])				;				/* No change. */			else if (tp->flags & IS_ASIX) {				iowrite32(2, ioaddr + CSR13);				iowrite32(mc_filter[0], ioaddr + CSR14);				iowrite32(3, ioaddr + CSR13);				iowrite32(mc_filter[1], ioaddr + CSR14);			} else if (tp->flags & COMET_MAC_ADDR) {				iowrite32(mc_filter[0], ioaddr + 0xAC);				iowrite32(mc_filter[1], ioaddr + 0xB0);			}			tp->mc_filter[0] = mc_filter[0];			tp->mc_filter[1] = mc_filter[1];		}	} else {		unsigned long flags;		u32 tx_flags = 0x08000000 | 192;		/* Note that only the low-address shortword of setup_frame is valid!		   The values are doubled for big-endian architectures. */		if (dev->mc_count > 14) { /* Must use a multicast hash table. */			build_setup_frame_hash(tp->setup_frame, dev);			tx_flags = 0x08400000 | 192;		} else {			build_setup_frame_perfect(tp->setup_frame, dev);		}		spin_lock_irqsave(&tp->lock, flags);		if (tp->cur_tx - tp->dirty_tx > TX_RING_SIZE - 2) {			/* Same setup recently queued, we need not add it. */		} else {			unsigned int entry;			int dummy = -1;			/* Now add this frame to the Tx list. */			entry = tp->cur_tx++ % TX_RING_SIZE;			if (entry != 0) {				/* Avoid a chip errata by prefixing a dummy entry. Don't do				   this on the ULI526X as it triggers a different problem */				if (!(tp->chip_id == ULI526X && (tp->revision = 0x40 || tp->revision == 0x50))) {					tp->tx_buffers[entry].skb = NULL;					tp->tx_buffers[entry].mapping = 0;					tp->tx_ring[entry].length =						(entry == TX_RING_SIZE-1) ? cpu_to_le32(DESC_RING_WRAP) : 0;					tp->tx_ring[entry].buffer1 = 0;					/* Must set DescOwned later to avoid race with chip */					dummy = entry;					entry = tp->cur_tx++ % TX_RING_SIZE;				}			}			tp->tx_buffers[entry].skb = NULL;			tp->tx_buffers[entry].mapping =				pci_map_single(tp->pdev, tp->setup_frame,					       sizeof(tp->setup_frame),					       PCI_DMA_TODEVICE);			/* Put the setup frame on the Tx list. */			if (entry == TX_RING_SIZE-1)				tx_flags |= DESC_RING_WRAP;		/* Wrap ring. */			tp->tx_ring[entry].length = cpu_to_le32(tx_flags);			tp->tx_ring[entry].buffer1 =				cpu_to_le32(tp->tx_buffers[entry].mapping);			tp->tx_ring[entry].status = cpu_to_le32(DescOwned);			if (dummy >= 0)				tp->tx_ring[dummy].status = cpu_to_le32(DescOwned);			if (tp->cur_tx - tp->dirty_tx >= TX_RING_SIZE - 2)				netif_stop_queue(dev);			/* Trigger an immediate transmit demand. */			iowrite32(0, ioaddr + CSR1);		}		spin_unlock_irqrestore(&tp->lock, flags);	}	iowrite32(csr6, ioaddr + CSR6);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c4cc26d3310a6614a20e32276228a5d44159fc9b/tulip_core.c/buggy/drivers/net/tulip/tulip_core.c