Commit 6570ebc4 authored by Frank Blaschka's avatar Frank Blaschka Committed by David S. Miller

qeth: EDDP does not work on large MTUs

Fix filling the qdio buffers in EDDP mode.
Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: default avatarUrsula Braun <braunu@de.ibm.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent bc4b2b49
...@@ -159,13 +159,15 @@ qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue, ...@@ -159,13 +159,15 @@ qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue,
buffer = buf->buffer; buffer = buf->buffer;
/* fill one skb into buffer */ /* fill one skb into buffer */
for (i = 0; i < ctx->elements_per_skb; ++i){ for (i = 0; i < ctx->elements_per_skb; ++i){
buffer->element[buf->next_element_to_fill].addr = if (ctx->elements[element].length != 0) {
ctx->elements[element].addr; buffer->element[buf->next_element_to_fill].
buffer->element[buf->next_element_to_fill].length = addr = ctx->elements[element].addr;
ctx->elements[element].length; buffer->element[buf->next_element_to_fill].
buffer->element[buf->next_element_to_fill].flags = length = ctx->elements[element].length;
ctx->elements[element].flags; buffer->element[buf->next_element_to_fill].
buf->next_element_to_fill++; flags = ctx->elements[element].flags;
buf->next_element_to_fill++;
}
element++; element++;
elements--; elements--;
} }
......
...@@ -4508,7 +4508,8 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue, ...@@ -4508,7 +4508,8 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
/* check if we have enough elements (including following /* check if we have enough elements (including following
* free buffers) to handle eddp context */ * free buffers) to handle eddp context */
if (qeth_eddp_check_buffers_for_context(queue,ctx) < 0){ if (qeth_eddp_check_buffers_for_context(queue,ctx) < 0){
printk("eddp tx_dropped 1\n"); if (net_ratelimit())
PRINT_WARN("eddp tx_dropped 1\n");
rc = -EBUSY; rc = -EBUSY;
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment