ChangeSet 1.1807.48.27, 2004/08/02 14:47:07-07:00, [EMAIL PROTECTED]

[PATCH] USB Storage: improve debugging output in usb-storage

This patch started life as as294.  All I did was to regenerate it to apply
cleanly against current kernels.

This just adds a couple of lines to the debugging output with some useful
information, and removes some lines that nobody has looked at in a very
long time.

Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
Signed-off-by: Matthew Dharm <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/storage/usb.c |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)


diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
--- a/drivers/usb/storage/usb.c 2004-08-23 13:19:46 -07:00
+++ b/drivers/usb/storage/usb.c 2004-08-23 13:19:46 -07:00
@@ -423,6 +423,13 @@
        us->pusb_dev = interface_to_usbdev(intf);
        us->pusb_intf = intf;
        us->ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
+       US_DEBUGP("Vendor: 0x%04x, Product: 0x%04x, Revision: 0x%04x\n",
+                       us->pusb_dev->descriptor.idVendor,
+                       us->pusb_dev->descriptor.idProduct,
+                       us->pusb_dev->descriptor.bcdDevice);
+       US_DEBUGP("Interface Subclass: 0x%02x, Protocol: 0x%02x\n",
+                       intf->cur_altsetting->desc.bInterfaceSubClass,
+                       intf->cur_altsetting->desc.bInterfaceProtocol);
 
        /* Store our private data in the interface */
        usb_set_intfdata(intf, us);
@@ -453,11 +460,6 @@
        struct us_unusual_dev *unusual_dev = &us_unusual_dev_list[id_index];
        struct usb_device_id *id = &storage_usb_ids[id_index];
 
-       if (unusual_dev->vendorName)
-               US_DEBUGP("Vendor: %s\n", unusual_dev->vendorName);
-       if (unusual_dev->productName)
-               US_DEBUGP("Product: %s\n", unusual_dev->productName);
-
        /* Store the entries */
        us->unusual_dev = unusual_dev;
        us->subclass = (unusual_dev->useProtocol == US_SC_DEVICE) ?
@@ -528,6 +530,8 @@
        }
        if (strlen(us->serial) == 0)
                strcpy(us->serial, "None");
+
+       US_DEBUGP("Vendor: %s,  Product: %s\n", us->vendor, us->product);
 }
 
 /* Get the transport settings */
@@ -715,8 +719,6 @@
                        ep_int = ep;
                }
        }
-       US_DEBUGP("Endpoints: In: 0x%p Out: 0x%p Int: 0x%p (Period %d)\n",
-                 ep_in, ep_out, ep_int, ep_int ? ep_int->bInterval : 0);
 
        if (!ep_in || !ep_out || (us->protocol == US_PR_CBI && !ep_int)) {
                US_DEBUGP("Endpoint sanity check failed! Rejecting dev.\n");
@@ -880,9 +882,6 @@
        int result;
 
        US_DEBUGP("USB Mass Storage device detected\n");
-       US_DEBUGP("altsetting is %d, id_index is %d\n",
-                       intf->cur_altsetting->desc.bAlternateSetting,
-                       id_index);
 
        /* Allocate the us_data structure and initialize the mutexes */
        us = (struct us_data *) kmalloc(sizeof(*us), GFP_KERNEL);



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to