From patchwork Thu Aug 10 06:58:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Currey X-Patchwork-Id: 800110 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xSfCq4rz1z9s7M for ; Thu, 10 Aug 2017 17:00:23 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="IGEsD1yi"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xSfCq3jMgzDr9B for ; Thu, 10 Aug 2017 17:00:23 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="IGEsD1yi"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xSfBZ0NRpzDqsP for ; Thu, 10 Aug 2017 16:59:18 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="IGEsD1yi"; dkim-atps=neutral Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D8A4B21B0E; Thu, 10 Aug 2017 02:59:15 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Thu, 10 Aug 2017 02:59:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=uAdNQ5J3YIgeb/STBKGlr+uuAH9HLq507YD/KLkV3 ag=; b=IGEsD1yiSGqQ8LxzMVrWqrxWaYkZwh/RbjfgSH3C/EFnzDNV38v32JcB+ v+jSV0wsCMdAUik4J8Es4lIiS/UE8boZawDduKkJ0rCmogkerHuoDgQBUpF57oP4 OhzUiYmNzKlxKNN/6uRuEMgo1XtlO44+SHzNqFdrurm3gFIeVrLi5Yxap+mtjnle 08DlKVWoj95Rbw2t4N1AE7vmxrMdiHdF0bPEaHMRp2ku8WyE2f834ghdLBEkQ1xM vLnwKswOhGcF8ZNdGgCBUTv6Lc8CTuQwt1WBL1jy3ziT1kuZGogaG8R8Gpz3gYN0 TQmdIvnBGkJIXoKDEJmNr9uB+48TA== X-ME-Sender: X-Sasl-enc: vMNb7F2HBc7susANEi3vbwb9/VI2ZxIKjRtIMQCuAZ5Y 1502348355 Received: from snap.ozlabs.ibm.com (unknown [122.99.82.10]) by mail.messagingengine.com (Postfix) with ESMTPA id 52A542479F; Thu, 10 Aug 2017 02:59:14 -0400 (EDT) From: Russell Currey To: skiboot@lists.ozlabs.org Date: Thu, 10 Aug 2017 16:58:43 +1000 Message-Id: <20170810065843.13893-6-ruscur@russell.cc> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170810065843.13893-1-ruscur@russell.cc> References: <20170810065843.13893-1-ruscur@russell.cc> Subject: [Skiboot] [PATCH 6/6] phb4: Fix reading wrong size registers in EEH dump X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mikey@neuling.org MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" These registers are supposed to be 16bit, and it makes part of the register dump misleading. Signed-off-by: Russell Currey --- hw/phb4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/phb4.c b/hw/phb4.c index d13ab8c3..4c7bfe3b 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -1906,7 +1906,7 @@ static void phb4_read_phb_status(struct phb4 *p, static void phb4_eeh_dump_regs(struct phb4 *p) { struct OpalIoPhb4ErrorData *s; - uint32_t reg; + uint16_t reg; unsigned int i; if (!verbose_eeh) @@ -1929,9 +1929,9 @@ static void phb4_eeh_dump_regs(struct phb4 *p) PHBERR(p, " uncorrErrorStatus = %08x\n", s->uncorrErrorStatus); /* Two non OPAL API registers that are useful */ - phb4_pcicfg_read32(&p->phb, 0, p->ecap + PCICAP_EXP_DEVCTL, ®); + phb4_pcicfg_read16(&p->phb, 0, p->ecap + PCICAP_EXP_DEVCTL, ®); PHBERR(p, " devctl = %08x\n", reg); - phb4_pcicfg_read32(&p->phb, 0, p->ecap + PCICAP_EXP_DEVSTAT, + phb4_pcicfg_read16(&p->phb, 0, p->ecap + PCICAP_EXP_DEVSTAT, ®); PHBERR(p, " devStat = %08x\n", reg);