Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8065141rwp; Wed, 19 Jul 2023 04:56:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlFjg2UpFAhCywweMNiA+cC4Fmrq7mGW0haGVaU8FbHaaXXzicIaUvEj0zgYVWVd7sQBOsoA X-Received: by 2002:a05:6358:6f97:b0:133:a8e:6feb with SMTP id s23-20020a0563586f9700b001330a8e6febmr2313050rwn.12.1689767761862; Wed, 19 Jul 2023 04:56:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689767761; cv=none; d=google.com; s=arc-20160816; b=BA8VHVlI/prjR9JzAzrR8pFGz67EuhPOOzlc/kboIO+jXfo/xzUQVHIvPjszASl2sV 5aF4snbqKxnjASkJT2NF239qxiCssc+vSZLG3FwsEF1Uj2qXsdMMz/NnMI54Rkf2HGab vWPDAkDKdW7AO2ridLwuHDBgB93qKsfrF1c+Oz88zD+3Ye3T1Zc1qtTPn90epxOt6YtY dqsCeWPWSJlat/tcF/YDcEqHgaI7uhddk4dMESu/AKrXpzFFhKfdTyzkGcIeQq151PZT 2ijkxtoB1TWgDZtbA/9cuz23r7hix9mNrYQ4efUccl4Kdq175BNr7ojP0cP0JgoKpziZ EJTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/M88rLpp34nq2o9s2pwXP0lZOMqBKJveL8M0DFQmUtE=; fh=4YE9O4H0mfXclpK5MYl8zbBa9bM4fHYf2Yy8xMlyMm8=; b=DYIIdLvmAZtPYF8cujrX4wQN6CAc1uzDcfB1rQu9NQvLCkefGVOkt4PxxZQ7D/ZyZP 9+q/aoQYK5460POsaec19+CzPMDoEEQtKRTzWpKmsyy6EO6zVKtoBrDkUrzDkpyP7I8l ZGIOPckHodmsbLuMFtHO+crPE0ojwz4SiUhw2l9e3WzZ7v4vlLUKJbxqCOyUkcwiFO1L tZrmo23PLXpOD4X6dM2qes88MbXMH7upzWKv/OPECAYHGtEM0ypkKsCm2QVTr4/GqbFL zD6b3c9pr73t7Yj8OHkbt0FSbX2MzuYKZI+H3xkkO5kl9HwaZGzkGGNUa1RGPk50OnlY rdAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=BOyjgkD7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s24-20020a632158000000b0055acfb661casi2724277pgm.894.2023.07.19.04.55.48; Wed, 19 Jul 2023 04:56:01 -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=@gmail.com header.s=20221208 header.b=BOyjgkD7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229750AbjGSL3L (ORCPT + 99 others); Wed, 19 Jul 2023 07:29:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbjGSL3K (ORCPT ); Wed, 19 Jul 2023 07:29:10 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA05E10D4; Wed, 19 Jul 2023 04:29:08 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5217ad95029so5997781a12.2; Wed, 19 Jul 2023 04:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689766147; x=1692358147; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/M88rLpp34nq2o9s2pwXP0lZOMqBKJveL8M0DFQmUtE=; b=BOyjgkD7ks0MDq7nMMrIo/DiK+rG9bOsCjoqM+AspZCFHxaNyt029ngf3rkrmqEvgg P9I+pXVnaYt+xy6cj9ixuZoFniddc01mUtFudfYzc/HxmLU802b1PkJZFJ/uBg4Jh6Ec DGkO0ypCVDUn60d84PEaKptnR+tJl1syipNx17ivXNCbzNpzlDn8gvJcLIg6zkW5VTMf K08pqhk1WRdUDnYWBy3zyjhjjSXtfQ83TgYFsn9fBKlQYllgi1ISshe+LiHztIOzHCke CZJJ20tC2afEcqFVMnzVaiMsbvjzOVtlH+jznEKlujRAULu8KfBHcOR/dtlOcIXgVi7K 87aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689766147; x=1692358147; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/M88rLpp34nq2o9s2pwXP0lZOMqBKJveL8M0DFQmUtE=; b=eLdXa040M9Bg9aPBjP0Ie/rgTdiztys5JLnq+AkPWHXuj8MeMYBMZGIRuQFg0rxkiO SEzcrVybmiyv6JF/RH1bKLFSXL4wTSNxCip5soKao4AejqDlpWSCLfya+5DtluCmO4p7 OwqfJMZL+SW8rCC/02CpXjJahPzsxY7wI7OvYu1dnRorVcYa2eiPFPFSgo0n9Aq3YYCN wia4VBCmtq6W3n3DvlTuAx4M4755ivRinmJN3FS+Yznt4iC4n0rEX70kTaLNJ9K0idsa OGdSGmUYXF4ZVm9z2PNGl2s82dFC3vZwlyUQQnmn1ZZcYmssYQVJjRz0hdzqjeOFjZQx tp3g== X-Gm-Message-State: ABy/qLavqhE8XNRDfbdPmmRuGmZw+LqWqdon9GtX7mbex9BaKgWevOdF gYWc2yygnDvcXfP3pKJ9DtJae/Rl0eOSKPZoTTM= X-Received: by 2002:a17:906:73d0:b0:993:eddd:6df9 with SMTP id n16-20020a17090673d000b00993eddd6df9mr2206285ejl.2.1689766146966; Wed, 19 Jul 2023 04:29:06 -0700 (PDT) MIME-Version: 1.0 References: <1689660928-12092-1-git-send-email-quic_vpernami@quicinc.com> <20230718124334.GG4771@thinkpad> <350d577a-f0b3-1f20-9c35-356355a9aa8e@quicinc.com> In-Reply-To: <350d577a-f0b3-1f20-9c35-356355a9aa8e@quicinc.com> From: Daniele Palmas Date: Wed, 19 Jul 2023 13:17:10 +0200 Message-ID: Subject: Re: [PATCH V2] net: mhi : Add support to enable ethernet interface To: Vivek Pernamitta Cc: Manivannan Sadhasivam , mhi@lists.linux.dev, mrana@quicinc.com, quic_qianyu@quicinc.com, quic_vbadigan@quicinc.com, quic_krichai@quicinc.com, quic_skananth@quicinc.com, linux-arm-msm@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "open list:NETWORKING DRIVERS" , open list Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,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 Hello Vivek, Il giorno mer 19 lug 2023 alle ore 12:39 Vivek Pernamitta ha scritto: > > > Currently MHI NET driver does not support Ethernet interface, > > we are adding Ethernet interface support to MHI NET driver, so new > client can be configured to be Ethernet type over MHI by setting > "mhi_device_info.ethernet_if = true" > how can this be set to "true"? Is this something that can be changed dynamically at runtime (but I can't see how currently) or is it "static" ? In the latter case, not sure if the maintainer agrees, but maybe a new binding (e.g. something like ETH_SW0) should be used ? Thanks, Daniele > currently we are not changing mhi_swip0/mhi_hwip0 to Ethernet. we are > adding an provision to configure mhi client as Ethernet type. > > > On 7/18/2023 6:13 PM, Manivannan Sadhasivam wrote: > > On Tue, Jul 18, 2023 at 11:45:28AM +0530, Vivek Pernamitta wrote: > >> Add support to enable ethernet interface for MHI SWIP channels. > >> > > Please add more info in the commit message i.e., why this interface is added and > > how it is going to benefit the users etc.. > > > > Since you are modifying the existing mhi_swip interface, this isn't an ABI > > change? > > > >> Signed-off-by: Vivek Pernamitta > >> Reviewed-by: Daniele Palmas > >> Reviewed-by: Simon Horman > >> --- > >> > >> changes since v1: > >> - Moved to net-next from linux-next > >> - moved to eth_hw_addr_random() to assign Ethernet MAC address > >> from eth_random_addr() > >> --- > >> drivers/net/mhi_net.c | 53 ++++++++++++++++++++++++++++++++++++++------------- > >> 1 file changed, 40 insertions(+), 13 deletions(-) > >> > >> diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c > >> index 3d322ac..5bb8d99 100644 > >> --- a/drivers/net/mhi_net.c > >> +++ b/drivers/net/mhi_net.c > > [...] > > > >> @@ -380,10 +405,12 @@ static void mhi_net_remove(struct mhi_device *mhi_dev) > >> > >> static const struct mhi_device_info mhi_hwip0 = { > >> .netname = "mhi_hwip%d", > >> + .ethernet_if = false, > >> }; > >> > >> static const struct mhi_device_info mhi_swip0 = { > >> .netname = "mhi_swip%d", > >> + .ethernet_if = false, > > false? > yes ,it is false as by default mhi_swip/mhi_hwip interface will be > normal net device. > > > > - Mani > > > >> }; > >> > >> static const struct mhi_device_id mhi_net_id_table[] = { > >> -- > >> 2.7.4 > >> >