From: Piotr Gregor <piotrgregor@rsyncme.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Alex Williamson <alex.williamson@redhat.com>,
Bjorn Helgaas <bhelgaas@google.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Neo Jia <cjia@nvidia.com>, Kirti Wankhede <kwankhede@nvidia.com>,
Vlad Tsyrklevich <vlad@tsyrklevich.net>,
Arvind Yadav <arvind.yadav.cs@gmail.com>,
Yongji Xie <xyjxie@linux.vnet.ibm.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org
Subject: Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device
Date: Mon, 19 Jun 2017 01:26:52 +0100 [thread overview]
Message-ID: <20170619002651.GA29796@westernst> (raw)
In-Reply-To: <20170618011433.GK11129@bhelgaas-glaptop.roam.corp.google.com>
On Sat, Jun 17, 2017 at 08:14:33PM -0500, Bjorn Helgaas wrote:
> On Sat, Jun 17, 2017 at 06:45:44PM +0100, Piotr Gregor wrote:
> > Hi Bjorn,
> >
> > The pci_cfg_access_lock is most likely not needed there.
> > The assignment by return type is indeed preferred in this case.
> >
> > However, you have changed the meaning of returned boolean information
> > by pci_intx_mask_broken leaving pci_intx_mask_supported unchanged.
> > The test should be:
> >
> > if (new != toggle) /* the test failed */
> > return 1;
> > return 0;
>
> Oh, you're absolutely right, thanks for catching that! I updated my
> pci/enumeration branch.
>
> > Regarding v2.3 - do you think it is worth to apply the check
> > so we would have something like
> >
> > if ((new == toggle) || PCI_VERSION_PRIOR_TO_23) /* test OK or PCI prior to r2.3 */
> > return 0;
> > return 1;
>
> I'm not sure how to test for r2.3 compliance. But even if we could, I
> guess I think the current code is probably better because it actually
> checks the property we care about, not a spec revision that is one
> step removed from the property.
>
> Bjorn
Hi Bjorn,
You are right, having
if ((new == toggle) || PCI_VERSION_PRIOR_TO_23) /* test OK or PCI prior to r2.3 */
return 0;
return 1;
would be incorrect, as if new != toggle then PCI_COMMAND_INTX_DISABLE is not writable
so INTx masking support should be considered broken (regardless of PCI version).
Piotr
next prev parent reply other threads:[~2017-06-19 0:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 21:02 [PATCH] PCI: Move test of INTx masking to pci_setup_device Piotr Gregor
2017-05-26 21:31 ` Alex Williamson
2017-05-29 0:05 ` Michael S. Tsirkin
2017-06-16 22:54 ` Bjorn Helgaas
2017-06-17 17:45 ` Piotr Gregor
2017-06-18 1:14 ` Bjorn Helgaas
2017-06-19 0:26 ` Piotr Gregor [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-05-25 21:32 Piotr Gregor
2017-05-25 22:26 ` Alex Williamson
2017-05-25 18:13 Piotr Gregor
2017-05-25 18:22 ` Michael S. Tsirkin
2017-05-25 18:38 ` Alex Williamson
2017-05-25 20:17 ` Piotr Gregor
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=20170619002651.GA29796@westernst \
--to=piotrgregor@rsyncme.org \
--cc=alex.williamson@redhat.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=bhelgaas@google.com \
--cc=cjia@nvidia.com \
--cc=gregkh@linuxfoundation.org \
--cc=helgaas@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=kwankhede@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mst@redhat.com \
--cc=vlad@tsyrklevich.net \
--cc=xyjxie@linux.vnet.ibm.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 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).