From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 873FFC46467 for ; Sun, 27 Nov 2022 08:16:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229569AbiK0IQy (ORCPT ); Sun, 27 Nov 2022 03:16:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229575AbiK0IQo (ORCPT ); Sun, 27 Nov 2022 03:16:44 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D7C910063; Sun, 27 Nov 2022 00:16:38 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id mv18so6905458pjb.0; Sun, 27 Nov 2022 00:16:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=O3+WXaZIvwYScbYyJSTwVsoviigX0ePJBx5g3Z25JEw=; b=SzYATP/WvbrMPMeCmP13X7/vxMj9pdZXQOcaUDB61TKbTZD2j/3L/fcK89A5FdCNDB beyDVDaBw/Orpqr9oVtEOHrXHffe1lMYorIUUfNX5wisADjYBwBjvKLDRWltJ3iM7hGt j6Ur3plBe2qiKKzLGyyDNF+6c69LNJtw7woa6EkXwcKvuIrhq7Y4ppByK3LgaRHtOElv bhvswFat/v3oISyh03365opnwQRRkaFlOyEuoXaVpXik0GGSz4BDtvTVsiq4VpaIJhnp lwY7CoBZ/q3hW/AwPaE6a+gzbEea+cRSlAljPpT4rOCTjblu21Mg12GI2G+XlzIforVh Ya3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=O3+WXaZIvwYScbYyJSTwVsoviigX0ePJBx5g3Z25JEw=; b=JaQRNdoRDHX9YVF/fr2WYwtOFYjttsd8viXfZu3lbI5V1FEE0gOfL/mTWgfm4Dy788 GRwDsgJPkEbuN/H4/TZfSft+6OVmtt4NtgqwgeSvoMzCTPxmzXMo33bmmNiakHw48gGR v9VHyZeO4nVF1XoQ+w2V+x/svSjERK6XOtjfKwozTZEgOv59CcfpnZJMf4ZTCHD4Qsc2 K2rWaDZAQDMJXFaLi0vfXyEjcQl+1Y/hbSuUon5PVCLXvnygfIz2KrviC5B4fhmNGyLG o9LRSm5H6jr9kvQ6ENR2V6vDhMwsPjvl0akn/avcKoF1TzNRYS4g41e37RFxhV4jm4Uh Vj0w== X-Gm-Message-State: ANoB5pltArZasdi7IVBgooZOXU/oiRedPso7B0P8osUWhDQACAlXNcIf bBV6zsJSwPxXpCrompALhL8= X-Google-Smtp-Source: AA0mqf72PtiKgQCQ5U/TWFIjiYeil/wnUg9CH++1HBOr4Nodobp5EzgkVDru4n4Du1IhGRoQuwhBwQ== X-Received: by 2002:a17:902:a601:b0:189:8001:b54f with SMTP id u1-20020a170902a60100b001898001b54fmr3122555plq.37.1669536998039; Sun, 27 Nov 2022 00:16:38 -0800 (PST) Received: from localhost.localdomain (124x33x176x97.ap124.ftth.ucom.ne.jp. [124.33.176.97]) by smtp.gmail.com with ESMTPSA id a3-20020aa794a3000000b00572c12a1e91sm5799915pfl.48.2022.11.27.00.16.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Nov 2022 00:16:37 -0800 (PST) Sender: Vincent Mailhol From: Vincent Mailhol To: Jiri Pirko , netdev@vger.kernel.org, Jakub Kicinski Cc: "David S . Miller" , Eric Dumazet , Paolo Abeni , linux-kernel@vger.kernel.org, Boris Brezillon , Arnaud Ebalard , Srujana Challa , Kurt Kanzenbach , Andrew Lunn , Florian Fainelli , Vladimir Oltean , Michael Chan , Ioana Ciornei , Dimitris Michailidis , Yisen Zhuang , Salil Mehta , Jesse Brandeburg , Tony Nguyen , Sunil Goutham , Linu Cherian , Geetha sowjanya , Jerin Jacob , hariprasad , Subbaraya Sundeep , Taras Chornyi , Saeed Mahameed , Leon Romanovsky , Ido Schimmel , Petr Machata , Simon Horman , Shannon Nelson , drivers@pensando.io, Ariel Elior , Manish Chopra , Jonathan Lemon , Vadim Fedorenko , Richard Cochran , Vadim Pasternak , Shalom Toledo , linux-crypto@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-rdma@vger.kernel.org, oss-drivers@corigine.com, Vincent Mailhol , Ido Schimmel Subject: [PATCH net-next v2 1/5] mlxsw: minimal: fix mlxsw_m_module_get_drvinfo() to correctly report driver name Date: Sun, 27 Nov 2022 17:16:00 +0900 Message-Id: <20221127081604.5242-2-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221127081604.5242-1-mailhol.vincent@wanadoo.fr> References: <20221122154934.13937-1-mailhol.vincent@wanadoo.fr> <20221127081604.5242-1-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Currently, mlxsw_m_module_get_drvinfo() reports the device_kind. The device_kind is not necessarily the same as the device_name. For example, the mlxsw_i2c implementation sets up the device_kind as ic2_client::name in [1] which indicates the type of the device (e.g. chip name), not the actual driver name. Fix it so that it correctly reports the driver name. [1] https://elixir.bootlin.com/linux/v6.1-rc1/source/drivers/net/ethernet/mellanox/mlxsw/i2c.c#L714 Fixes: 9bbd7efbc055 ("mlxsw: i2c: Extend initialization with querying firmware info") CC: Shalom Toledo CC: Ido Schimmel CC: Vadim Pasternak Signed-off-by: Vincent Mailhol --- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/minimal.c b/drivers/net/ethernet/mellanox/mlxsw/minimal.c index 6b56eadd736e..9b37ddbe0cba 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/minimal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/minimal.c @@ -92,7 +92,7 @@ static void mlxsw_m_module_get_drvinfo(struct net_device *dev, struct mlxsw_m_port *mlxsw_m_port = netdev_priv(dev); struct mlxsw_m *mlxsw_m = mlxsw_m_port->mlxsw_m; - strscpy(drvinfo->driver, mlxsw_m->bus_info->device_kind, + strscpy(drvinfo->driver, dev_driver_string(dev->dev.parent), sizeof(drvinfo->driver)); snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version), "%d.%d.%d", -- 2.37.4 From mboxrd@z Thu Jan 1 00:00:00 1970 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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 0B916C4332F for ; Mon, 28 Nov 2022 16:32:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id AA65860B69; Mon, 28 Nov 2022 16:32:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org AA65860B69 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1669653128; bh=9siVnbbobq5oMQF5rMqVsUcHBe9xwp8nXT/PFOM/zsQ=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=GWAnTol6k/Xz+dlwxzoC/5fmiOW6iLoryGwJFiGbzEWxxzj2vvd5FZA9lxsV1gJXh gaT3G1LJzfa+pC6Fk9rRzxoG6V/h9hyy2txzOZxKOjCBwVXKjDva2g0znhS7KYeSU5 0qfKNTZ+oPCteqRz+aOkYp+o1X7Axiku9TC4Ts3lN3leWgCBPoBhDQrVQGXRpobbJJ VBhbPds4KH8fHYD+kvym/lswF8EZzNeHKMJwvIAuVOckREqBPn846d1tTLXoWBTRnG jDUdHNNvarlh9YaoTiEYrBKCvv8gPSLJgt7A8RNT1CYwXkwj+L0NerBBaS23sh3cLS llzUsGKQGBa5A== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rp4TqLQvbTHF; Mon, 28 Nov 2022 16:32:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 5385260BFC; Mon, 28 Nov 2022 16:32:07 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 5385260BFC Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id AA35D1BF470 for ; Sun, 27 Nov 2022 08:16:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 8200140292 for ; Sun, 27 Nov 2022 08:16:39 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 8200140292 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l08RKwnXe7H5 for ; Sun, 27 Nov 2022 08:16:38 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org AF98B400D2 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by smtp2.osuosl.org (Postfix) with ESMTPS id AF98B400D2 for ; Sun, 27 Nov 2022 08:16:38 +0000 (UTC) Received: by mail-pl1-x635.google.com with SMTP id p12so7506190plq.4 for ; Sun, 27 Nov 2022 00:16:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=O3+WXaZIvwYScbYyJSTwVsoviigX0ePJBx5g3Z25JEw=; b=GrfDwZahdQPAujmJJ1Y5RAY7mNoWCs6PRMIMfD+mdCyWYcslkVhpyUKwxnpckYC0O9 M/UiLkBHJIMbjhs8hcvuHcJq2dGaEdjlPLjPnxsYuLU+4wrYq3ZZXZGbFogFpNYLDCTc +QjZCt1k5DIgqpEJ4qD5qEuvF7j4iCA9BG/jRvplL0iNFpm83YGDQGB12b9ujoaPZ06a zIJEAyFYaK9ye+J0HRPngOmssdFbtHOirpWoVjfnKUEWos2Xl39PIF6+JW1ax7WGQpmZ Bojnmrw26OcrI5SsJi5PftR/uj11nph6ADRxmCUVTA+5aSgAlvWWblF1mV231NU/vsym E8iw== X-Gm-Message-State: ANoB5pm5DVMDS4HPYFO/kMqd5UvnkAQtWdW0HtKpMZLtNjJT6/4xEanv MqMq3+LRskuoCS3CO8XpkAk= X-Google-Smtp-Source: AA0mqf72PtiKgQCQ5U/TWFIjiYeil/wnUg9CH++1HBOr4Nodobp5EzgkVDru4n4Du1IhGRoQuwhBwQ== X-Received: by 2002:a17:902:a601:b0:189:8001:b54f with SMTP id u1-20020a170902a60100b001898001b54fmr3122555plq.37.1669536998039; Sun, 27 Nov 2022 00:16:38 -0800 (PST) Received: from localhost.localdomain (124x33x176x97.ap124.ftth.ucom.ne.jp. [124.33.176.97]) by smtp.gmail.com with ESMTPSA id a3-20020aa794a3000000b00572c12a1e91sm5799915pfl.48.2022.11.27.00.16.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Nov 2022 00:16:37 -0800 (PST) From: Vincent Mailhol To: Jiri Pirko , netdev@vger.kernel.org, Jakub Kicinski Date: Sun, 27 Nov 2022 17:16:00 +0900 Message-Id: <20221127081604.5242-2-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221127081604.5242-1-mailhol.vincent@wanadoo.fr> References: <20221122154934.13937-1-mailhol.vincent@wanadoo.fr> <20221127081604.5242-1-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 28 Nov 2022 16:31:50 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=O3+WXaZIvwYScbYyJSTwVsoviigX0ePJBx5g3Z25JEw=; b=SzYATP/WvbrMPMeCmP13X7/vxMj9pdZXQOcaUDB61TKbTZD2j/3L/fcK89A5FdCNDB beyDVDaBw/Orpqr9oVtEOHrXHffe1lMYorIUUfNX5wisADjYBwBjvKLDRWltJ3iM7hGt j6Ur3plBe2qiKKzLGyyDNF+6c69LNJtw7woa6EkXwcKvuIrhq7Y4ppByK3LgaRHtOElv bhvswFat/v3oISyh03365opnwQRRkaFlOyEuoXaVpXik0GGSz4BDtvTVsiq4VpaIJhnp lwY7CoBZ/q3hW/AwPaE6a+gzbEea+cRSlAljPpT4rOCTjblu21Mg12GI2G+XlzIforVh Ya3g== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=SzYATP/W Subject: [Intel-wired-lan] [PATCH net-next v2 1/5] mlxsw: minimal: fix mlxsw_m_module_get_drvinfo() to correctly report driver name X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Simon Horman , Kurt Kanzenbach , Eric Dumazet , Jerin Jacob , Subbaraya Sundeep , Ioana Ciornei , drivers@pensando.io, Linu Cherian , Florian Fainelli , Leon Romanovsky , linux-rdma@vger.kernel.org, Shalom Toledo , Srujana Challa , Shannon Nelson , intel-wired-lan@lists.osuosl.org, Vadim Fedorenko , Paolo Abeni , Yisen Zhuang , Sunil Goutham , Ariel Elior , Ido Schimmel , Richard Cochran , Arnaud Ebalard , Ido Schimmel , Michael Chan , Vincent Mailhol , Petr Machata , Salil Mehta , Dimitris Michailidis , Manish Chopra , Boris Brezillon , oss-drivers@corigine.com, Vadim Pasternak , linux-kernel@vger.kernel.org, "David S . Miller" , Taras Chornyi , hariprasad , linux-crypto@vger.kernel.org, Jonathan Lemon , Vladimir Oltean , Saeed Mahameed , Geetha sowjanya Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Currently, mlxsw_m_module_get_drvinfo() reports the device_kind. The device_kind is not necessarily the same as the device_name. For example, the mlxsw_i2c implementation sets up the device_kind as ic2_client::name in [1] which indicates the type of the device (e.g. chip name), not the actual driver name. Fix it so that it correctly reports the driver name. [1] https://elixir.bootlin.com/linux/v6.1-rc1/source/drivers/net/ethernet/mellanox/mlxsw/i2c.c#L714 Fixes: 9bbd7efbc055 ("mlxsw: i2c: Extend initialization with querying firmware info") CC: Shalom Toledo CC: Ido Schimmel CC: Vadim Pasternak Signed-off-by: Vincent Mailhol --- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/minimal.c b/drivers/net/ethernet/mellanox/mlxsw/minimal.c index 6b56eadd736e..9b37ddbe0cba 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/minimal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/minimal.c @@ -92,7 +92,7 @@ static void mlxsw_m_module_get_drvinfo(struct net_device *dev, struct mlxsw_m_port *mlxsw_m_port = netdev_priv(dev); struct mlxsw_m *mlxsw_m = mlxsw_m_port->mlxsw_m; - strscpy(drvinfo->driver, mlxsw_m->bus_info->device_kind, + strscpy(drvinfo->driver, dev_driver_string(dev->dev.parent), sizeof(drvinfo->driver)); snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version), "%d.%d.%d", -- 2.37.4 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan