speedtch speedtch.c, 1.38, 1.39 usb_atm.c, 1.11, 1.12 usb_atm.h, 1.3, 1.4

Duncan Sands duncan at infradead.org
Wed Dec 29 16:18:35 EST 2004


Update of /home/cvs/speedtch
In directory phoenix.infradead.org:/tmp/cvs-serv16227

Modified Files:
	speedtch.c usb_atm.c usb_atm.h 
Log Message:
Different fix for various problems with the debugging logic (already applied upstream).
Fix from Roman Kagan for a cut-and-paste error when the send-padding code was added.


Index: speedtch.c
===================================================================
RCS file: /home/cvs/speedtch/speedtch.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- speedtch.c	23 Nov 2004 15:23:28 -0000	1.38
+++ speedtch.c	29 Dec 2004 21:18:32 -0000	1.39
@@ -21,7 +21,6 @@
  *
  ******************************************************************************/
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/gfp.h>
@@ -45,30 +44,10 @@
 
 #include "usb_atm.h"
 
-/*
-#define DEBUG
-#define VERBOSE_DEBUG
-*/
-
-#if !defined (DEBUG) && defined (CONFIG_USB_DEBUG)
-#	define DEBUG
-#endif
-
-#include <linux/usb.h>
-
 #if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
 #	define USE_FW_LOADER
 #endif
 
-#ifdef VERBOSE_DEBUG
-static int udsl_print_packet(const unsigned char *data, int len);
-#define PACKETDEBUG(arg...)	udsl_print_packet (arg)
-#define vdbg(arg...)		dbg (arg)
-#else
-#define PACKETDEBUG(arg...)
-#define vdbg(arg...)
-#endif
-
 #define DRIVER_AUTHOR	"Johan Verrept, Duncan Sands <duncan.sands at free.fr>"
 #define DRIVER_VERSION	"1.8"
 #define DRIVER_DESC	"Alcatel SpeedTouch USB driver version " DRIVER_VERSION

Index: usb_atm.c
===================================================================
RCS file: /home/cvs/speedtch/usb_atm.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- usb_atm.c	23 Nov 2004 15:23:28 -0000	1.11
+++ usb_atm.c	29 Dec 2004 21:18:32 -0000	1.12
@@ -62,7 +62,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/kernel.h>
@@ -84,23 +83,6 @@
 
 #include "usb_atm.h"
 
-/*
-#define DEBUG
-#define VERBOSE_DEBUG
-*/
-
-#if !defined (DEBUG) && defined (CONFIG_USB_DEBUG)
-#	define DEBUG
-#endif
-
-#include <linux/usb.h>
-
-#ifdef DEBUG
-#define UDSL_ASSERT(x)	BUG_ON(!(x))
-#else
-#define UDSL_ASSERT(x)	do { if (!(x)) warn("failed assertion '" #x "' at line %d", __LINE__); } while(0)
-#endif
-
 #ifdef VERBOSE_DEBUG
 static int udsl_print_packet(const unsigned char *data, int len);
 #define PACKETDEBUG(arg...)	udsl_print_packet (arg)
@@ -112,7 +94,7 @@
 
 #define DRIVER_AUTHOR	"Johan Verrept, Duncan Sands <duncan.sands at free.fr>"
 #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;
@@ -387,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);
@@ -405,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);

Index: usb_atm.h
===================================================================
RCS file: /home/cvs/speedtch/usb_atm.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- usb_atm.h	14 Oct 2004 11:17:34 -0000	1.3
+++ usb_atm.h	29 Dec 2004 21:18:32 -0000	1.4
@@ -21,13 +21,30 @@
  *
  ******************************************************************************/
 
+#include <linux/config.h>
 #include <linux/list.h>
-#include <linux/usb.h>
 #include <linux/kref.h>
 #include <linux/atm.h>
 #include <linux/atmdev.h>
 #include <asm/semaphore.h>
 
+/*
+#define DEBUG
+#define VERBOSE_DEBUG
+*/
+
+#if !defined (DEBUG) && defined (CONFIG_USB_DEBUG)
+#	define DEBUG
+#endif
+
+#include <linux/usb.h>
+
+#ifdef DEBUG
+#define UDSL_ASSERT(x)	BUG_ON(!(x))
+#else
+#define UDSL_ASSERT(x)	do { if (!(x)) warn("failed assertion '" #x "' at line %d", __LINE__); } while(0)
+#endif
+
 #define UDSL_MAX_RCV_URBS		4
 #define UDSL_MAX_SND_URBS		4
 #define UDSL_MAX_RCV_BUFS		8




More information about the Usbatm-commits mailing list