All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	YueHaibing <yuehaibing@huawei.com>,
	open list <linux-kernel@vger.kernel.org>,
	Simon Gaiser <simon@invisiblethingslab.com>,
	Jan Beulich <jbeulich@suse.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] [PATCH v3] xen-pciback: optionally allow interrupt enable flag writes
Date: Mon, 13 Jan 2020 22:39:17 +0100	[thread overview]
Message-ID: <20200113213917.GD1314@mail-itl> (raw)
In-Reply-To: <9ea42829-6a1a-09eb-9d59-67a0487980b6@oracle.com>


[-- Attachment #1.1: Type: text/plain, Size: 1058 bytes --]

On Mon, Jan 13, 2020 at 04:25:02PM -0500, Boris Ostrovsky wrote:
> 
> 
> On 1/10/20 10:43 PM, Marek Marczykowski-Górecki wrote:
> > @@ -117,6 +117,24 @@ static int command_write(struct pci_dev *dev, int offset, u16 value, void *data)
> >   		pci_clear_mwi(dev);
> >   	}
> > +	if (dev_data && dev_data->allow_interrupt_control) {
> > +		if ((cmd->val ^ val) & PCI_COMMAND_INTX_DISABLE) {
> > +			if (value & PCI_COMMAND_INTX_DISABLE) {
> > +				pci_intx(dev, 0);
> > +			} else {
> > +				/* Do not allow enabling INTx together with MSI or MSI-X. */
> > +				switch (xen_pcibk_get_interrupt_type(dev)) {
> > +				case INTERRUPT_TYPE_NONE:
> > +				case INTERRUPT_TYPE_INTX:
> > +					pci_intx(dev, 1);
> 
> If INTERRUPT_TYPE_INTX , why call pci_intx(1)?

Not needed indeed.

> 
> (I think I asked this last time as well).
> 
> 
> -boris
> 
> 

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>,
	Simon Gaiser <simon@invisiblethingslab.com>,
	Juergen Gross <jgross@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	YueHaibing <yuehaibing@huawei.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] xen-pciback: optionally allow interrupt enable flag writes
Date: Mon, 13 Jan 2020 22:39:17 +0100	[thread overview]
Message-ID: <20200113213917.GD1314@mail-itl> (raw)
In-Reply-To: <9ea42829-6a1a-09eb-9d59-67a0487980b6@oracle.com>

[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]

On Mon, Jan 13, 2020 at 04:25:02PM -0500, Boris Ostrovsky wrote:
> 
> 
> On 1/10/20 10:43 PM, Marek Marczykowski-Górecki wrote:
> > @@ -117,6 +117,24 @@ static int command_write(struct pci_dev *dev, int offset, u16 value, void *data)
> >   		pci_clear_mwi(dev);
> >   	}
> > +	if (dev_data && dev_data->allow_interrupt_control) {
> > +		if ((cmd->val ^ val) & PCI_COMMAND_INTX_DISABLE) {
> > +			if (value & PCI_COMMAND_INTX_DISABLE) {
> > +				pci_intx(dev, 0);
> > +			} else {
> > +				/* Do not allow enabling INTx together with MSI or MSI-X. */
> > +				switch (xen_pcibk_get_interrupt_type(dev)) {
> > +				case INTERRUPT_TYPE_NONE:
> > +				case INTERRUPT_TYPE_INTX:
> > +					pci_intx(dev, 1);
> 
> If INTERRUPT_TYPE_INTX , why call pci_intx(1)?

Not needed indeed.

> 
> (I think I asked this last time as well).
> 
> 
> -boris
> 
> 

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-01-13 21:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-11  3:43 [Xen-devel] [PATCH v3] xen-pciback: optionally allow interrupt enable flag writes Marek Marczykowski-Górecki
2020-01-11  3:43 ` Marek Marczykowski-Górecki
2020-01-13 21:25 ` [Xen-devel] " Boris Ostrovsky
2020-01-13 21:25   ` Boris Ostrovsky
2020-01-13 21:39   ` Marek Marczykowski-Górecki [this message]
2020-01-13 21:39     ` Marek Marczykowski-Górecki
     [not found] <202001112351.gy4c3aUU%lkp@intel.com>
2020-01-13 17:11 ` [Xen-devel] " Nick Desaulniers

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=20200113213917.GD1314@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simon@invisiblethingslab.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yuehaibing@huawei.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 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.