* [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
@ 2015-03-11 13:52 Jan Beulich
2015-03-11 14:42 ` Konrad Rzeszutek Wilk
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Jan Beulich @ 2015-03-11 13:52 UTC (permalink / raw)
To: David Vrabel, Boris Ostrovsky, Konrad Rzeszutek Wilk
Cc: xen-devel, linux-kernel
It's not clear to me why only the enabling operation got handled so
far.
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;
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
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:44 ` David Vrabel
2015-03-11 14:44 ` David Vrabel
2015-03-11 14:42 ` Konrad Rzeszutek Wilk
` (2 subsequent siblings)
3 siblings, 2 replies; 12+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-03-11 14:42 UTC (permalink / raw)
To: Jan Beulich; +Cc: David Vrabel, Boris Ostrovsky, xen-devel, linux-kernel
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;
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
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
2015-03-16 14:54 ` David Vrabel
2015-03-16 14:54 ` [Xen-devel] " David Vrabel
3 siblings, 0 replies; 12+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-03-11 14:42 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Boris Ostrovsky, David Vrabel, linux-kernel
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;
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
2015-03-11 14:42 ` Konrad Rzeszutek Wilk
2015-03-11 14:44 ` David Vrabel
@ 2015-03-11 14:44 ` David Vrabel
2015-03-11 14:45 ` Konrad Rzeszutek Wilk
` (3 more replies)
1 sibling, 4 replies; 12+ messages in thread
From: David Vrabel @ 2015-03-11 14:44 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk, Jan Beulich
Cc: Boris Ostrovsky, xen-devel, linux-kernel
On 11/03/15 14:42, Konrad Rzeszutek Wilk wrote:
> 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>
With no reports that this actually fixes anything, do we want this in
4.0 or 4.1?
David
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
2015-03-11 14:42 ` Konrad Rzeszutek Wilk
@ 2015-03-11 14:44 ` David Vrabel
2015-03-11 14:44 ` David Vrabel
1 sibling, 0 replies; 12+ messages in thread
From: David Vrabel @ 2015-03-11 14:44 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk, Jan Beulich
Cc: xen-devel, Boris Ostrovsky, linux-kernel
On 11/03/15 14:42, Konrad Rzeszutek Wilk wrote:
> 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>
With no reports that this actually fixes anything, do we want this in
4.0 or 4.1?
David
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
2015-03-11 14:44 ` David Vrabel
@ 2015-03-11 14:45 ` Konrad Rzeszutek Wilk
2015-03-11 14:45 ` Konrad Rzeszutek Wilk
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-03-11 14:45 UTC (permalink / raw)
To: David Vrabel; +Cc: Jan Beulich, Boris Ostrovsky, xen-devel, linux-kernel
On Wed, Mar 11, 2015 at 02:44:18PM +0000, David Vrabel wrote:
> On 11/03/15 14:42, Konrad Rzeszutek Wilk wrote:
> > 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>
>
> With no reports that this actually fixes anything, do we want this in
> 4.0 or 4.1?
4.1 is fine.
>
> David
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
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
3 siblings, 0 replies; 12+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-03-11 14:45 UTC (permalink / raw)
To: David Vrabel; +Cc: xen-devel, Boris Ostrovsky, linux-kernel, Jan Beulich
On Wed, Mar 11, 2015 at 02:44:18PM +0000, David Vrabel wrote:
> On 11/03/15 14:42, Konrad Rzeszutek Wilk wrote:
> > 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>
>
> With no reports that this actually fixes anything, do we want this in
> 4.0 or 4.1?
4.1 is fine.
>
> David
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
2015-03-11 14:44 ` David Vrabel
` (2 preceding siblings ...)
2015-03-11 15:15 ` Jan Beulich
@ 2015-03-11 15:15 ` Jan Beulich
3 siblings, 0 replies; 12+ messages in thread
From: Jan Beulich @ 2015-03-11 15:15 UTC (permalink / raw)
To: David Vrabel
Cc: xen-devel, Boris Ostrovsky, Konrad Rzeszutek Wilk, linux-kernel
>>> On 11.03.15 at 15:44, <david.vrabel@citrix.com> wrote:
> On 11/03/15 14:42, Konrad Rzeszutek Wilk wrote:
>> 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>
>
> With no reports that this actually fixes anything, do we want this in
> 4.0 or 4.1?
I'd say 4.1.
Jan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
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
3 siblings, 0 replies; 12+ messages in thread
From: Jan Beulich @ 2015-03-11 15:15 UTC (permalink / raw)
To: David Vrabel; +Cc: xen-devel, Boris Ostrovsky, linux-kernel
>>> On 11.03.15 at 15:44, <david.vrabel@citrix.com> wrote:
> On 11/03/15 14:42, Konrad Rzeszutek Wilk wrote:
>> 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>
>
> With no reports that this actually fixes anything, do we want this in
> 4.0 or 4.1?
I'd say 4.1.
Jan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Xen-devel] [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
2015-03-11 13:52 [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate Jan Beulich
` (2 preceding siblings ...)
2015-03-16 14:54 ` David Vrabel
@ 2015-03-16 14:54 ` David Vrabel
3 siblings, 0 replies; 12+ messages in thread
From: David Vrabel @ 2015-03-16 14:54 UTC (permalink / raw)
To: Jan Beulich, David Vrabel, Boris Ostrovsky, Konrad Rzeszutek Wilk
Cc: xen-devel, linux-kernel
On 11/03/15 13:52, Jan Beulich wrote:
> It's not clear to me why only the enabling operation got handled so
> far.
Applied to devel/for-linus-4.1, thanks.
David
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
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
@ 2015-03-16 14:54 ` David Vrabel
2015-03-16 14:54 ` [Xen-devel] " David Vrabel
3 siblings, 0 replies; 12+ messages in thread
From: David Vrabel @ 2015-03-16 14:54 UTC (permalink / raw)
To: Jan Beulich, David Vrabel, Boris Ostrovsky, Konrad Rzeszutek Wilk
Cc: xen-devel, linux-kernel
On 11/03/15 13:52, Jan Beulich wrote:
> It's not clear to me why only the enabling operation got handled so
> far.
Applied to devel/for-linus-4.1, thanks.
David
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate
@ 2015-03-11 13:52 Jan Beulich
0 siblings, 0 replies; 12+ messages in thread
From: Jan Beulich @ 2015-03-11 13:52 UTC (permalink / raw)
To: David Vrabel, Boris Ostrovsky, Konrad Rzeszutek Wilk
Cc: xen-devel, linux-kernel
It's not clear to me why only the enabling operation got handled so
far.
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;
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-03-16 14:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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: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-11 14:42 ` Konrad Rzeszutek Wilk
2015-03-16 14:54 ` David Vrabel
2015-03-16 14:54 ` [Xen-devel] " David Vrabel
2015-03-11 13:52 Jan Beulich
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.