From: Keith Busch <keith.busch@intel.com>
To: Bjorn Helgaas <bhelgaas@google.com>, linux-pci@vger.kernel.org
Cc: Wesley Yung <wesley.yung@microsemi.com>,
Sammy Hui <sammy.hui@intel.com>,
Joseph Gruher <joseph.r.gruher@intel.com>,
Wei Zhang <wzhang@fb.com>, Krishna Dhulipala <krishnad@fb.com>,
Keith Busch <keith.busch@intel.com>
Subject: [PATCH 2/2] pcie/dpc: Fix control register setting
Date: Fri, 28 Apr 2017 12:02:49 -0400 [thread overview]
Message-ID: <1493395369-20225-3-git-send-email-keith.busch@intel.com> (raw)
In-Reply-To: <1493395369-20225-1-git-send-email-keith.busch@intel.com>
This driver was OR'ing desired bits from the existing control
setting. That could create an invalid DPC Trigger Enabled configuration
if the platform previously set this to "ERR_FATAL", 01b. The driver
currently wants to set this to ERR_NONFATAL/ERR_FATAL, 10b, and the
logical OR of this gets 11b, which is reserved. This patch fixes that
by masking off the fields it is setting.
Signed-off-by: Keith Busch <keith.busch@intel.com>
---
drivers/pci/pcie/pcie-dpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c
index fc2a4a7..88a66b4 100644
--- a/drivers/pci/pcie/pcie-dpc.c
+++ b/drivers/pci/pcie/pcie-dpc.c
@@ -139,7 +139,7 @@ static int dpc_probe(struct pcie_device *dev)
dpc->rp = (cap & PCI_EXP_DPC_CAP_RP_EXT);
- ctl |= PCI_EXP_DPC_CTL_EN_NONFATAL | PCI_EXP_DPC_CTL_INT_EN;
+ ctl = (ctl & 0xfff4) | PCI_EXP_DPC_CTL_EN_NONFATAL | PCI_EXP_DPC_CTL_INT_EN;
pci_write_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_CTL, ctl);
dev_info(&dev->device, "DPC error containment capabilities: Int Msg #%d, RPExt%c PoisonedTLP%c SwTrigger%c RP PIO Log %d, DL_ActiveErr%c\n",
--
2.7.2
next prev parent reply other threads:[~2017-04-28 15:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 16:02 [PATCH 0/2] pcie/dpc: Fixes Keith Busch
2017-04-28 16:02 ` [PATCH 1/2] pcie/dpc: Skip DPC event if device is not present Keith Busch
2017-05-10 3:39 ` Wei Zhang
2017-05-10 13:17 ` Keith Busch
2017-05-10 14:16 ` Wesley Yung
2017-05-10 16:35 ` Wei Zhang
2017-05-10 16:44 ` Keith Busch
2017-05-10 16:43 ` Wesley Yung
2017-05-10 16:52 ` Wesley Yung
2017-05-10 17:42 ` Keith Busch
2017-04-28 16:02 ` Keith Busch [this message]
2017-05-22 23:43 ` [PATCH 0/2] pcie/dpc: Fixes Bjorn Helgaas
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=1493395369-20225-3-git-send-email-keith.busch@intel.com \
--to=keith.busch@intel.com \
--cc=bhelgaas@google.com \
--cc=joseph.r.gruher@intel.com \
--cc=krishnad@fb.com \
--cc=linux-pci@vger.kernel.org \
--cc=sammy.hui@intel.com \
--cc=wesley.yung@microsemi.com \
--cc=wzhang@fb.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).