From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: David Vrabel <david.vrabel@citrix.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
xen-devel <xen-devel@lists.xenproject.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
Date: Wed, 11 Mar 2015 10:42:05 -0400 [thread overview]
Message-ID: <20150311144205.GA14096@l.oracle.com> (raw)
In-Reply-To: <5500569002000078000688DA@mail.emea.novell.com>
On Wed, Mar 11, 2015 at 01:52:00PM +0000, Jan Beulich wrote:
> It's not clear to me why only the enabling operation got handled so
> far.
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> drivers/xen/xen-pciback/conf_space_header.c | 16 +++++++++++++++-
> 1 file changed, 15 insertions(+), 1 deletion(-)
>
> --- 4.0-rc3-xen-pciback.orig/drivers/xen/xen-pciback/conf_space_header.c
> +++ 4.0-rc3-xen-pciback/drivers/xen/xen-pciback/conf_space_header.c
> @@ -88,9 +88,15 @@ static int command_write(struct pci_dev
> printk(KERN_DEBUG DRV_NAME ": %s: set bus master\n",
> pci_name(dev));
> pci_set_master(dev);
> + } else if (dev->is_busmaster && !is_master_cmd(value)) {
> + if (unlikely(verbose_request))
> + printk(KERN_DEBUG DRV_NAME ": %s: clear bus master\n",
> + pci_name(dev));
> + pci_clear_master(dev);
> }
>
> - if (value & PCI_COMMAND_INVALIDATE) {
> + if (!(cmd->val & PCI_COMMAND_INVALIDATE) &&
> + (value & PCI_COMMAND_INVALIDATE)) {
> if (unlikely(verbose_request))
> printk(KERN_DEBUG
> DRV_NAME ": %s: enable memory-write-invalidate\n",
> @@ -101,6 +107,13 @@ static int command_write(struct pci_dev
> pci_name(dev), err);
> value &= ~PCI_COMMAND_INVALIDATE;
> }
> + } else if ((cmd->val & PCI_COMMAND_INVALIDATE) &&
> + !(value & PCI_COMMAND_INVALIDATE)) {
> + if (unlikely(verbose_request))
> + printk(KERN_DEBUG
> + DRV_NAME ": %s: disable memory-write-invalidate\n",
> + pci_name(dev));
> + pci_clear_mwi(dev);
> }
>
> cmd->val = value;
>
>
>
next prev parent reply other threads:[~2015-03-11 14:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 13:52 [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate Jan Beulich
2015-03-11 14:42 ` Konrad Rzeszutek Wilk
2015-03-11 14:42 ` Konrad Rzeszutek Wilk [this message]
2015-03-11 14:44 ` David Vrabel
2015-03-11 14:44 ` David Vrabel
2015-03-11 14:45 ` Konrad Rzeszutek Wilk
2015-03-11 14:45 ` Konrad Rzeszutek Wilk
2015-03-11 15:15 ` Jan Beulich
2015-03-11 15:15 ` Jan Beulich
2015-03-16 14:54 ` [Xen-devel] " David Vrabel
2015-03-16 14:54 ` David Vrabel
-- strict thread matches above, loose matches on Subject: below --
2015-03-11 13:52 Jan Beulich
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=20150311144205.GA14096@l.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xenproject.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 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.