linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] SCSI device/adapter/bus address correlation?
@ 2004-09-02 23:19 Bjorn Helgaas
  2004-09-02 23:36 ` James Bottomley
  0 siblings, 1 reply; 9+ messages in thread
From: Bjorn Helgaas @ 2004-09-02 23:19 UTC (permalink / raw)
  To: linux-scsi

Not being a real SCSI person, I'm sure there's some clever way I'm
supposed to figure out which disk is /dev/sda.  But sometimes it's
not clear from the kernel boot messages, particularly for drivers
that don't print the PCI address of the adapter.

Is there any interest in a patch like the attached, which makes
things look like this:

    Attached scsi disk sda at 0000:20:01.0: scsi0, channel 0, id 0, lun 0
    Attached scsi disk sdb at 0000:20:01.0: scsi0, channel 0, id 1, lun 0


===== drivers/scsi/osst.c 1.58 vs edited =====
--- 1.58/drivers/scsi/osst.c	2004-08-08 15:07:47 -06:00
+++ edited/drivers/scsi/osst.c	2004-09-02 16:56:07 -06:00
@@ -5564,8 +5564,9 @@
 	drive->number = devfs_register_tape(SDp->devfs_name);
 
 	printk(KERN_INFO
-		"osst :I: Attached OnStream %.5s tape at scsi%d, channel %d, id %d, lun %d as %s\n",
-		SDp->model, SDp->host->host_no, SDp->channel, SDp->id, SDp->lun, tape_name(tpnt));
+		"osst :I: Attached OnStream %.5s tape at %s: scsi%d, channel %d, id %d, lun %d as %s\n",
+		SDp->model, scsi_get_device(SDp->host)->bus_id,
+		SDp->host->host_no, SDp->channel, SDp->id, SDp->lun, tape_name(tpnt));
 
 	return 0;
 
===== drivers/scsi/sd.c 1.156 vs edited =====
--- 1.156/drivers/scsi/sd.c	2004-08-23 02:14:46 -06:00
+++ edited/drivers/scsi/sd.c	2004-09-02 16:51:56 -06:00
@@ -1489,10 +1489,10 @@
 	dev_set_drvdata(dev, sdkp);
 	add_disk(gd);
 
-	printk(KERN_NOTICE "Attached scsi %sdisk %s at scsi%d, channel %d, "
+	printk(KERN_NOTICE "Attached scsi %sdisk %s at %s: scsi%d, channel %d, "
 	       "id %d, lun %d\n", sdp->removable ? "removable " : "",
-	       gd->disk_name, sdp->host->host_no, sdp->channel,
-	       sdp->id, sdp->lun);
+	       gd->disk_name, scsi_get_device(sdp->host)->bus_id, 
+	       sdp->host->host_no, sdp->channel, sdp->id, sdp->lun);
 
 	return 0;
 
===== drivers/scsi/sg.c 1.95 vs edited =====
--- 1.95/drivers/scsi/sg.c	2004-08-07 20:11:33 -06:00
+++ edited/drivers/scsi/sg.c	2004-09-02 16:54:05 -06:00
@@ -1468,8 +1468,9 @@
 		printk(KERN_WARNING "sg_add: sg_sys INvalid\n");
 
 	printk(KERN_NOTICE
-	       "Attached scsi generic sg%d at scsi%d, channel"
+	       "Attached scsi generic sg%d at %s: scsi%d, channel"
 	       " %d, id %d, lun %d,  type %d\n", k,
+	       scsi_get_device(scsidp->host)->bus_id,
 	       scsidp->host->host_no, scsidp->channel, scsidp->id,
 	       scsidp->lun, scsidp->type);
 
===== drivers/scsi/sr.c 1.114 vs edited =====
--- 1.114/drivers/scsi/sr.c	2004-08-12 18:03:53 -06:00
+++ edited/drivers/scsi/sr.c	2004-09-02 16:54:55 -06:00
@@ -637,8 +637,9 @@
 	add_disk(disk);
 
 	printk(KERN_DEBUG
-	    "Attached scsi CD-ROM %s at scsi%d, channel %d, id %d, lun %d\n",
-	    cd->cdi.name, sdev->host->host_no, sdev->channel,
+	    "Attached scsi CD-ROM %s at %s: scsi%d, channel %d, id %d, lun %d\n",
+	    cd->cdi.name, scsi_get_device(sdev->host)->bus_id,
+	    sdev->host->host_no, sdev->channel,
 	    sdev->id, sdev->lun);
 	return 0;
 
===== drivers/scsi/st.c 1.93 vs edited =====
--- 1.93/drivers/scsi/st.c	2004-08-12 18:03:53 -06:00
+++ edited/drivers/scsi/st.c	2004-09-02 16:55:30 -06:00
@@ -3919,8 +3919,9 @@
 	disk->number = devfs_register_tape(SDp->devfs_name);
 
 	printk(KERN_WARNING
-	"Attached scsi tape %s at scsi%d, channel %d, id %d, lun %d\n",
-	       tape_name(tpnt), SDp->host->host_no, SDp->channel, SDp->id, SDp->lun);
+	"Attached scsi tape %s at %s: scsi%d, channel %d, id %d, lun %d\n",
+	       tape_name(tpnt), scsi_get_device(SDp->host)->bus_id,
+	       SDp->host->host_no, SDp->channel, SDp->id, SDp->lun);
 	printk(KERN_WARNING "%s: try direct i/o: %s (alignment %d B), max page reachable by HBA %lu\n",
 	       tape_name(tpnt), tpnt->try_dio ? "yes" : "no",
 	       queue_dma_alignment(SDp->request_queue) + 1, tpnt->max_pfn);


^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <20040903204400.26701.76199.Mailman@linux.us.dell.com>]

end of thread, other threads:[~2004-09-03 21:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-02 23:19 [PATCH] SCSI device/adapter/bus address correlation? Bjorn Helgaas
2004-09-02 23:36 ` James Bottomley
2004-09-02 23:58   ` Christoph Hellwig
2004-09-03 14:44   ` Bjorn Helgaas
2004-09-03 14:49     ` Olaf Hering
2004-09-03 18:09     ` Patrick Mansfield
2004-09-03 20:13       ` Bjorn Helgaas
2004-09-03 21:42         ` Olaf Hering
     [not found] <20040903204400.26701.76199.Mailman@linux.us.dell.com>
2004-09-03 20:57 ` Matt Domsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).