]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: fix to usbfs_snoop logging of user defined control urbs
authorChris Frey <cdfrey@foursquare.net>
Sat, 16 Dec 2006 07:37:42 +0000 (02:37 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 20 Dec 2006 18:14:28 +0000 (10:14 -0800)
When sending CONTROL URB's using the usual CONTROL ioctl, logging works
fine, but when sending them via SUBMITURB, like VMWare does, the
control fields are not logged.  This patch fixes that.

I didn't see any major changes to devio.c recently, so this patch should apply
cleanly to even the latest kernel.  I can resubmit if it doesn't.

From: Chris Frey <cdfrey@foursquare.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devio.c

index 3ed4cb2d56d9286e6e8a828b69dcc9304aaf8e81..4b3a6ab29bd3e1a522b5051136627ff4813f3842 100644 (file)
@@ -962,7 +962,11 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb,
                        kfree(dr);
                        return -EFAULT;
                }
-               snoop(&ps->dev->dev, "control urb\n");
+               snoop(&ps->dev->dev, "control urb: bRequest=%02x "
+                       "bRrequestType=%02x wValue=%04x "
+                       "wIndex=%04x wLength=%04x\n",
+                       dr->bRequest, dr->bRequestType, dr->wValue,
+                       dr->wIndex, dr->wLength);
                break;
 
        case USBDEVFS_URB_TYPE_BULK: