diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-06-09 09:18:30 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2011-06-12 10:33:39 +0300 |
commit | 81486b55f4e08601fdbe71182aa9efaac11d806b (patch) | |
tree | dff8d1c45748194f19cbdfe44511fb3ed083316d /hw/pcie_aer.c | |
parent | 4dad7f1ec51e13b40d2554d666cc122ed898d8e6 (diff) | |
download | qemu-81486b55f4e08601fdbe71182aa9efaac11d806b.tar.gz qemu-81486b55f4e08601fdbe71182aa9efaac11d806b.tar.bz2 qemu-81486b55f4e08601fdbe71182aa9efaac11d806b.zip |
pci: Update pci_regs header
Pulls in latest version from kernel 3.0-rc2.
Some changes around AER now require local defines as QEMU accesses the
error source identification register via sub-words.
CC: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pcie_aer.c')
-rw-r--r-- | hw/pcie_aer.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hw/pcie_aer.c b/hw/pcie_aer.c index 0c4e8a5d22..b87201026b 100644 --- a/hw/pcie_aer.c +++ b/hw/pcie_aer.c @@ -38,6 +38,9 @@ #define PCIE_DEV_PRINTF(dev, fmt, ...) \ PCIE_DPRINTF("%s:%x "fmt, (dev)->name, (dev)->devfn, ## __VA_ARGS__) +#define PCI_ERR_SRC_COR_OFFS 0 +#define PCI_ERR_SRC_UNCOR_OFFS 2 + /* From 6.2.7 Error Listing and Rules. Table 6-2, 6-3 and 6-4 */ static uint32_t pcie_aer_uncor_default_severity(uint32_t status) { @@ -320,7 +323,8 @@ static void pcie_aer_msg_root_port(PCIDevice *dev, const PCIEAERMsg *msg) if (root_status & PCI_ERR_ROOT_COR_RCV) { root_status |= PCI_ERR_ROOT_MULTI_COR_RCV; } else { - pci_set_word(aer_cap + PCI_ERR_ROOT_COR_SRC, msg->source_id); + pci_set_word(aer_cap + PCI_ERR_ROOT_ERR_SRC + PCI_ERR_SRC_COR_OFFS, + msg->source_id); } root_status |= PCI_ERR_ROOT_COR_RCV; break; @@ -341,7 +345,8 @@ static void pcie_aer_msg_root_port(PCIDevice *dev, const PCIEAERMsg *msg) if (root_status & PCI_ERR_ROOT_UNCOR_RCV) { root_status |= PCI_ERR_ROOT_MULTI_UNCOR_RCV; } else { - pci_set_word(aer_cap + PCI_ERR_ROOT_SRC, msg->source_id); + pci_set_word(aer_cap + PCI_ERR_ROOT_ERR_SRC + + PCI_ERR_SRC_UNCOR_OFFS, msg->source_id); } root_status |= PCI_ERR_ROOT_UNCOR_RCV; } |