[PATCH] s390: qeth bug fixes
authorFrank Pavlic <pavlic@de.ibm.com>
Thu, 12 May 2005 18:37:53 +0000 (20:37 +0200)
committerJeff Garzik <jgarzik@pobox.com>
Sun, 15 May 2005 22:06:17 +0000 (18:06 -0400)
[patch 7/10] s390: qeth bug fixes.

From: Frank Pavlic <pavlic@de.ibm.com>

qeth network driver changes:
 - Removed redundant code, use the same qeth_fill_buffer_frag
   for TSO path either
 - Using skb->frags solely is not correct since skb->data still
   points to the beginning of the whole data, even when it is
   a small portion we have to fill the qdio buffer with it.

Signed-off-by: Frank Pavlic <pavlic@de.ibm.com>
drivers/s390/net/qeth.h
drivers/s390/net/qeth_eddp.c
drivers/s390/net/qeth_main.c
drivers/s390/net/qeth_tso.c
drivers/s390/net/qeth_tso.h

index a341041..501b87e 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "qeth_mpc.h"
 
-#define VERSION_QETH_H                 "$Revision: 1.135 $"
+#define VERSION_QETH_H                 "$Revision: 1.136 $"
 
 #ifdef CONFIG_QETH_IPV6
 #define QETH_VERSION_IPV6      ":IPv6"
@@ -866,6 +866,17 @@ qeth_push_skb(struct qeth_card *card, struct sk_buff **skb, int size)
         return hdr;
 }
 
+static inline int
+qeth_get_skb_data_len(struct sk_buff *skb)
+{
+       int len = skb->len;
+       int i;
+
+       for (i = 0; i < skb_shinfo(skb)->nr_frags; ++i)
+               len -= skb_shinfo(skb)->frags[i].size;
+       return len;
+}
+
 inline static int
 qeth_get_hlen(__u8 link_type)
 {
Simple merge
Simple merge
Simple merge
Simple merge