aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2017-07-20 16:22:15 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-07-25 15:42:30 +1000
commit47b647235345f9a9429bf4a9b3925c6f96443e99 (patch)
tree507e177ca02f27396c43bacede643340851936f9 /hw
parent65d7ce5d3bf508b841cbaad1a3a03626b034721a (diff)
downloadskiboot-47b647235345f9a9429bf4a9b3925c6f96443e99.zip
skiboot-47b647235345f9a9429bf4a9b3925c6f96443e99.tar.gz
skiboot-47b647235345f9a9429bf4a9b3925c6f96443e99.tar.bz2
phb4: Fix endian of TLP headers print
Byte swap TLP headers so they are the same as the PCIe spec. Also remove redundant print. Suggested-by: Rob Lippert <rlippert@google.com> Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/phb4.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/phb4.c b/hw/phb4.c
index cf9ee61..6c3ca60 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -203,12 +203,12 @@ static void phb4_eeh_dump_regs(struct phb4 *p)
PHBERR(p, " uncorrErrorStatus = %08x\n", s->uncorrErrorStatus);
PHBERR(p, " corrErrorStatus = %08x\n", s->corrErrorStatus);
PHBERR(p, " uncorrErrorStatus = %08x\n", s->uncorrErrorStatus);
- PHBERR(p, " tlpHdr1 = %08x\n", s->tlpHdr1);
- PHBERR(p, " tlpHdr2 = %08x\n", s->tlpHdr2);
- PHBERR(p, " tlpHdr3 = %08x\n", s->tlpHdr3);
- PHBERR(p, " tlpHdr4 = %08x\n", s->tlpHdr4);
+ /* Byte swap TLP headers so they are the same as the PCIe spec */
+ PHBERR(p, " tlpHdr1 = %08x\n", bswap_32(s->tlpHdr1));
+ PHBERR(p, " tlpHdr2 = %08x\n", bswap_32(s->tlpHdr2));
+ PHBERR(p, " tlpHdr3 = %08x\n", bswap_32(s->tlpHdr3));
+ PHBERR(p, " tlpHdr4 = %08x\n", bswap_32(s->tlpHdr4));
PHBERR(p, " sourceId = %08x\n", s->sourceId);
- PHBERR(p, " tlpHdr1 = %08x\n", s->tlpHdr1);
PHBERR(p, " nFir = %016llx\n", s->nFir);
PHBERR(p, " nFirMask = %016llx\n", s->nFirMask);
PHBERR(p, " nFirWOF = %016llx\n", s->nFirWOF);