Skip to contentSkip to conversation

p54usb: fix random traffic stalls (LM87)

PATCH In review Christian Lamparter 2 participants 3 messages Dec 20, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 p54usb: fix random traffic stalls (LM87)

All LM87 firmwares need a explicit termination "packet", in oder to finish the pending transfer properly.

---
Larry,

Does your test case still fail with this one?
---

drivers/net/wireless/p54/p54usb.c +1 -0
diff -Nurp a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
@@ -284,6 +284,7 @@ static void p54u_tx_lm87(struct ieee8021
 	usb_fill_bulk_urb(data_urb, priv->udev,
 			  usb_sndbulkpipe(priv->udev, P54U_PIPE_DATA),
 			  skb->data, skb->len, p54u_tx_cb, skb);
+	data_urb->transfer_flags |= URB_ZERO_PACKET;
 
 	usb_anchor_urb(data_urb, &priv->submitted);
 	if (usb_submit_urb(data_urb, GFP_ATOMIC)) {
#1 lore raw
Quoted 8 lines · Christian Lamparter

All LM87 firmwares need a explicit termination "packet", in oder to finish the pending transfer properly.

---
Larry,

Does your test case still fail with this one?

No, it seems to be fixed. I still have a failure, but the symptoms are different.

Today I had created the following script:

#! /usr/bin/perl
#

for ($i = 30; $i < 1600 ; $i++) {
        `ping -c 1 -s $i my_server`;
        printf ("%d\n ", $i);
}

I found that this script stalled for i of 372, 884 and 1396. I was still trying to find it it was a transmit or receive problem when your patch arrived. With this change, the ping script runs to completion, and my NFS compile ran a lot longer than previously.

When the connection failed, unloading the driver and reloading it yielded the lines

usb 1-5: (p54usb) reset failed! (-22)
p54usb: probe of 1-5:1.0 failed with error -22

In my estimation, I think the patch is clearly needed and should be pushed.

Larry

#2 lore raw
Quoted 5 lines · Larry Finger

When the connection failed, unloading the driver and reloading it yielded the lines

usb 1-5: (p54usb) reset failed! (-22)
p54usb: probe of 1-5:1.0 failed with error -22

I think this problem was thermal. After the device sat on the shelf for 20 minutes, it worked fine. Maybe I need a better heat sink as well.

Larry