public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Alex Chiang <achiang@hp.com>,
	jbarnes@virtuousgeek.org, matthew@wil.cx,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: create device, function symlinks in /sys/bus/pci/slots/N/
Date: Mon, 18 Aug 2008 13:46:01 -0700	[thread overview]
Message-ID: <20080818204601.GA14374@kroah.com> (raw)
In-Reply-To: <20080818202100.GE23155@ldl.fc.hp.com>

On Mon, Aug 18, 2008 at 02:21:00PM -0600, Alex Chiang wrote:
> Create convenience symlinks in sysfs, linking slots to devices
> and functions, and vice versa. These links make it easier for
> users to figure out which devices actually live in what slots.
> 
> The device symlink points to the device's first function.
> 
> For example:
> 
> sapphire:/sys/bus/pci/slots # ls
> 1  10  2  3  4  5  6  7  8  9
> 
> sapphire:/sys/bus/pci/slots # ls -l 3
> total 0
> -r--r--r-- 1 root root 65536 Aug 18 14:10 address
> lrwxrwxrwx 1 root root     0 Aug 18 14:10 device -> ../../../../devices/pci0000:23/0000:23:01.0
> lrwxrwxrwx 1 root root     0 Aug 18 14:10 function0 -> ../../../../devices/pci0000:23/0000:23:01.0
> lrwxrwxrwx 1 root root     0 Aug 18 14:10 function1 -> ../../../../devices/pci0000:23/0000:23:01.1
> 
> sapphire:/sys/bus/pci/slots # ls -l 3/device/slot
> lrwxrwxrwx 1 root root 0 Aug 18 14:13 3/device/slot -> ../../../bus/pci/slots/3
> 
> The original form of this patch was written by Matthew Wilcox,
> but did not have links from the sysfs slots/ directory pointing
> back at devices and functions.

As you are adding new sysfs files/symlinks, please document them in
Documentation/ABI.

thanks,

greg k-h

  reply	other threads:[~2008-08-18 22:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-18 20:21 [PATCH] PCI: create device, function symlinks in /sys/bus/pci/slots/N/ Alex Chiang
2008-08-18 20:46 ` Greg KH [this message]
2008-08-18 22:03 ` H. Peter Anvin
2008-08-19 15:53   ` Alex Chiang
2008-08-18 23:19 ` Gary Hade
2008-08-19 18:47   ` Alex Chiang
2008-08-19 16:37 ` Matthew Wilcox
2008-08-19 18:29   ` Alex Chiang

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=20080818204601.GA14374@kroah.com \
    --to=greg@kroah.com \
    --cc=achiang@hp.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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