public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Domsch <Matt_Domsch@dell.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Bryan Henderson <hbryan@us.ibm.com>,
	"Rajat Jain, Noida" <rajatj@noida.hcltech.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: How to find which (physical) SCSI HBA corresponds to which ho	st n umber?
Date: Sat, 2 Apr 2005 08:31:33 -0600	[thread overview]
Message-ID: <20050402143133.GA21096@lists.us.dell.com> (raw)
In-Reply-To: <1112389623.5776.34.camel@mulgrave>

On Fri, Apr 01, 2005 at 03:07:02PM -0600, James Bottomley wrote:
> On Fri, 2005-04-01 at 09:47 -0800, Bryan Henderson wrote:
> > If you and Linux could identify the host in common terms, you wouldn't 
> > have to do this.  But the question is open as to in what terms you 
> > personally identify the host to which you attached the device.  Is it the 
> > controller to the west?  The red one?  The new one?  The one with serial 
> > number 8436547?  The one at PCI address X:Y:Z?  The one that has your disk 
> > drives on it?
> 
> I'm not very good on 2.4, but I believe it has a SCSI_IOCTL_GET_PCI.

Yes, but that only works when called on a Scsi_Device attached to the
controller.  So each controller needs at least one scsi device (disk,
cdrom, whatever) attached, such that there's a /dev/sd* file to open
and call this ioctl.  That'll get you the pci bus:dev.fn tuple.  Then
on x86 systems at least, the PCI IRQ Routing Table ($PIR table in
BIOS) can tell you if your device is embedded or add-in, and which
slot number BIOS calls it.  A copy of David A. Hinds' dump_pirq script
can be found here:  http://linux.dell.com/files/tools/dump_pirq

Device 00:04.0 (slot 0): Ethernet controller
Device 00:06.0 (slot 0):
Device 00:08.0 (slot 1): Class ff00
Device 00:0f.0 (slot 0): Host bridge
Device 01:08.0 (slot 0): PCI bridge
Device 01:06.0 (slot 0): Ethernet controller
Device 02:06.0 (slot 0): SCSI storage controller
Device 03:06.0 (slot 2):
Device 03:08.0 (slot 3):
Device 08:06.0 (slot 4):
Device 08:08.0 (slot 5):
Device 0d:06.0 (slot 6): RAID bus controller
Device 0d:08.0 (slot 7):

Slot 0 lines are embedded, the other values should pretty closely
correspond to the silkscreen text on the motherboards.


That's about as close as you get.

Thanks,
Matt

-- 
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

      reply	other threads:[~2005-04-02 14:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-01  4:23 How to find which (physical) SCSI HBA corresponds to which ho st n umber? Rajat  Jain, Noida
2005-04-01 17:47 ` Bryan Henderson
2005-04-01 20:05   ` How to find which (physical) SCSI HBA corresponds to which ho st number? Guy
2005-04-01 21:07   ` How to find which (physical) SCSI HBA corresponds to which ho st n umber? James Bottomley
2005-04-02 14:31     ` Matt Domsch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050402143133.GA21096@lists.us.dell.com \
    --to=matt_domsch@dell.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=hbryan@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rajatj@noida.hcltech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox