kernels/linux-2.4.0/drivers/net/dmfe.c
/*
 *	Allocate rx buffer,
 *	Allocate as many Rx buffers as possible.
 */
Allocate rx buffer,
Allocate as many Rx buffers as possible.
Allocate rx buffer Allocate as many Rx buffers as possible .
static void allocated_rx_buffer(struct dmfe_board_info *db)
{
	struct rx_desc *rxptr;
	struct sk_buff *skb;
	rxptr = db->rx_insert_ptr;
	while (db->rx_avail_cnt < RX_DESC_CNT) {
		if ((skb = alloc_skb(RX_ALLOC_SIZE, GFP_ATOMIC)) == NULL)
			break;
		rxptr->rx_skb_ptr = (u32) skb;
		rxptr->rdes2 = virt_to_bus(skb->tail);
		rxptr->rdes0 = 0x80000000;
		rxptr = (struct rx_desc *) rxptr->next_rx_desc;
		db->rx_avail_cnt++;
	}
	db->rx_insert_ptr = rxptr;
}
static void allocated_rx_buffer ( struct dmfe_board_info * db ) { struct rx_desc * rxptr ; struct sk_buff * skb ; rxptr = db -> rx_insert_ptr ; while ( db -> rx_avail_cnt < RX_DESC_CNT ) { if ( ( skb = alloc_skb ( RX_ALLOC_SIZE , GFP_ATOMIC ) ) == NULL ) break ; rxptr -> rx_skb_ptr = ( u32 ) skb ; rxptr -> rdes2 = virt_to_bus ( skb -> tail ) ; rxptr -> rdes0 = 0x80000000 ; rxptr = ( struct rx_desc * ) rxptr -> next_rx_desc ; db -> rx_avail_cnt ++ ; } db -> rx_insert_ptr = rxptr ; }
Allocate rx buffer,
      Allocate as many Rx buffers as possible.
Allocate rx buffer Allocate as many Rx buffers as possible .