From patchwork Thu Jan 21 03:51:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 571031 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 AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5491C14010F for ; Thu, 21 Jan 2016 14:52:26 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 392671A1949 for ; Thu, 21 Jan 2016 14:52:26 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e19.ny.us.ibm.com (e19.ny.us.ibm.com [129.33.205.209]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id DCACD1A18F0 for ; Thu, 21 Jan 2016 14:51:51 +1100 (AEDT) Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 20 Jan 2016 22:51:49 -0500 Received: from d01dlp01.pok.ibm.com (9.56.250.166) by e19.ny.us.ibm.com (146.89.104.206) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 20 Jan 2016 22:51:47 -0500 X-IBM-Helo: d01dlp01.pok.ibm.com X-IBM-MailFrom: stewart@linux.vnet.ibm.com X-IBM-RcptTo: skiboot@lists.ozlabs.org Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 0129538C8039 for ; Wed, 20 Jan 2016 22:51:47 -0500 (EST) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u0L3pklw36110382 for ; Thu, 21 Jan 2016 03:51:46 GMT Received: from d01av04.pok.ibm.com (localhost [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u0L3pkq5016882 for ; Wed, 20 Jan 2016 22:51:46 -0500 Received: from birb.localdomain (birb.au.ibm.com [9.185.120.228] (may be forged)) by d01av04.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u0L3pZUQ016298; Wed, 20 Jan 2016 22:51:45 -0500 Received: from ka1.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by birb.localdomain (Postfix) with ESMTP id 4967C2298E23; Thu, 21 Jan 2016 14:51:25 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Thu, 21 Jan 2016 14:51:12 +1100 Message-Id: <1453348281-16085-6-git-send-email-stewart@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1453348281-16085-1-git-send-email-stewart@linux.vnet.ibm.com> References: <1453348281-16085-1-git-send-email-stewart@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16012103-0057-0000-0000-000003343154 Subject: [Skiboot] [PATCH stable 05/14] Fix endian flip in printf for FSP in hdata/fsp.c X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" commit dfab2fb87c2d83e240a002e8829b525d10342df3 upstream Harmless for skiboot as we're BE. When building and running unit tests on LE though, we got an incorrect hw/software version for FSP hardware/software for hdata_to_dt test. Signed-off-by: Stewart Smith --- hdata/fsp.c | 5 +++-- hdata/test/p81-811.spira.dt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hdata/fsp.c b/hdata/fsp.c index 595e1f8b1795..158b78b7625f 100644 --- a/hdata/fsp.c +++ b/hdata/fsp.c @@ -39,8 +39,9 @@ static struct dt_node *fsp_create_node(const void *spss, int i, } prlog(PR_INFO, "FSP #%d: FSP HW version %d, SW version %d," - " chip DD%d.%d\n", - i, sp_impl->hw_version, sp_impl->sw_version, + " chip DD%d.%d\n", i, + be16_to_cpu(sp_impl->hw_version), + be16_to_cpu(sp_impl->sw_version), sp_impl->chip_version >> 4, sp_impl->chip_version & 0xf); mask = SPSS_SP_IMPL_FLAGS_INSTALLED | SPSS_SP_IMPL_FLAGS_FUNCTIONAL; if ((be16_to_cpu(sp_impl->func_flags) & mask) != mask) { diff --git a/hdata/test/p81-811.spira.dt b/hdata/test/p81-811.spira.dt index 388bb56a26b5..025779a64d1f 100644 --- a/hdata/test/p81-811.spira.dt +++ b/hdata/test/p81-811.spira.dt @@ -70,7 +70,7 @@ XSCOM: Found HW ID 0x10 (PCID 0x2) @ 0x3c8000000000 VPD: CCIN desc not available for : 54E8 XSCOM: Found HW ID 0x11 (PCID 0x3) @ 0x3c8800000000 VPD: CCIN desc not available for : 54E8 -FSP #0: FSP HW version 512, SW version 256, chip DD1.0 +FSP #0: FSP HW version 2, SW version 1, chip DD1.0 CEC: HUB FRU 0 is CPU Card CEC: 2 chips in FRU CEC: Murano !