diff mbox

[1/2] xscom: Fix logging of indirect XSCOM errors

Message ID 1443592021.2828.1.camel@kernel.crashing.org
State Accepted
Headers show

Commit Message

Benjamin Herrenschmidt Sept. 30, 2015, 5:47 a.m. UTC
We didn't pass the right "is_write" argument for writes and
the string used for logging was somewhat confusing.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 hw/xscom.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Stewart Smith Sept. 30, 2015, 11:56 a.m. UTC | #1
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> We didn't pass the right "is_write" argument for writes and
> the string used for logging was somewhat confusing.

Looks pretty obviously correct. Merged as of 902e1a6.
diff mbox

Patch

diff --git a/hw/xscom.c b/hw/xscom.c
index ba9130a..f803615 100644
--- a/hw/xscom.c
+++ b/hw/xscom.c
@@ -165,12 +165,12 @@  static void xscom_handle_ind_error(uint64_t data, uint32_t gcid,
 	/* XXX: Create error log entry ? */
 	if (timeout)
 		log_simple_error(&e_info(OPAL_RC_XSCOM_INDIRECT_RW),
-			"XSCOM: %s indirect timeout, gcid=0x%x pcb_addr=0x%llx"
+			"XSCOM: indirect %s timeout, gcid=0x%x pcb_addr=0x%llx"
 			" stat=0x%x\n",
 			is_write ? "write" : "read", gcid, pcb_addr, stat);
 	else
 		log_simple_error(&e_info(OPAL_RC_XSCOM_INDIRECT_RW),
-			"XSCOM: %s indirect error, gcid=0x%x pcb_addr=0x%llx"
+			"XSCOM: indirect %s error, gcid=0x%x pcb_addr=0x%llx"
 			" stat=0x%x\n",
 			is_write ? "write" : "read", gcid, pcb_addr, stat);
 }
@@ -323,7 +323,7 @@  static int xscom_indirect_write(uint32_t gcid, uint64_t pcb_addr, uint64_t val)
 		if ((data & XSCOM_DATA_IND_COMPLETE) ||
 		    (retries >= XSCOM_IND_MAX_RETRIES)) {
 			xscom_handle_ind_error(data, gcid, pcb_addr,
-					       false);
+					       true);
 			rc = OPAL_HARDWARE;
 			goto bail;
 		}