qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Chen Fan <chen.fan.fnst@cn.fujitsu.com>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: [Qemu-devel] [PULL 3/8] pcie: correct mistaken register bit for End-End TLP Prefix Blocking
Date: Wed, 18 Mar 2015 13:34:42 +0100	[thread overview]
Message-ID: <1426682025-20844-4-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1426682025-20844-1-git-send-email-mst@redhat.com>

From: Chen Fan <chen.fan.fnst@cn.fujitsu.com>

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>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/hw/pci/pcie_regs.h | 2 +-
 hw/pci/pcie.c              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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
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;
 }
 
-- 
MST

  parent reply	other threads:[~2015-03-18 12:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 12:34 [Qemu-devel] [PULL 0/8] pci, virtio bugfixes for 2.3 Michael S. Tsirkin
2015-03-18 12:34 ` [Qemu-devel] [PULL 1/8] virtio: validate the existence of handle_output before calling it Michael S. Tsirkin
2015-03-18 12:34 ` [Qemu-devel] [PULL 2/8] virtio: Fix memory leaks reported by Coverity Michael S. Tsirkin
2015-03-18 12:34 ` Michael S. Tsirkin [this message]
2015-03-18 12:34 ` [Qemu-devel] [PULL 4/8] aer: fix wrong check on expose aer tlp prefix log Michael S. Tsirkin
2015-03-18 12:34 ` [Qemu-devel] [PULL 5/8] pcie_aer: fix typos in pcie_aer_inject_error comment Michael S. Tsirkin
2015-03-18 12:34 ` [Qemu-devel] [PULL 6/8] aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register Michael S. Tsirkin
2015-03-18 12:34 ` [Qemu-devel] [PULL 7/8] pci: fix several trivial typos in comment Michael S. Tsirkin
2015-03-18 12:34 ` [Qemu-devel] [PULL 8/8] pcie_aer: fix comment to match pcie spec Michael S. Tsirkin
2015-03-19 12:08 ` [Qemu-devel] [PULL 0/8] pci, virtio bugfixes for 2.3 Peter Maydell

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=1426682025-20844-4-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=chen.fan.fnst@cn.fujitsu.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).