diff options
author | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2020-07-15 03:32:52 +0000 |
---|---|---|
committer | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2020-07-15 03:32:52 +0000 |
commit | 02445cf42141c4c37eda1546b39c912beceb29d2 (patch) | |
tree | e936aef3cf6e44597fb24068720465f80892271a | |
parent | d091ec9c3052d94962a02723d400c9ca073aaa14 (diff) |
Consistently convert syndrome codes from big endian before printing them.
ok dlg@
-rw-r--r-- | sys/dev/pci/if_mcx.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c index aef4bfd8b0a..f614494596e 100644 --- a/sys/dev/pci/if_mcx.c +++ b/sys/dev/pci/if_mcx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mcx.c,v 1.64 2020/07/14 04:10:18 jmatthew Exp $ */ +/* $OpenBSD: if_mcx.c,v 1.65 2020/07/15 03:32:51 jmatthew Exp $ */ /* * Copyright (c) 2017 David Gwynne <dlg@openbsd.org> @@ -3345,7 +3345,7 @@ mcx_access_hca_reg(struct mcx_softc *sc, uint16_t reg, int op, void *data, if (out->cmd_status != MCX_CQ_STATUS_OK) { printf("%s: access reg (%s %x) failed (%x, %.6x)\n", DEVNAME(sc), (op == MCX_REG_OP_WRITE ? "write" : "read"), - reg, out->cmd_status, out->cmd_syndrome); + reg, out->cmd_status, betoh32(out->cmd_syndrome)); error = -1; goto free; } @@ -3967,7 +3967,7 @@ mcx_iff(struct mcx_softc *sc) out = mcx_cmdq_out(cqe); if (out->cmd_status != MCX_CQ_STATUS_OK) { printf(", modify nic vport context failed (%x, %x)\n", - out->cmd_status, out->cmd_syndrome); + out->cmd_status, betoh32(out->cmd_syndrome)); error = -1; goto free; } @@ -4214,7 +4214,7 @@ mcx_query_nic_vport_context(struct mcx_softc *sc) out = mcx_cmdq_out(cqe); if (out->cmd_status != MCX_CQ_STATUS_OK) { printf(", query nic vport context failed (%x, %x)\n", - out->cmd_status, out->cmd_syndrome); + out->cmd_status, betoh32(out->cmd_syndrome)); error = -1; goto free; } @@ -6145,7 +6145,7 @@ mcx_dump_counters(struct mcx_softc *sc) out = mcx_cmdq_out(cqe); if (out->cmd_status != MCX_CQ_STATUS_OK) { printf("%s: query nic vport counters failed (%x, %x)\n", - DEVNAME(sc), out->cmd_status, out->cmd_syndrome); + DEVNAME(sc), out->cmd_status, betoh32(out->cmd_syndrome)); error = -1; goto free; } @@ -6215,7 +6215,7 @@ mcx_dump_flow_counter(struct mcx_softc *sc, int index, const char *what) out = mcx_cmdq_out(cqe); if (out->cmd_status != MCX_CQ_STATUS_OK) { printf("%s: query flow counter failed (%x, %x)\n", DEVNAME(sc), - out->cmd_status, out->cmd_syndrome); + out->cmd_status, betoh32(out->cmd_syndrome)); error = -1; goto free; } |