From patchwork Mon Mar 20 23:30:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dullfire@yahoo.com X-Patchwork-Id: 13181996 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5BA3C6FD1C for ; Mon, 20 Mar 2023 23:32:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:References:MIME-Version:Message-Id:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: List-Owner; bh=HbfL03zF82PV23K1JQJY4TgGxIV+1N1ZpvFoOmoNSPA=; b=2hR9gGcGIb2/fD TjqeecyLqDetjLj3GecV+J9fVt7dGyMcfDRJQeK2+UFjR8em9XjvRaXd12DRHiGIw4wCISjXOIRtr MkwBHnZgEj4129TEiHc1h/0r+dXXMfWj/JZNz8++hfjHKgHPRh76z4EjPl2x+YhzTf3onBot0EU5B 2SSKOeYyG6zjPSfqiaoaap1sBjtOW9yrPe0RFas4BGEH5oXKvR1e9Mo84Vv0MjvklGl50ru6xo2dN gs/mOUpGJNw7elfP0mgZeSfIzqXfGznGO+PsjiWWtgM7i6a55GQtAy23DGkaHcAZ+VnmK3Pd0yr4v NXoVRNvfuEzHanI5IXQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peOyK-00AmLN-0K; Mon, 20 Mar 2023 23:31:24 +0000 Received: from sonic306-3.consmr.mail.bf2.yahoo.com ([74.6.132.42]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peOyG-00AmJy-2Y for linux-arm-kernel@lists.infradead.org; Mon, 20 Mar 2023 23:31:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1679355073; bh=MpWM8Q/2DGA+ikhmmtqf3BqHRcilNhhVzqzRWUyhTf8=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=uF3V8tUWzF/0RAOxazLMHpAxybGRRNq6Qz8idtCiU7CCfiB8VLFGFXp2C6ciq1B2PjHKjlw9Itosk72kJPqEPlJ6LMcEwccP7f1D2jBcfZY/64KffTArnJZVF8si13zzD46KnWJ8b3MbVDP3dVUVgDVcbGEHcYdwJmwU1gfo4XUOFwBnUfmG9JLeBuWBZoNvoosz47C9lVHQURW60jyqAoiojY7pzZnT5sChvbiga08ifGMvNutDp1jJUzmaA+tU53SzJqUGXt3oZ+ZjvYXFaXYuP83YpIRPQxS71y6s+XIniEdqjVlDeZSlBcYzw2yQiYr/Sdz0vhQoPIGal/Bxkw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1679355073; bh=/UlsF13GHrgKZmx8CDCB0Vg+/OKfbLUEi6B/xeFSHcI=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=h0gCgcElzWJb14uwYgYNZ8JUQt5f8ubQtqHTzVcqAKTMxZHKiHipjBZCM9enZggfubY/88SKeUAoH4l83i9/By67+JtPaNHSsF/0E4Qr+J9VKuUuTlMO4l6deWLfMQ/x0cLd/N2d/BzH82VmN/JA3CJexZ4mFV46AhNPAr5lvHt3bJR9kghkModPAQscNva0E/0aCI5UZns+o56XUzmRoQneNuWl1Qe23KpXDCZPRBVXU5OBexsYW0BHIWHV3FiP5RaO8RR2r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xoPQl6z4yvCeiFrSeV5gdYt8CgoWyR0DiJEwh.O69FEAgZlPXLnN0GnxjzqJ V9BW49wGiOLraWkyRc97VfGJw.SvTOs6YznVG_Y5gYrYfeUkdvBhSiTHMtyYmMv8w00rJl5yaWJ0 In.KqBLEEeSjPGVJ6AksN93XiKuVUPA.tvVjh7KYowbF7e58amvRFkQYyF35bc5g1C5J0Qyo_F2n oRkJ7BadoMSXUPNgAAaQSrPcLtKp5qXsYYtTts6bg__HKAZWZTBmFKKyle9OU X-Sonic-MF: X-Sonic-ID: 74f89efe-c369-4f68-a715-24981dada3ad Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.bf2.yahoo.com with HTTP; Mon, 20 Mar 2023 23:31:13 +0000 Received: by hermes--production-ne1-759c9b8c64-2fnfh (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 70882a74becd0a97811c16556784f0b9; Mon, 20 Mar 2023 23:31:08 +0000 (UTC) From: dullfire@yahoo.com To: Roy.Pledge@nxp.com, leoyang.li@nxp.com, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Cc: Jonathan Currier Subject: [PATCH] soc: fsl: dpio: fix net interfaces probe on big endian Date: Mon, 20 Mar 2023 18:30:20 -0500 Message-Id: <20230320233020.29316-1-dullfire@yahoo.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 References: <20230320233020.29316-1-dullfire.ref@yahoo.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_163120_906490_1D88B095 X-CRM114-Status: UNSURE ( 7.36 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Jonathan Currier qbman-portal failed to correct for system endianness, resulting in command time outs. Signed-off-by: Jonathan Currier --- drivers/soc/fsl/dpio/qbman-portal.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/soc/fsl/dpio/qbman-portal.c b/drivers/soc/fsl/dpio/qbman-portal.c index 0a3fb6c115f4..0f8f5f982399 100644 --- a/drivers/soc/fsl/dpio/qbman-portal.c +++ b/drivers/soc/fsl/dpio/qbman-portal.c @@ -477,24 +477,26 @@ void qbman_swp_mc_submit(struct qbman_swp *p, void *cmd, u8 cmd_verb) */ void *qbman_swp_mc_result(struct qbman_swp *p) { - u32 *ret, verb; + u32 *ret, verb, result; if ((p->desc->qman_version & QMAN_REV_MASK) < QMAN_REV_5000) { ret = qbman_get_cmd(p, QBMAN_CENA_SWP_RR(p->mc.valid_bit)); + result = le32_to_cpu(ret[0]); /* Remove the valid-bit - command completed if the rest * is non-zero. */ - verb = ret[0] & ~QB_VALID_BIT; + verb = result & ~QB_VALID_BIT; if (!verb) return NULL; p->mc.valid_bit ^= QB_VALID_BIT; } else { ret = qbman_get_cmd(p, QBMAN_CENA_SWP_RR_MEM); + result = le32_to_cpu(ret[0]); /* Command completed if the valid bit is toggled */ - if (p->mr.valid_bit != (ret[0] & QB_VALID_BIT)) + if (p->mr.valid_bit != (result & QB_VALID_BIT)) return NULL; /* Command completed if the rest is non-zero */ - verb = ret[0] & ~QB_VALID_BIT; + verb = result & ~QB_VALID_BIT; if (!verb) return NULL; p->mr.valid_bit ^= QB_VALID_BIT;