aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@linux.intel.com>2009-09-24 18:19:11 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 14:55:13 -0500
commit00fa43ef09c6bb357d58c14a99181cce09c315c6 (patch)
tree4431b7bd2d285c129ebadd95aeb34b2b81b683d7 /drivers/usb/storage
parentb1f0a34ca983a6defb0431aa18c9268eb9ffcc4a (diff)
USB: usb-storage: Associate the name of the interface with the scsi host
Instead of reporting "SCSI emulation for USB Mass Storage devices", report "usb-storage 1-4:1.0". Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/scsiglue.c3
-rw-r--r--drivers/usb/storage/usb.c2
-rw-r--r--drivers/usb/storage/usb.h1
3 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index cfa26d56ce60..e5e6df39e737 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -73,7 +73,8 @@
73 73
74static const char* host_info(struct Scsi_Host *host) 74static const char* host_info(struct Scsi_Host *host)
75{ 75{
76 return "SCSI emulation for USB Mass Storage devices"; 76 struct us_data *us = host_to_us(host);
77 return us->scsi_name;
77} 78}
78 79
79static int slave_alloc (struct scsi_device *sdev) 80static int slave_alloc (struct scsi_device *sdev)
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 8060b85fe1a3..783548485868 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -929,6 +929,8 @@ int usb_stor_probe2(struct us_data *us)
929 result = usb_stor_acquire_resources(us); 929 result = usb_stor_acquire_resources(us);
930 if (result) 930 if (result)
931 goto BadDevice; 931 goto BadDevice;
932 snprintf(us->scsi_name, sizeof(us->scsi_name), "usb-storage %s",
933 dev_name(&us->pusb_intf->dev));
932 result = scsi_add_host(us_to_host(us), &us->pusb_intf->dev); 934 result = scsi_add_host(us_to_host(us), &us->pusb_intf->dev);
933 if (result) { 935 if (result) {
934 printk(KERN_WARNING USB_STORAGE 936 printk(KERN_WARNING USB_STORAGE
diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h
index 2609efb2bd7e..69717134231b 100644
--- a/drivers/usb/storage/usb.h
+++ b/drivers/usb/storage/usb.h
@@ -132,6 +132,7 @@ struct us_data {
132 /* SCSI interfaces */ 132 /* SCSI interfaces */
133 struct scsi_cmnd *srb; /* current srb */ 133 struct scsi_cmnd *srb; /* current srb */
134 unsigned int tag; /* current dCBWTag */ 134 unsigned int tag; /* current dCBWTag */
135 char scsi_name[32]; /* scsi_host name */
135 136
136 /* control and bulk communications data */ 137 /* control and bulk communications data */
137 struct urb *current_urb; /* USB requests */ 138 struct urb *current_urb; /* USB requests */