I don't fully understand this business with URB's yet.
I've been reading your USB docs and its becoming clearer, but to be honest I didn't 
know if the pointer to the next urb might still be available in a different context or 
something.
I noticed that the definitions of the 'urb' structure between 2.4 and 2.6 have changed 
quite a bit.
Would the pointer to the next urb be helpful for debugging?

Deleting the line is fine by me, I just left it in there incase somebody wanted to correct it.

Try this patch.

Thanks.
--
Daniel Drake (dsd)
http://www.reactivated.net


Greg KH wrote:
On Tue, Sep 16, 2003 at 10:14:12PM +0100, Daniel Drake wrote:

When compiling dabusb with debug info, a compile error occurs. I presume this is because this part of the code has not been updated since the 2.4 kernels.
This patch fixes this.
I had to comment out one line of debug code that I was unable to fix.


Thanks.
--
Daniel Drake (dsd)
http://www.reactivated.net


--- linux-2.6.0-test5/drivers/usb/media/dabusb.c        2003-09-09 08:50:01.000000000 
+0100
+++ linux/drivers/usb/media/dabusb.c    2003-09-16 21:49:03.284703656 +0100
@@ -89,7 +89,9 @@
static void dump_urb (struct urb *urb)
{
        dbg("urb                   :%p", urb);
-       dbg("next                  :%p", urb->next);
+       /* causes compile error:
+        dbg("next                  :%p", urb->next);
+       -- [EMAIL PROTECTED] */


How about just deleting this line, as the next pointer is gone from the
urb structure?

thanks,

greg k-h


--- linux-2.6.0-test5/drivers/usb/media/dabusb.c        2003-09-09 08:50:01.000000000 
+0100
+++ linux/drivers/usb/media/dabusb.c    2003-09-17 22:36:46.620628816 +0100
@@ -89,7 +89,6 @@
 static void dump_urb (struct urb *urb)
 {
        dbg("urb                   :%p", urb);
-       dbg("next                  :%p", urb->next);
        dbg("dev                   :%p", urb->dev);
        dbg("pipe                  :%08X", urb->pipe);
        dbg("status                :%d", urb->status);
@@ -728,7 +727,7 @@
        pdabusb_t s;
 
        dbg("dabusb: probe: vendor id 0x%x, device id 0x%x ifnum:%d",
-         usbdev->descriptor.idVendor, usbdev->descriptor.idProduct, ifnum);
+         usbdev->descriptor.idVendor, usbdev->descriptor.idProduct, 
intf->altsetting->desc.bInterfaceNumber);
 
        /* We don't handle multiple configurations */
        if (usbdev->descriptor.bNumConfigurations != 1)
@@ -762,7 +761,7 @@
                        goto reject;
                }
        }
-       dbg("bound to interface: %d", ifnum);
+       dbg("bound to interface: %d", intf->altsetting->desc.bInterfaceNumber);
        usb_set_intfdata (intf, s);
        up (&s->mutex);
 

Reply via email to