From: Bjorn Helgaas <helgaas@kernel.org>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: Keith Busch <keith.busch@intel.com>,
Myron Stowe <myron.stowe@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Jonathan Corbet <corbet@lwn.net>,
"David S. Miller" <davem@davemloft.net>,
Andrew Morton <akpm@linux-foundation.org>,
Emil Velikov <emil.l.velikov@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Guenter Roeck <linux@roeck-us.net>,
Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
Linus Walleij <linus.walleij@linaro.org>,
Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>,
Stefan Berger <stefanb@linux.vnet.ibm.com>,
Wei Zhang <wzhang@fb.com>,
Kurt Schwemmer <kurt.schwemmer@microsemi.com>,
Stephen Bates <stephen.bates@microsemi.com>,
linux-pci@vger.kernel.org, linux-doc@vger.kernel.org,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] switchtec: Add sysfs attributes to the Switchtec driver
Date: Fri, 24 Feb 2017 16:45:27 -0600 [thread overview]
Message-ID: <20170224224527.GC26430@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <7c981c0d-e7ff-bf28-ec55-cf5c39290437@deltatee.com>
On Thu, Feb 23, 2017 at 03:56:21PM -0700, Logan Gunthorpe wrote:
>
>
> On 23/02/17 03:43 PM, Bjorn Helgaas wrote:
> > This path seems a little generic. I don't see other cases where a
> > product brand name ("Switchtec") appears at the top level of
> > /sys/class/...
>
> Ok, well we are certainly open to suggestions, but there isn't really a
> generic version of this device available so I'm not sure how we would
> change that. Per device-type classes aren't that uncommon though, a
> quick grep shows things like:
>
> platform/chrome/cros_ec_dev.c:40:static struct class cros_class
> s390/char/raw3270.h:94:extern struct class *class3270;
> net/ethernet/hisilicon/hns/hnae.c:19:static struct class *hnae_class;
> mfd/ucb1x00-core.c:490:static struct class ucb1x00_class
>
> > My question is based on "ls Documentation/ABI/testing/sysfs-class*",
> > not on any great knowledge of sysfs, and I see Greg has already given
> > a Reviewed-by for this, so maybe this is the right approach.
> >
> > It does seem like the path could include a clue that this is related
> > to PCI.
>
> I mean, we could change it to pci-switchtec or something if you think
> that would be better..?? But I'm not sure how else to accommodate this.
I'm OK with it as-is.
> > Is there a link to the switch PCI device itself, e.g., to
> > /sys/devices/pci*? Should these attributes simply be put in a
> > subdirectory there, e.g., in
> >
> > /sys/devices/pci0000:00/0000:00:00.0/stats/...
>
> Well our device shows up here in the tree:
>
> /sys/devices/pci0000:00/0000:00:03.0/0000:03:00.1/switchtec/switchtec0
>
> (Which userspace can get to by following the link at
> /sys/class/switchtec/switchtec0) The switch is then always:
>
> /sys/devices/pci0000:00/0000:00:03.0
That's exactly what I was looking for; I just didn't realize it was
connected like this.
Bjorn
next prev parent reply other threads:[~2017-02-24 22:45 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 18:05 [PATCH v2 0/4] New Microsemi PCI Switch Management Driver Logan Gunthorpe
2017-02-02 18:06 ` [PATCH v2 1/4] MicroSemi Switchtec management interface driver Logan Gunthorpe
2017-02-10 14:51 ` Greg Kroah-Hartman
2017-02-10 16:48 ` Logan Gunthorpe
2017-02-10 16:55 ` Greg Kroah-Hartman
2017-02-10 17:03 ` Logan Gunthorpe
2017-02-10 17:09 ` Greg Kroah-Hartman
2017-02-10 18:00 ` Logan Gunthorpe
2017-02-10 17:57 ` [PATCH] switchtec: cleanup cdev init Logan Gunthorpe
2017-02-18 20:22 ` Logan Gunthorpe
2017-02-19 21:43 ` Dan Williams
2017-02-20 4:22 ` Logan Gunthorpe
2017-02-21 18:37 ` Jason Gunthorpe
2017-02-10 14:54 ` [PATCH v2 1/4] MicroSemi Switchtec management interface driver Greg Kroah-Hartman
2017-02-24 0:35 ` Bjorn Helgaas
2017-02-24 18:32 ` Logan Gunthorpe
2017-02-02 18:06 ` [PATCH v2 2/4] switchtec: Add user interface documentation Logan Gunthorpe
2017-02-02 18:06 ` [PATCH v2 3/4] switchtec: Add sysfs attributes to the Switchtec driver Logan Gunthorpe
2017-02-10 14:54 ` Greg Kroah-Hartman
2017-02-23 22:43 ` Bjorn Helgaas
2017-02-23 22:56 ` Logan Gunthorpe
2017-02-24 22:45 ` Bjorn Helgaas [this message]
2017-02-02 18:06 ` [PATCH v2 4/4] switchtec: Add IOCTLs " Logan Gunthorpe
2017-02-09 23:16 ` [PATCH v2 0/4] New Microsemi PCI Switch Management Driver Wei Zhang
2017-02-09 23:46 ` Wei Zhang
2017-02-10 14:54 ` Greg Kroah-Hartman
2017-02-10 16:14 ` Jens Axboe
2017-02-17 20:36 ` Logan Gunthorpe
2017-02-23 20:36 ` Logan Gunthorpe
2017-02-23 20:51 ` Sinan Kaya
2017-02-23 20:54 ` Jens Axboe
2017-02-23 20:56 ` Logan Gunthorpe
2017-02-23 20:52 ` Jens Axboe
2017-02-23 20:55 ` Greg Kroah-Hartman
2017-02-23 22:14 ` Bjorn Helgaas
2017-02-23 22:19 ` Logan Gunthorpe
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=20170224224527.GC26430@bhelgaas-glaptop.roam.corp.google.com \
--to=helgaas@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bhelgaas@google.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=emil.l.velikov@gmail.com \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=keith.busch@intel.com \
--cc=konishi.ryusuke@lab.ntt.co.jp \
--cc=kurt.schwemmer@microsemi.com \
--cc=linus.walleij@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=logang@deltatee.com \
--cc=mchehab@kernel.org \
--cc=myron.stowe@gmail.com \
--cc=stefanb@linux.vnet.ibm.com \
--cc=stephen.bates@microsemi.com \
--cc=wzhang@fb.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;
as well as URLs for NNTP newsgroup(s).