]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
qeth: EDDP does not work on large MTUs
authorFrank Blaschka <frank.blaschka@de.ibm.com>
Fri, 5 Oct 2007 14:45:45 +0000 (16:45 +0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:54:40 +0000 (16:54 -0700)
Fix filling the qdio buffers in EDDP mode.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/s390/net/qeth_eddp.c
drivers/s390/net/qeth_main.c

index 70108fb1690653f58c08d8a4e09e0f79834041af..e3c268cfbffee855eae1c17a8274b9929c37390e 100644 (file)
@@ -159,13 +159,15 @@ qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue,
                buffer = buf->buffer;
                /* fill one skb into buffer */
                for (i = 0; i < ctx->elements_per_skb; ++i){
-                       buffer->element[buf->next_element_to_fill].addr =
-                               ctx->elements[element].addr;
-                       buffer->element[buf->next_element_to_fill].length =
-                               ctx->elements[element].length;
-                       buffer->element[buf->next_element_to_fill].flags =
-                               ctx->elements[element].flags;
-                       buf->next_element_to_fill++;
+                       if (ctx->elements[element].length != 0) {
+                               buffer->element[buf->next_element_to_fill].
+                               addr = ctx->elements[element].addr;
+                               buffer->element[buf->next_element_to_fill].
+                               length = ctx->elements[element].length;
+                               buffer->element[buf->next_element_to_fill].
+                               flags = ctx->elements[element].flags;
+                               buf->next_element_to_fill++;
+                       }
                        element++;
                        elements--;
                }
index b41a53816e92234a3ac9757834b7a70066fb97b1..fe6164795edaf720cc482cf938741f0331d7feab 100644 (file)
@@ -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
                         * free buffers) to handle eddp context */
                        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;
                                goto out;
                        }