All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Domsch <Matt_Domsch@dell.com>
To: Stephen Cameron <smcameron@yahoo.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: App correlating PCI info with SCSI host number
Date: Thu, 27 Jan 2005 11:14:38 -0600	[thread overview]
Message-ID: <20050127171438.GC10491@lists.us.dell.com> (raw)
In-Reply-To: <20050127141251.82212.qmail@web12308.mail.yahoo.com>

On Thu, Jan 27, 2005 at 06:12:51AM -0800, Stephen Cameron wrote:
> 
> I know on 2.6, I seem to be able to do 
> something like this to correlate PCI 
> (domain)/bus/dev/func with the linux 
> assigned scsi host number.
> 
> myhost:/sys/bus/scsi/devices # find /sys/devices -name 'host[0-9]*' -print
> /sys/devices/pci0000:64/0000:64:01.1/host15
> /sys/devices/pci0000:64/0000:64:01.0/host14
> /sys/devices/pci0000:62/0000:62:01.1/host11
> /sys/devices/pci0000:62/0000:62:01.0/host10
> /sys/devices/pci0000:60/0000:60:03.1/host9
> /sys/devices/pci0000:60/0000:60:03.0/host8
> /sys/devices/pci0000:60/0000:60:02.1/host7
> /sys/devices/pci0000:60/0000:60:02.0/host6
> /sys/devices/pci0000:38/0000:38:01.1/host5
> /sys/devices/pci0000:38/0000:38:01.0/host4
> /sys/devices/pci0000:34/0000:34:01.1/host13
> /sys/devices/pci0000:34/0000:34:01.0/host12
> /sys/devices/pci0000:20/0000:20:03.1/host3
> /sys/devices/pci0000:20/0000:20:03.0/host2
> /sys/devices/pci0000:20/0000:20:02.1/host1
> /sys/devices/pci0000:20/0000:20:02.0/host0
> 
> Is there any generic way to make the same sort
> of correlation on 2.4 kernels?

There's an ioctl() to a disk, SCSI_IOCTL_GET_PCI, so if the controller
has a disk attached, you can get it.

-- 
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-01-27 17:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-27 14:12 App correlating PCI info with SCSI host number Stephen Cameron
2005-01-27 17:14 ` Matt Domsch [this message]
2005-01-27 20:06   ` Stephen Cameron

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=20050127171438.GC10491@lists.us.dell.com \
    --to=matt_domsch@dell.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=smcameron@yahoo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.