Skip to contentSkip to conversation

USB: drivers/usb/atm/usb_atm.c: fix nonzero snd_padding case

PATCH New Greg KH 1 participant 2 messages Dec 22, 2004

Subsystems (3)
lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/2 USB: drivers/usb/atm/usb_atm.c: fix nonzero snd_padding case

This is the patch to fix the case when snd_padding is not zero, updated according to Duncan's comments. Also it changes the driver name to reflect its generic nature.

drivers/usb/atm/usb_atm.c +5 -5
@@ -94,7 +94,7 @@
 
 #define DRIVER_AUTHOR	"Johan Verrept, Duncan Sands <[email protected]>"
 #define DRIVER_VERSION	"1.8"
-#define DRIVER_DESC	"Alcatel SpeedTouch USB driver version " DRIVER_VERSION
+#define DRIVER_DESC	"Generic USB ATM/DSL I/O, version " DRIVER_VERSION
 
 static unsigned int num_rcv_urbs = UDSL_DEFAULT_RCV_URBS;
 static unsigned int num_snd_urbs = UDSL_DEFAULT_SND_URBS;
@@ -369,10 +369,6 @@
 	if (!(ctrl->num_cells -= ne) || !(howmany -= ne))
 		goto out;
 
-	if (instance->snd_padding) {
-		memset(target, 0, instance->snd_padding);
-		target += instance->snd_padding;
-	}
 	udsl_fill_cell_header(target, ctrl->atm_data.vcc);
 	target += ATM_CELL_HEADER;
 	memcpy(target, skb->data, skb->len);
@@ -387,6 +383,10 @@
 			goto out;
 		}
 
+		if (instance->snd_padding) {
+			memset(target, 0, instance->snd_padding);
+			target += instance->snd_padding;
+		}
 		udsl_fill_cell_header(target, ctrl->atm_data.vcc);
 		target += ATM_CELL_HEADER;
 		memset(target, 0, ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER);
author
#1 lore raw

PATCH 2/2 USB: fix up warning messages spit out by the keyspan driver.

I missed this in the previous usb_kill_urb() cleanup. Thanks to Pat Mochel for reporting this.

drivers/usb/serial/keyspan.c +1 -1
diff -Nru a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
@@ -1121,7 +1121,7 @@
 {
 	if (urb && urb->status == -EINPROGRESS) {
 		urb->transfer_flags &= ~URB_ASYNC_UNLINK;
-		usb_unlink_urb(urb);
+		usb_kill_urb(urb);
 	}
 }