--- valgrind-2.2.0/coregrind/vg_syscalls.c	2004-08-30 18:08:37.000000000 -0600
+++ valgrind-2.2.0-usb/coregrind/vg_syscalls.c	2005-02-22 10:59:26.510299069 -0700
@@ -54,6 +54,8 @@
       VG_(printf)(format, ## args)
 
 
+struct usbdevfs_urb *USBUrbPointer = NULL;
+	
 /* ---------------------------------------------------------------------
    A simple atfork() facility for Valgrind's internal use
    ------------------------------------------------------------------ */
@@ -3482,6 +3484,9 @@
       SYSCALL_TRACK( pre_mem_write, tid, "ioctl(PPGETTIME)", arg3,
                      sizeof(struct timeval) );
       break;
+   case USBDEVFS_SUBMITURB:
+      USBUrbPointer = arg3;
+      break;
 
       /* We don't have any specific information on it, so
 	 try to do something reasonable based on direction and
@@ -3964,6 +3969,12 @@
    case PPGETTIME:
       VG_TRACK( post_mem_write, arg3, sizeof(struct timeval) );
       break;
+   case USBDEVFS_REAPURB:
+   case USBDEVFS_REAPURBNDELAY:
+      if(USBUrbPointer != NULL) {
+	VG_TRACK( post_mem_write, USBUrbPointer->buffer, USBUrbPointer->actual_length );
+      }
+      break;
 
       /* We don't have any specific information on it, so
 	 try to do something reasonable based on direction and
--- valgrind-2.2.0/coregrind/vg_unsafe.h	2004-08-29 15:02:28.000000000 -0600
+++ valgrind-2.2.0-usb/coregrind/vg_unsafe.h	2005-02-15 11:22:44.257693208 -0700
@@ -76,6 +76,7 @@
 #include <linux/mii.h>    /* for mii_* structs */
 #endif
 #include <linux/ppdev.h>  /* for PP* ioctls */
+#include <linux/usbdevice_fs.h> /* for USB* ioctls */
 
 #define __USE_LARGEFILE64
 #include <sys/stat.h>     /* for struct stat */
