/*start filling buffer entries ...*/ 
/*... if not, use this */ 
qeth_tso_fill_buffer(struct qeth_qdio_out_buffer *buf,		     struct sk_buff *skb){        int length, length_here, element;        int hdr_len;	struct qdio_buffer *buffer;	struct qeth_hdr_tso *hdr;	char *data;        QETH_DBF_TEXT(trace, 3, "tsfilbuf");	/*increment user count and queue skb ...*/        atomic_inc(&skb->users);        skb_queue_tail(&buf->skb_list, skb);	/*initialize all variables...*/        buffer = buf->buffer;	hdr = (struct qeth_hdr_tso *)skb->data;	hdr_len = sizeof(struct qeth_hdr_tso) + hdr->ext.dg_hdr_len;	data = skb->data + hdr_len;	length = skb->len - hdr_len;        element = buf->next_element_to_fill;	/*fill first buffer entry only with header information */	buffer->element[element].addr = skb->data;	buffer->element[element].length = hdr_len;	buffer->element[element].flags = SBAL_FLAGS_FIRST_FRAG;	buf->next_element_to_fill++;	if (skb_shinfo(skb)->nr_frags > 0) {                 __qeth_tso_fill_buffer_frag(buf, skb);                 goto out;        }       /*start filling buffer entries ...*/        element++;        while (length > 0) {                /* length_here is the remaining amount of data in this page */		length_here = PAGE_SIZE - ((unsigned long) data % PAGE_SIZE);		if (length < length_here)                        length_here = length;                buffer->element[element].addr = data;                buffer->element[element].length = length_here;                length -= length_here;                if (!length)                        buffer->element[element].flags =                                SBAL_FLAGS_LAST_FRAG;                 else                         buffer->element[element].flags =                                 SBAL_FLAGS_MIDDLE_FRAG;                data += length_here;                element++;        }        /*set the buffer to primed  ...*/        buf->next_element_to_fill = element;out:	atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED);        return 1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d801145d910cc4a0fb418dda1dee227cec993cbd/qeth_tso.c/clean/drivers/s390/net/qeth_tso.c