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: Matthew Dharm <[EMAIL PROTECTED]>
Signed-off-by: Alan Stern <[EMAIL PROTECTED]>

Greg, please apply.

Matt

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/08/01 17:14:58-07:00 [EMAIL PROTECTED] 
#   as294
# 
# drivers/usb/storage/usb.c
#   2004/08/01 17:14:40-07:00 [EMAIL PROTECTED] +9 -10
#   as294
# 
diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
--- a/drivers/usb/storage/usb.c Sun Aug  1 17:17:28 2004
+++ b/drivers/usb/storage/usb.c Sun Aug  1 17:17:28 2004
@@ -428,6 +428,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);
@@ -458,11 +465,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) ?
@@ -533,6 +535,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 */
@@ -720,8 +724,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");
@@ -885,9 +887,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);

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

Way to go, lava boy.
                                        -- Stef to Greg
User Friendly, 3/26/1998

Attachment: pgp4C480UXMAZ.pgp
Description: PGP signature

Reply via email to