while (hw->st_idx != hwidx && work_done < to_do) { 
 do { 
static int sky2_poll(struct net_device *dev0, int *budget){	struct sky2_hw *hw = ((struct sky2_port *) netdev_priv(dev0))->hw;	unsigned int to_do = min(dev0->quota, *budget);	unsigned int work_done = 0;	u16 hwidx;	hwidx = sky2_read16(hw, STAT_PUT_IDX);	BUG_ON(hwidx >= STATUS_RING_SIZE); 	rmb();	while (hw->st_idx != hwidx && work_done < to_do) {		struct sky2_status_le *le = hw->st_le + hw->st_idx;		struct sky2_port *sky2;		struct sk_buff *skb;		u32 status;		u16 length;		BUG_ON(le->link >= hw->ports);		if (!hw->dev[le->link])			goto skip;		sky2 = netdev_priv(hw->dev[le->link]);		status = le32_to_cpu(le->status);		length = le16_to_cpu(le->length);		switch (le->opcode & ~HW_OWNER) {		case OP_RXSTAT:			skb = sky2_receive(sky2, length, status);			if (!skb)				break;#ifdef SKY2_VLAN_TAG_USED			if (sky2->vlgrp && (status & GMR_FS_VLAN)) {				vlan_hwaccel_receive_skb(skb,							 sky2->vlgrp,							 be16_to_cpu(sky2->rx_tag));			} else#endif				netif_receive_skb(skb);			break;#ifdef SKY2_VLAN_TAG_USED		case OP_RXVLAN:			sky2->rx_tag = length;			break;		case OP_RXCHKSVLAN:			sky2->rx_tag = length;			/* fall through */#endif		case OP_RXCHKS:			skb = sky2->rx_ring[sky2->rx_next].skb;			skb->ip_summed = CHECKSUM_HW;			skb->csum = le16_to_cpu(status);			break;		case OP_TXINDEXLE:			sky2_tx_complete(sky2,					 tx_index(sky2->port, status, length));			break;		default:			if (net_ratelimit())				printk(KERN_WARNING PFX				       "unknown status opcode 0x%x\n",				       le->opcode);			break;		}	skip:		hw->st_idx = (hw->st_idx + 1) % STATUS_RING_SIZE;		if (hw->st_idx == hwidx) {			hwidx = sky2_read16(hw, STAT_PUT_IDX);			rmb();		}	}	mmiowb();	if (hw->dev[0])		rx_set_put(hw->dev[0]);	if (hw->dev[1])		rx_set_put(hw->dev[1]);	*budget -= work_done;	dev0->quota -= work_done;	if (work_done < to_do) {		/*		 * Another chip workaround, need to restart TX timer if status		 * LE was handled. WA_DEV_43_418		 */		if (is_ec_a1(hw)) {			sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP);			sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START);		}		hw->intr_mask |= Y2_IS_STAT_BMU;		sky2_write32(hw, B0_IMSK, hw->intr_mask);		sky2_read32(hw, B0_IMSK);		netif_rx_complete(dev0);	}	return work_done >= to_do;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/bea86103313fae2e29f2d6eb9a4bd7cbeabd4d32/sky2.c/buggy/drivers/net/sky2.c