# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#                  ChangeSet    1.428   -> 1.429  
#       drivers/usb/usbnet.c    1.14    -> 1.15   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/04/18      [EMAIL PROTECTED]     1.429
# [PATCH] USB GeneLink/NDIS tweaks
# 
# USB GeneLink/NDIS tweaks
# 
# This patch, from Oliver, discards slightly less data in cases
# where memory is very tight.  The GeneLink framing can batch
# several packets in one transmission, so it's always possible to
# at least report the last one, since it's already sitting in an SKB
# and we won't need a new one.
# 
# Random note, this seems to be the same issue I saw
# mentioned somewhere else recently:  MSFT host drivers
# with high latency for submitting bulk packets, so rather
# than just queuing them as they arrive, it turns out to be a
# win on the MSFT side to batch packets.
# --------------------------------------------
#
diff -Nru a/drivers/usb/usbnet.c b/drivers/usb/usbnet.c
--- a/drivers/usb/usbnet.c      Thu Apr 18 13:53:51 2002
+++ b/drivers/usb/usbnet.c      Thu Apr 18 13:53:51 2002
@@ -518,25 +518,25 @@
 
                // allocate the skb for the individual packet
                gl_skb = alloc_skb (size, GFP_ATOMIC);
-               if (gl_skb == 0)
-                       return 0;
+               if (gl_skb) {
 
-               // copy the packet data to the new skb
-               memcpy (gl_skb->data, packet->packet_data, size);
+                       // copy the packet data to the new skb
+                       memcpy (gl_skb->data, packet->packet_data, size);
 
-               // set skb data size
-               gl_skb->len = size;
-               gl_skb->dev = &dev->net;
+                       // set skb data size
+                       gl_skb->len = size;
+                       gl_skb->dev = &dev->net;
 
-               // determine the packet's protocol ID
-               gl_skb->protocol = eth_type_trans (gl_skb, &dev->net);
+                       // determine the packet's protocol ID
+                       gl_skb->protocol = eth_type_trans (gl_skb, &dev->net);
 
-               // update the status
-               dev->stats.rx_packets++;
-               dev->stats.rx_bytes += size;
+                       // update the status
+                       dev->stats.rx_packets++;
+                       dev->stats.rx_bytes += size;
 
-               // notify os of the received packet
-               status = netif_rx (gl_skb);
+                       // notify os of the received packet
+                       status = netif_rx (gl_skb);
+               }
 
                // advance to the next packet
                packet = (struct gl_packet *)

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to