From: Sinan Kaya <okaya@codeaurora.org>
To: linux-pci@vger.kernel.org, timur@codeaurora.org, wim.ten.have@oracle.com
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V2] PCI: Do not enable extended tags on pre-dated (v1.x) systems
Date: Fri, 7 Jul 2017 11:22:08 -0400 [thread overview]
Message-ID: <a257422d-206c-a5a9-f964-a1f476ca5850@codeaurora.org> (raw)
In-Reply-To: <f95ae702-1b7b-b2d4-72bd-0518badfefbc@codeaurora.org>
On 7/7/2017 11:07 AM, Sinan Kaya wrote:
> On 7/7/2017 10:53 AM, Sinan Kaya wrote:
>> + ret = pcie_capability_read_word(dev, PCI_EXP_FLAGS, &flags);
>> + if (ret || ((flags & PCI_EXP_FLAGS_VERS) < 2))
>> + return 0;
>>
>
> Never mind, there is a problem here. I shouldn't have added it here.
> I'll remove these and post again.
>
I guess I'll wait until Bjorn gets a chance to review it. There is a decision
that needs to be made here.
Under normal circumstances, extended tags capability is a reserved field on
v1 that's expected to be 0.
Code is checking for extended tags capability being non-zero next
before setting/clearing the bit.
It should be safe to rely on capability being 0 on v1. However, we can go
paranoid and add the check above to not even look at the capability like I
did it.
That's why, I thought this is redundant.
I'll wait until Bjorn chimes in. It is OK to keep the code as it is. It is
just doing too much validation in my opinion. Somebody can always say
play safe.
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2017-07-07 15:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-07 14:53 [PATCH V2] PCI: Do not enable extended tags on pre-dated (v1.x) systems Sinan Kaya
2017-07-07 15:01 ` Sinan Kaya
2017-07-07 16:08 ` Wim ten Have
2017-07-07 15:07 ` Sinan Kaya
2017-07-07 15:22 ` Sinan Kaya [this message]
2017-07-10 23:09 ` Bjorn Helgaas
2017-07-11 0:20 ` Sinan Kaya
2017-07-11 1:41 ` Sinan Kaya
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=a257422d-206c-a5a9-f964-a1f476ca5850@codeaurora.org \
--to=okaya@codeaurora.org \
--cc=bhelgaas@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=timur@codeaurora.org \
--cc=wim.ten.have@oracle.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).