Commit 00fa43ef authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Greg Kroah-Hartman

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: default avatarMatthew Wilcox <willy@linux.intel.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b1f0a34c
...@@ -73,7 +73,8 @@ ...@@ -73,7 +73,8 @@
static const char* host_info(struct Scsi_Host *host) static const char* host_info(struct Scsi_Host *host)
{ {
return "SCSI emulation for USB Mass Storage devices"; struct us_data *us = host_to_us(host);
return us->scsi_name;
} }
static int slave_alloc (struct scsi_device *sdev) static int slave_alloc (struct scsi_device *sdev)
......
...@@ -929,6 +929,8 @@ int usb_stor_probe2(struct us_data *us) ...@@ -929,6 +929,8 @@ int usb_stor_probe2(struct us_data *us)
result = usb_stor_acquire_resources(us); result = usb_stor_acquire_resources(us);
if (result) if (result)
goto BadDevice; goto BadDevice;
snprintf(us->scsi_name, sizeof(us->scsi_name), "usb-storage %s",
dev_name(&us->pusb_intf->dev));
result = scsi_add_host(us_to_host(us), &us->pusb_intf->dev); result = scsi_add_host(us_to_host(us), &us->pusb_intf->dev);
if (result) { if (result) {
printk(KERN_WARNING USB_STORAGE printk(KERN_WARNING USB_STORAGE
......
...@@ -132,6 +132,7 @@ struct us_data { ...@@ -132,6 +132,7 @@ struct us_data {
/* SCSI interfaces */ /* SCSI interfaces */
struct scsi_cmnd *srb; /* current srb */ struct scsi_cmnd *srb; /* current srb */
unsigned int tag; /* current dCBWTag */ unsigned int tag; /* current dCBWTag */
char scsi_name[32]; /* scsi_host name */
/* control and bulk communications data */ /* control and bulk communications data */
struct urb *current_urb; /* USB requests */ struct urb *current_urb; /* USB requests */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment