public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	chrisw@redhat.com, avi@redhat.com
Subject: Re: [PATCH] PCI: sysfs: Update ROM to include default owner write access
Date: Fri, 7 Jan 2011 14:27:27 -0800	[thread overview]
Message-ID: <20110107142727.6c59e1ce@jbarnes-desktop> (raw)
In-Reply-To: <20110105172615.20107.20267.stgit@s20.home>

On Wed, 05 Jan 2011 10:26:41 -0700
Alex Williamson <alex.williamson@redhat.com> wrote:

> The PCI sysfs ROM interface requires an enabling write to access
> the ROM image, but the default file mode is 0400.  The original
> proposed patch adding sysfs ROM support was a true read-only
> interface, with the enabling bit coming in as a feature request.
> I suspect it was simply an oversight that the file mode didn't
> get updated to match the API.
> 
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> ---
> 
>  drivers/pci/pci-sysfs.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
> index 63d5042..8ecaac9 100644
> --- a/drivers/pci/pci-sysfs.c
> +++ b/drivers/pci/pci-sysfs.c
> @@ -1149,7 +1149,7 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev)
>  		sysfs_bin_attr_init(attr);
>  		attr->size = rom_size;
>  		attr->attr.name = "rom";
> -		attr->attr.mode = S_IRUSR;
> +		attr->attr.mode = S_IRUSR | S_IWUSR;
>  		attr->read = pci_read_rom;
>  		attr->write = pci_write_rom;
>  		retval = sysfs_create_bin_file(&pdev->dev.kobj, attr);

Applied, thanks.

-- 
Jesse Barnes, Intel Open Source Technology Center

      parent reply	other threads:[~2011-01-07 22:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-05 17:26 [PATCH] PCI: sysfs: Update ROM to include default owner write access Alex Williamson
2011-01-05 17:46 ` Chris Wright
2011-01-07 22:27 ` Jesse Barnes [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=20110107142727.6c59e1ce@jbarnes-desktop \
    --to=jbarnes@virtuousgeek.org \
    --cc=alex.williamson@redhat.com \
    --cc=avi@redhat.com \
    --cc=chrisw@redhat.com \
    --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