Message ID | 895ae9c1-b6dd-4a97-be14-6f2b73c7b2b5@siemens.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp665390vqx; Sun, 22 Oct 2023 01:57:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8WSeG9iK1QZ1bVIM2si4KeNToVBvF4WcgytrbZfl7D7DgmvxviAPkH5NQWpOb4r/v9HCR X-Received: by 2002:a05:6a21:3282:b0:174:2286:81f4 with SMTP id yt2-20020a056a21328200b00174228681f4mr5400275pzb.14.1697965026326; Sun, 22 Oct 2023 01:57:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697965026; cv=pass; d=google.com; s=arc-20160816; b=sa9Eoa3ZHJLH3JyOMMsBIeYGSQKrT9TgNYTqUrbvQ3IqJcv0J9k68aWZmQKPX4e+xM YtkRxzKGxT9fqz2Fqh2p5GUJnB1/pUeAYfiSENO3SQEOhuS1fT3yJbgL/7xu1eFtGD+J dBI2iLFv6Mhik2H8GRkvzqVKsCjvMI2DuFvkErRTxC9z3ZJHP+WlJzUvni1U4dFjY7fN xBkeoBqir++YY2FIA/bJqX36XWEkGv3PoKWzFynUZCW3/vAWxw81STJwignmb5dnA8Ix XGoRg0v4AUatEmMv1glBXa4RXBcYXJouEYv78KGy5d/0mIDAzOqCCUyL8xe2Glhm4Jus Pwyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding:cc:to :content-language:subject:from:user-agent:date:message-id :dkim-signature; bh=U0mN5A8kLa9tAVoIzDWEiZrnvpll+/l3Kr8ECEfw0GQ=; fh=IfDCyBAQ+OCqZE/5MjZ0TiIb+LM6ZvAzg9rjFsECMmU=; b=SKkHs9wU8pX1I52iQl4oBDKNgYx8tHulOlxP2wxu+EGyEzqLS4KJ4Co65qNovngJTl ZDsngTMLc3NPmuzVSihhdUDpdC6CFIN2f5RQb9EsyrL62O4NSWGNUttgX88G8aTnqD0Z fZBdsSXnFQDfD+vre3TMaTRF4/Vpf+qs3ytDuEwKf8Bq6+H1zahLP1oL9RZAm3691/DD EtfzLNUq9jJvAeKb0lUt2THDRov9LsgAFtkF1cJ0PStUnEwRy23ilBFAZowhWccbsniQ OGXcm4ZvZwCFcp1hL/K+sp1Pbc0v8KXg4BXOY7Vd/NGcOOY14dwKes8TWb8R4ba7hg98 5Plw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=EYb7t8Qh; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id n4-20020a170902e54400b001c9d66601ddsi4837842plf.162.2023.10.22.01.57.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 01:57:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=EYb7t8Qh; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CDE538077996; Sun, 22 Oct 2023 01:56:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231411AbjJVI4c (ORCPT <rfc822;lkml4gm@gmail.com> + 25 others); Sun, 22 Oct 2023 04:56:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjJVI4a (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 22 Oct 2023 04:56:30 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2045.outbound.protection.outlook.com [40.107.20.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DC8BF4; Sun, 22 Oct 2023 01:56:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=heuc4dlKagMKJIG7W46UKfA9DUaeyf7573jZWZwmc07llnTNItkPvaF9X5jckrUERyKUPctnd+kNQ46uaUzSD+NWbW+duSWEGmlc+WqyHeFBkUzs/BgLKM8fC5N/SPSpY7QmQvCPgoje+2f0FP+OqPu9fYjCAqvB5rRMI0qAPDPGctvU2WsVBsbSL2Jry9/wnrE4lolK/E2Alsd3ZeTLvIP50bnvI3yD1q5GL64xcf30SGEm4OMZZkHGkit7cA222ka4gsY4gzFS/U7DS1NYCJExlBZFbOYcYuJ6apbIs5HdUpyFUtnsRdXkJx83BD79jJcN/1YIgk7c/yrbJE+Ipw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=U0mN5A8kLa9tAVoIzDWEiZrnvpll+/l3Kr8ECEfw0GQ=; b=RLnmgU/mhB3/fwHT/o1BRrhkXL/R0aLWeq3uitNEjx7rVD7Pqc/H4nIqfe7DlOM6aExmI1u/0NryOiDEefdyI3vtZAcNfopmcCfDPsT1jHDxAaglrftJWaG7Lg9h2Cf5hUTuE5Rp/W21svAREM+izt5mEgaEnFVexM5q+vktsyhkTJvoU+Nmb8WYTxfeuxgkGmNAX9YdCNhXymXn7/hHulaSiON/739f6wNLXIFU+zR8mRlplNb0ylzDf7fZTMxIqowFv09puPgdAEbbmbLYZEfQ+82nTmQtYQn5axZZXmgPLo3fWCpZaEoiLaT7H71xdDSA/W2sSijaiWnpHB78PQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U0mN5A8kLa9tAVoIzDWEiZrnvpll+/l3Kr8ECEfw0GQ=; b=EYb7t8QhUmw8mAJtj/dvlzYzcNMNGMKYrbalIPHkgbkrCh7We4UiRZL6YUA2yvfOmcyKZK6Hirde6/hbivuCmz8U2wu3YQXX22Djgl/MAtl4aXXNu4tf9JeDNtjkkzFQCPhMCpVuqiwPbjUyT5vDnV94Tv18nfX+g8KPhaHPHRupfAzrFx4l5ldtnwIP/vaW3NxqXnoT/cc0ofmFoC+jHZadGqjhsO6U/BIMcoVB4EC6SjhCbmsn81/DBXRyIA9/zgejvW6lxRWcHDyZ2+dwQpByR1AFqHpb7sKFCDbX99RyBAlNeuqIs3AC9arj6IjxJbLbbxPjFpkX63VJdskJNg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) by AM9PR10MB4005.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:1f5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26; Sun, 22 Oct 2023 08:56:24 +0000 Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::2a90:96cb:b3f:6e5]) by AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::2a90:96cb:b3f:6e5%2]) with mapi id 15.20.6907.025; Sun, 22 Oct 2023 08:56:24 +0000 Message-ID: <895ae9c1-b6dd-4a97-be14-6f2b73c7b2b5@siemens.com> Date: Sun, 22 Oct 2023 10:56:22 +0200 User-Agent: Mozilla Thunderbird From: Jan Kiszka <jan.kiszka@siemens.com> Subject: [PATCH] net: ti: icssg-prueth: Add phys_port_name support Content-Language: en-US To: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, MD Danish Anwar <danishanwar@ti.com> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Lopes Ivo, Diogo Miguel (T CED IFD-PT)" <diogo.ivo@siemens.com>, Nishanth Menon <nm@ti.com>, "Su, Bao Cheng (RC-CN DF FA R&D)" <baocheng.su@siemens.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0106.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a8::7) To AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR10MB6181:EE_|AM9PR10MB4005:EE_ X-MS-Office365-Filtering-Correlation-Id: b6e09368-9ba2-429a-d447-08dbd2dcc4f9 X-LD-Processed: 38ae3bcd-9579-4fd4-adda-b42e1495d55a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VNCrGJaFLqpQHeoDBOGRVaAcMbmITykxAGkxf0tvvWsPf+AQgzDGN7spaDEqvzqxjOVx2R43qBiRYuGEguzTmPBow29cJ/b+VMqhDNmpXeNdNKzKyRHiDwv6Mpve5zagNG1lFcDu+Kdn6EfRS3QnGh06hcAlWN/hDGXB3REcvzUyM+0tZ0TIH0eNZPnqbhOEUx7Ph/r9x3n1zfL2bpfe64fX81CMuL4ulvxH2kes8MlLw3+e2tcYzsJuzdP4t8oodUvrLRBKnpcH6aTMyMP4BkzAhvyfm56nMlOQ19wyrHRNEqORMiE7p9Fv5wXxT74ViAwvmT1HUpR/fikKUxTwdz2AXz5svm8ROnmwQcqiGwr3IGwf2p3GMYycOtLyomvr9dW46nCNXk7y3Xm1/MbzjZMRqdnewv1hk0UkUwDVw0hwvsS43CH4IlmKQw1jssaz+ef5HTtcQuaMLoXNBMPdOSwQAZWVjQxCPR2GiZk8vDsKz15EJlWKbQ3M5wF7fzOHhDL9orlEBvWYsz86PG4U3ElIav1pegcHo24m3nfqypueENUms4LVGCt2XRGY5Jrzbqsl2AinoRPUWxGnkChcJv7mWvOMXmc8DQgT+zY/+pDeZ1ZawiCTQJuYzGqPGDsxCPnoqJA3yqdjzi5frNhAQw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(396003)(376002)(346002)(136003)(366004)(39860400002)(230922051799003)(451199024)(1800799009)(186009)(64100799003)(316002)(66556008)(54906003)(66476007)(66946007)(41300700001)(110136005)(4326008)(2616005)(31696002)(8936002)(82960400001)(2906002)(6486002)(44832011)(107886003)(31686004)(86362001)(5660300002)(6506007)(8676002)(478600001)(36756003)(26005)(6512007)(38100700002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Ant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dAUFpQURu/lZPm?= =?utf-8?q?zCUuaYy1EqKqcUnl3Lr1AvUnrHyQddSOhPQ4mmn56/dOx9eh/BV+YMP9+t910umLt?= =?utf-8?q?Y22lPT137fy/P5ztHMWwntVxbzrfv3ww31nf3ILb33RhoIJc70y9g4J1/q0JB+SAy?= =?utf-8?q?lstzVUwyoU2iMr6uxDbj+4sclAvmkFZrNYSJTz8OoAhsumUuvHR6agj8+OwFL0wlJ?= =?utf-8?q?7i2adPujjJ6winhy0fcW8MGO+0ymhTMdJHK/tHmc/Rq+MG0QEaEt1+bPiCTGOsECb?= =?utf-8?q?LhNu3rdyT91bYh9UQpWJMHgI/WVSiZDovm8Qhec8RWThhqItQCSR8rozP50UsZW26?= =?utf-8?q?Lb/XGQ+2N/p73CTD+QawBDbLdjPDHg4kBVWHILekxnHt8jytx7/3e0wvkHU2l+Y/E?= =?utf-8?q?LzPnhLKy5+lIbkuzSdipPqAGjFI8vE/HTJeU/YRk/ldUsOi4L6JMmcJUemXbfP48A?= =?utf-8?q?DarPZSriYGUD78lZK5HRTlFuiwjTX2z8FzaUZAeDr5JLdnEdePCJzkG9B7rXqoFX5?= =?utf-8?q?wKmPwJ41O332+pJFPvFZ+0VV9H/Y2pJlB8FJ4zhjelWMxsr+QGiKgBVDHAn5Mxq9e?= =?utf-8?q?5uS2zdwTGGHFqq1EVQGRswDiJVDe74iy/dmt6ImZEC2NgMFA3jUUNZMn6NHftxScT?= =?utf-8?q?3xkF9L2RrKDn98V31z8MWpDWupXKX95ftvs9vQ8JyJxM3Z7+F6PXNS789PIuPDt4b?= =?utf-8?q?BSOHq4QHiJct?= X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6e09368-9ba2-429a-d447-08dbd2dcc4f9 X-MS-Exchange-CrossTenant-AuthSource: AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2023 08:56:24.3521 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: i+8JdtuHq4bGIG9unJKcJuoTFT1j6pkxdSUaYnKf0rSzDVyMWNBTPsIzMv1aKMmp192ZpvNP1iyDi3MzEKjaDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR10MB4005 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 22 Oct 2023 01:56:34 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780445375771969278 X-GMAIL-MSGID: 1780445375771969278 |
Series |
net: ti: icssg-prueth: Add phys_port_name support
|
|
Commit Message
Jan Kiszka
Oct. 22, 2023, 8:56 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com> Helps identifying the ports in udev rules e.g. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> --- Seems such logic was lost during the upstream rewrite of the SDK version. drivers/net/ethernet/ti/icssg/icssg_prueth.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Comments
On 10/22/2023 1:56 AM, Jan Kiszka wrote: > From: Jan Kiszka <jan.kiszka@siemens.com> > > Helps identifying the ports in udev rules e.g. > > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> > --- > > Seems such logic was lost during the upstream rewrite of the SDK > version. > Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Hello: This patch was applied to netdev/net-next.git (main) by Paolo Abeni <pabeni@redhat.com>: On Sun, 22 Oct 2023 10:56:22 +0200 you wrote: > From: Jan Kiszka <jan.kiszka@siemens.com> > > Helps identifying the ports in udev rules e.g. > > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> > --- > > [...] Here is the summary with links: - net: ti: icssg-prueth: Add phys_port_name support https://git.kernel.org/netdev/net-next/c/f6e12277011d You are awesome, thank you!
diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c index 4914d0ef58e9..ffae89a6ccc5 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c @@ -1653,6 +1653,19 @@ static void emac_ndo_get_stats64(struct net_device *ndev, stats->tx_dropped = ndev->stats.tx_dropped; } +static int emac_ndo_get_phys_port_name(struct net_device *ndev, char *name, + size_t len) +{ + struct prueth_emac *emac = netdev_priv(ndev); + int ret; + + ret = snprintf(name, len, "p%d", emac->port_id); + if (ret >= len) + return -EINVAL; + + return 0; +} + static const struct net_device_ops emac_netdev_ops = { .ndo_open = emac_ndo_open, .ndo_stop = emac_ndo_stop, @@ -1663,6 +1676,7 @@ static const struct net_device_ops emac_netdev_ops = { .ndo_set_rx_mode = emac_ndo_set_rx_mode, .ndo_eth_ioctl = emac_ndo_ioctl, .ndo_get_stats64 = emac_ndo_get_stats64, + .ndo_get_phys_port_name = emac_ndo_get_phys_port_name, }; /* get emac_port corresponding to eth_node name */