Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
diff -Nru a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
--- a/drivers/usb/storage/scsiglue.c 2005-02-24 11:14:55 -08:00
+++ b/drivers/usb/storage/scsiglue.c 2005-02-24 11:14:55 -08:00
@@ -356,9 +356,22 @@
SPRINTF(" Host scsi%d: usb-storage\n", hostptr->host_no);
/* print product, vendor, and serial number strings */
- SPRINTF(" Vendor: %s\n", us->vendor);
- SPRINTF(" Product: %s\n", us->product);
- SPRINTF("Serial Number: %s\n", us->serial);
+ if (us->pusb_dev->manufacturer)
+ SPRINTF(" Vendor: %s\n", us->pusb_dev->manufacturer);
+ else if (us->unusual_dev->vendorName)
+ SPRINTF(" Vendor: %s\n", us->unusual_dev->vendorName);
+ else
+ SPRINTF(" Vendor: Unknown\n");
+ if (us->pusb_dev->product)
+ SPRINTF(" Product: %s\n", us->pusb_dev->product);
+ else if (us->unusual_dev->productName)
+ SPRINTF(" Product: %s\n", us->unusual_dev->productName);
+ else
+ SPRINTF(" Product: Unknown\n");
+ if (us->pusb_dev->serial)
+ SPRINTF("Serial Number: %s\n", us->pusb_dev->serial);
+ else
+ SPRINTF("Serial Number: None\n");
/* show the protocol and transport */
SPRINTF(" Protocol: %s\n", us->protocol_name);
diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
--- a/drivers/usb/storage/usb.c 2005-02-24 11:14:55 -08:00
+++ b/drivers/usb/storage/usb.c 2005-02-24 11:14:55 -08:00
@@ -511,37 +511,6 @@
idesc->bInterfaceProtocol,
msgs[msg]);
}
-
- /* Read the device's string descriptors */
- if (dev->descriptor.iManufacturer)
- usb_string(dev, dev->descriptor.iManufacturer,
- us->vendor, sizeof(us->vendor));
- if (dev->descriptor.iProduct)
- usb_string(dev, dev->descriptor.iProduct,
- us->product, sizeof(us->product));
- if (dev->descriptor.iSerialNumber)
- usb_string(dev, dev->descriptor.iSerialNumber,
- us->serial, sizeof(us->serial));
-
- /* Use the unusual_dev strings if the device didn't provide them */
- if (strlen(us->vendor) == 0) {
- if (unusual_dev->vendorName)
- strlcpy(us->vendor, unusual_dev->vendorName,
- sizeof(us->vendor));
- else
- strcpy(us->vendor, "Unknown");
- }
- if (strlen(us->product) == 0) {
- if (unusual_dev->productName)
- strlcpy(us->product, unusual_dev->productName,
- sizeof(us->product));
- else
- strcpy(us->product, "Unknown");
- }
- if (strlen(us->serial) == 0)
- strcpy(us->serial, "None");
-
- US_DEBUGP("Vendor: %s, Product: %s\n", us->vendor, us->product);
}
/* Get the transport settings */
diff -Nru a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h
--- a/drivers/usb/storage/usb.h 2005-02-24 11:14:55 -08:00
+++ b/drivers/usb/storage/usb.h 2005-02-24 11:14:55 -08:00
@@ -122,9 +122,6 @@
unsigned int recv_intr_pipe;
/* information about the device */
- char vendor[USB_STOR_STRING_LEN];
- char product[USB_STOR_STRING_LEN];
- char serial[USB_STOR_STRING_LEN];
char *transport_name;
char *protocol_name;
__le32 bcs_signature;
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel