for (j = 0, blk = 0; j < config->rx_cfg[i].num_rxd; j++) { off = j % (MAX_RXDS_PER_BLOCK + 1); rxdp = mac_control->rings[i].rx_blocks[blk]. block_virt_addr + off; 
for (blk = 0; blk < rx_ring_sz[i]; blk++) free_rxd_blk(sp,i,blk); 
static void free_rx_buffers(struct s2io_nic *sp){	struct net_device *dev = sp->dev;	int i, j, blk = 0, off, buf_cnt = 0;	RxD_t *rxdp;	struct sk_buff *skb;	mac_info_t *mac_control;	struct config_param *config;#ifdef CONFIG_2BUFF_MODE	buffAdd_t *ba;#endif	mac_control = &sp->mac_control;	config = &sp->config;	for (i = 0; i < config->rx_ring_num; i++) {		for (j = 0, blk = 0; j < config->rx_cfg[i].num_rxd; j++) {			off = j % (MAX_RXDS_PER_BLOCK + 1);			rxdp = mac_control->rings[i].rx_blocks[blk].				block_virt_addr + off;#ifndef CONFIG_2BUFF_MODE			if (rxdp->Control_1 == END_OF_BLOCK) {				rxdp =				    (RxD_t *) ((unsigned long) rxdp->					       Control_2);				j++;				blk++;			}#else			if (rxdp->Host_Control == END_OF_BLOCK) {				blk++;				continue;			}#endif			if (!(rxdp->Control_1 & RXD_OWN_XENA)) {				memset(rxdp, 0, sizeof(RxD_t));				continue;			}			skb =			    (struct sk_buff *) ((unsigned long) rxdp->						Host_Control);			if (skb) {#ifndef CONFIG_2BUFF_MODE				pci_unmap_single(sp->pdev, (dma_addr_t)						 rxdp->Buffer0_ptr,						 dev->mtu +						 HEADER_ETHERNET_II_802_3_SIZE						 + HEADER_802_2_SIZE +						 HEADER_SNAP_SIZE,						 PCI_DMA_FROMDEVICE);#else				ba = &mac_control->rings[i].ba[blk][off];				pci_unmap_single(sp->pdev, (dma_addr_t)						 rxdp->Buffer0_ptr,						 BUF0_LEN,						 PCI_DMA_FROMDEVICE);				pci_unmap_single(sp->pdev, (dma_addr_t)						 rxdp->Buffer1_ptr,						 BUF1_LEN,						 PCI_DMA_FROMDEVICE);				pci_unmap_single(sp->pdev, (dma_addr_t)						 rxdp->Buffer2_ptr,						 dev->mtu + BUF0_LEN + 4,						 PCI_DMA_FROMDEVICE);#endif				dev_kfree_skb(skb);				atomic_dec(&sp->rx_bufs_left[i]);				buf_cnt++;			}			memset(rxdp, 0, sizeof(RxD_t));		}		mac_control->rings[i].rx_curr_put_info.block_index = 0;		mac_control->rings[i].rx_curr_get_info.block_index = 0;		mac_control->rings[i].rx_curr_put_info.offset = 0;		mac_control->rings[i].rx_curr_get_info.offset = 0;		atomic_set(&sp->rx_bufs_left[i], 0);		DBG_PRINT(INIT_DBG, "%s:Freed 0x%x Rx Buffers on ring%d\n",			  dev->name, buf_cnt, i);	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/da6971d8ece2ec9762509e20dda6808335b5a10b/s2io.c/clean/drivers/net/s2io.c