linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Epler <jepler@unpythonic.net>
To: Bjorn Helgaas <bhelgaas@google.com>,
	"open list:PCI SUBSYSTEM" <linux-pci@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: incompatible pci sysfs change since 3.12 (5136b2da770d)
Date: Wed, 29 Oct 2014 19:22:58 -0500	[thread overview]
Message-ID: <20141030002258.GA59253@unpythonic.net> (raw)

Hi.

I am an author of LinuxCNC, a GPL'd CNC control for Linux.

Recently we added support for userspace PCI drivers.  This worked with
kernel 3.2 but doesn't with kernel 3.16.  The software fails early with
    Failed to open "/sys/devices/pci0000:00/.../enable" (Permission denied)

This appears to be because our software relies on the documented
"enable" sysfs file for pci devices (Documentation/filesystem/sysfs-pci.txt)
which was (unintentionally?) changed to "enabled" in the above-named
patch:

5136b2da770d PCI: convert bus code to use dev_groups
...
+static DEVICE_ATTR_RW(enabled);
...
-   __ATTR(enable, 0600, is_enabled_show, is_enabled_store),

Are we in the LinuxCNC project wrong in thinking that stuff in /sys (and
not /sys/debug) is supposed to be a durable API/interface for userspace
to the kernel?  (It must be a low-usage API if it went unnoticed for a
year :-/)

We'll have to work around it by modifying our software (since we'd like
to work with the kernels people already have) in any case.

Even if it is not going to be changed compatibly with older kernels, it
seems like the documentation should be updated!

Jeff

             reply	other threads:[~2014-10-30  0:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30  0:22 Jeff Epler [this message]
2014-10-30  0:36 ` incompatible pci sysfs change since 3.12 (5136b2da770d) Greg Kroah-Hartman
2014-10-30  1:16   ` Jeff Epler
2014-10-30 16:30     ` Greg Kroah-Hartman
2014-10-30 18:09       ` Jeff Epler

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=20141030002258.GA59253@unpythonic.net \
    --to=jepler@unpythonic.net \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /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).