* [Qemu-devel] [PATCH 0/2] pci: fix aer related wrong
@ 2015-03-13 3:18 Chen Fan
2015-03-13 3:18 ` [Qemu-devel] [PATCH 1/2] pcie: correct mistaken register bit for End-End TLP Prefix Blocking Chen Fan
2015-03-13 3:18 ` [Qemu-devel] [PATCH 2/2] aer: fix wrong check on expose aer tlp prefix log Chen Fan
0 siblings, 2 replies; 3+ messages in thread
From: Chen Fan @ 2015-03-13 3:18 UTC (permalink / raw)
To: qemu-devel; +Cc: mjt, mst
there are somethings about misuse register bit, so here fix them.
Chen Fan (2):
pcie: correct mistaken register bit for End-End TLP Prefix Blocking
aer: fix wrong check on expose aer tlp prefix log
hw/pci/pcie.c | 2 +-
hw/pci/pcie_aer.c | 2 +-
include/hw/pci/pcie_regs.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 1/2] pcie: correct mistaken register bit for End-End TLP Prefix Blocking
2015-03-13 3:18 [Qemu-devel] [PATCH 0/2] pci: fix aer related wrong Chen Fan
@ 2015-03-13 3:18 ` Chen Fan
2015-03-13 3:18 ` [Qemu-devel] [PATCH 2/2] aer: fix wrong check on expose aer tlp prefix log Chen Fan
1 sibling, 0 replies; 3+ messages in thread
From: Chen Fan @ 2015-03-13 3:18 UTC (permalink / raw)
To: qemu-devel; +Cc: mjt, mst
from pcie spec 7.8.17, the End-End TLP Prefix Blocking bit local
is 15(e.g. 0x8000) in device control 2 register.
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
---
hw/pci/pcie.c | 2 +-
include/hw/pci/pcie_regs.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 1abbbb1..1463e65 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -84,7 +84,7 @@ int pcie_cap_init(PCIDevice *dev, uint8_t offset, uint8_t type, uint8_t port)
pci_set_long(exp_cap + PCI_EXP_DEVCAP2,
PCI_EXP_DEVCAP2_EFF | PCI_EXP_DEVCAP2_EETLPP);
- pci_set_word(dev->wmask + pos, PCI_EXP_DEVCTL2_EETLPPB);
+ pci_set_word(dev->wmask + pos + PCI_EXP_DEVCTL2, PCI_EXP_DEVCTL2_EETLPPB);
return pos;
}
diff --git a/include/hw/pci/pcie_regs.h b/include/hw/pci/pcie_regs.h
index 652d9fc..848ab1c 100644
--- a/include/hw/pci/pcie_regs.h
+++ b/include/hw/pci/pcie_regs.h
@@ -72,7 +72,7 @@
#define PCI_EXP_DEVCAP2_EFF 0x100000
#define PCI_EXP_DEVCAP2_EETLPP 0x200000
-#define PCI_EXP_DEVCTL2_EETLPPB 0x80
+#define PCI_EXP_DEVCTL2_EETLPPB 0x8000
/* ARI */
#define PCI_ARI_VER 1
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 2/2] aer: fix wrong check on expose aer tlp prefix log
2015-03-13 3:18 [Qemu-devel] [PATCH 0/2] pci: fix aer related wrong Chen Fan
2015-03-13 3:18 ` [Qemu-devel] [PATCH 1/2] pcie: correct mistaken register bit for End-End TLP Prefix Blocking Chen Fan
@ 2015-03-13 3:18 ` Chen Fan
1 sibling, 0 replies; 3+ messages in thread
From: Chen Fan @ 2015-03-13 3:18 UTC (permalink / raw)
To: qemu-devel; +Cc: mjt, mst
when specify TLP Prefix log as using pcie_aer_inject_error,
the TLP prefix log is always discarded. because the check
is incorrect, the End-End TLP Prefix Supported bit
(PCI_EXP_DEVCAP2_EETLPP) should be in Device Capabilities 2 Register.
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
---
hw/pci/pcie_aer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c
index 5a25c32..c7fad34 100644
--- a/hw/pci/pcie_aer.c
+++ b/hw/pci/pcie_aer.c
@@ -433,7 +433,7 @@ static void pcie_aer_update_log(PCIDevice *dev, const PCIEAERErr *err)
}
if ((err->flags & PCIE_AER_ERR_TLP_PREFIX_PRESENT) &&
- (pci_get_long(dev->config + dev->exp.exp_cap + PCI_EXP_DEVCTL2) &
+ (pci_get_long(dev->config + dev->exp.exp_cap + PCI_EXP_DEVCAP2) &
PCI_EXP_DEVCAP2_EETLPP)) {
for (i = 0; i < ARRAY_SIZE(err->prefix); ++i) {
/* 7.10.12 tlp prefix log register */
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-13 3:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-13 3:18 [Qemu-devel] [PATCH 0/2] pci: fix aer related wrong Chen Fan
2015-03-13 3:18 ` [Qemu-devel] [PATCH 1/2] pcie: correct mistaken register bit for End-End TLP Prefix Blocking Chen Fan
2015-03-13 3:18 ` [Qemu-devel] [PATCH 2/2] aer: fix wrong check on expose aer tlp prefix log Chen Fan
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).