Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4333477imw; Tue, 12 Jul 2022 06:17:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v9P3ch4Oslbg9ZlQCKPJdds8aijDVeJOAEY+S4O2iXMfavtSUIXbz316bAgR3FZ62ah2RJ X-Received: by 2002:a17:907:72d1:b0:72b:6da5:9bb with SMTP id du17-20020a17090772d100b0072b6da509bbmr6123758ejc.681.1657631874967; Tue, 12 Jul 2022 06:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657631874; cv=none; d=google.com; s=arc-20160816; b=ivGt5rkdfwRf8CSTN21F0DlXccQx6QnMSQ4DaF0FV2qONcuRHKzmQBcKyhBrzwaeYA fk328X40SP6emhasnvcuhy/fRPRgQlqSI8f4QBDNFY6GePaWR4h0WC+A1tCcvzOmGPSM Ygw2CHfqbMAjoqMdxSPDWUcxSf/OJiABKwGHp/2qxrQw3rz2QJt4DtanZHrJpjz7w54r 1hqW/62KvCI7xU2Xi8M45TNUBmEwxnWb6tGG5il1kJsw5g20CiOFSevkMnpaqI5B2xzA GuGhjZqMwdppsWVAu/2UWaPJJ2KohIfE4jDma4HyXBOS+WDu2cJzbVL+mmQs59s19tuy GDpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5ttA7hy2efh7uguHjjZhwytdsronnsa+uPbqeqsgPMs=; b=beoa2Nvj1k9uyjlUts9S7LIkkR30tM9xXffHvBUz7J7WLbBkBmRZ/d7mGBQk8ZMLnY L8ivt8TlQbRMx5T4KRi3HIgW2augXYTenElthOHa/Ox/mRooIVp6g58zrqEOj/gW5odC ISLTUPWZEd0A+Xs7DcnyZQZilwT0ax7ENdPrTVfcvYov+Yvpi8a33SVPTBDgCYQHElbg 8rwFYRvqYGdGRhubrP1T/dLayWBsH82C/PFRfTq2BU0EZmNFkyejN/5SWqypgFfWIioi ztuIUuWJROPDkoqMKrw/SdwAKMKFHbT6pdSCL35k3w3yd8v/POqQbTLfPg2N3lYYD1R9 NKgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=Tf0NSwVJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc39-20020a17090716a700b00726e142a88esi14701384ejc.983.2022.07.12.06.17.29; Tue, 12 Jul 2022 06:17:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=Tf0NSwVJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232833AbiGLNQP (ORCPT + 99 others); Tue, 12 Jul 2022 09:16:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232276AbiGLNQJ (ORCPT ); Tue, 12 Jul 2022 09:16:09 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 543C5820F5; Tue, 12 Jul 2022 06:16:04 -0700 (PDT) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 7B03E2224E; Tue, 12 Jul 2022 15:16:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1657631762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5ttA7hy2efh7uguHjjZhwytdsronnsa+uPbqeqsgPMs=; b=Tf0NSwVJFA9kgNler/v6L6I6kKX6RiOhRx5fjARTAbhtUzVgqkpz6meDwoqWgBl/u8kWar hhjaMABl7wRs2i4eqfI2PYRLkHSK5in/tlGkoFVOZE9Gg7ZPNgYfezukBlZUPLCycFjHOS qGRnp5PCvn/n3p2rDBJpTWhIYi/WfmM= From: Michael Walle To: Xu Liang , Andrew Lunn , Heiner Kallweit , Russell King , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Walle Subject: [PATCH net-next 4/4] net: phy: mxl-gpy: print firmware in human readable form Date: Tue, 12 Jul 2022 15:15:54 +0200 Message-Id: <20220712131554.2737792-5-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220712131554.2737792-1-michael@walle.cc> References: <20220712131554.2737792-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now having a major and a minor number, also print the firmware in human readable form "major.minor". Still keep the 4-digit hexadecimal representation because that form is used in the firmware changelog documents. Also, drop the "release" string assuming that most common case, but make it clearer that the user is running a test version. Signed-off-by: Michael Walle --- drivers/net/phy/mxl-gpy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c index ac62b01c61ed..24bae27eedef 100644 --- a/drivers/net/phy/mxl-gpy.c +++ b/drivers/net/phy/mxl-gpy.c @@ -230,8 +230,9 @@ static int gpy_probe(struct phy_device *phydev) return ret; /* Show GPY PHY FW version in dmesg */ - phydev_info(phydev, "Firmware Version: 0x%04X (%s)\n", fw_version, - (fw_version & PHY_FWV_REL_MASK) ? "release" : "test"); + phydev_info(phydev, "Firmware Version: %d.%d (0x%04X%s)\n", + priv->fw_major, priv->fw_minor, fw_version, + fw_version & PHY_FWV_REL_MASK ? "" : " test version"); return 0; } -- 2.30.2