Hi,
I've been experimenting with the Zaurus support and have come across two
problems.
The first (patch against 2.4.20 included) is that the tx_fixup adds 6 bytes
for the CRC and padding, but the logic to pad the packet if it is a multiple
of the block size in usbnet_start_xmit is working off the old buffer size.
This meant an occasional packet having an extra byte, which then failed the
CRC on the Z.
The second is that if the Z sends packets of length equal to the MTU size, the
receive buffer allocated in rx_submit doesn't include room for the 4 byte
CRC. I've hacked a +4 onto the buffer size, and that works fine for me, but
that's not a public fix. Is this the right place in the code to fix this?
Thanks,
Toby
--- linux-2.4.20/drivers/usb/usbnet.c 2002-12-14 15:01:42.000000000 +0000
+++ linux.tm/drivers/usb/usbnet.c 2002-12-14 15:03:46.000000000 +0000
@@ -1932,7 +1932,7 @@
static int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
{
struct usbnet *dev = (struct usbnet *) net->priv;
- int length = skb->len;
+ int length;
int retval = NET_XMIT_SUCCESS;
struct urb *urb = 0;
struct skb_data *entry;
@@ -1953,6 +1953,9 @@
}
}
+ //As tx_fixup can change skb length, fetch it after fixup
+ length=skb->len;
+
if (!(urb = ALLOC_URB (0, GFP_ATOMIC))) {
dbg ("no urb");
goto drop;
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel