Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11033195rwd; Thu, 22 Jun 2023 07:59:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7YJIp1Y8d+FcKIIXpv3c3/0qergi4FBFOC7/xyfMxM1U5jMHAkzznIYMYkkGJXDsCVPtdp X-Received: by 2002:a17:902:da92:b0:1b4:ff2a:24e3 with SMTP id j18-20020a170902da9200b001b4ff2a24e3mr13003514plx.45.1687445961867; Thu, 22 Jun 2023 07:59:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687445961; cv=pass; d=google.com; s=arc-20160816; b=m/kvpJhkpruYVEhIfA2EauNW4syM7fgnjfClzrhGcyH0GF+ENPiod3NgNBXzcTtrEf CM4E041k34zVPeqwUghxGq04eBsh3PZ5C3tuLdqQZzxoJNT3Un2hmA/JdQNgP6tIGPQB TuLxc/qugeM/anZcD8US6U8Va+GyBuxBZWoPhGEQMqTdzAWxpIVYOv/SXCr11wgRMf8W LMxlNC18Iu1RvryVnj+hfWzdYwthwoUGUUKIHHN7huhQwCBaVGTH+5DsXzzD4vXOD5+k hfxeu0sJgzHAwoxlxBTL9+h9EMzyMWbA9KkN9Nbd8924hgM76tONJJT+oeLvw/PQBCKU uYEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EJeY5ibdnpRmsomQfUYESaWdssHf40rWMh1d6/AIkI4=; b=UbG5RMWZB4144yz+4F8D5HVkoGwjWEtnfXNQKdgy6LjhDi6jElruu47yFlsa2jCS56 vwvWYLlGzjw+y3ZtH49mO0NcgQ/24SL7BrusnzvBNFZKQTpdQoxmvjxUvkGHNCzrks6O aWr8bftSbBPpnK8ybVwCzMUv6zZHCQAtDPolnY4UPN1VOsizhP0V8JgMmPoEm4ddUgAG DFBPRrHB+dloNpasTpzbREd5ec+Dp/N/TpUFmA1z1qckeqSBZtidUkTvNCg5cO+4dQpK zV9rap62FXUeSh0pd4sDcYNyc4AyrS2YdKhssecm+zxzjkncmnROv03Ua5GeaI/rePnZ ZK3A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b="Hr/geyTC"; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t2-20020a17090340c200b001aae905065csi6514039pld.284.2023.06.22.07.59.09; Thu, 22 Jun 2023 07:59:21 -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=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b="Hr/geyTC"; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230348AbjFVOpS (ORCPT + 99 others); Thu, 22 Jun 2023 10:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232068AbjFVOox (ORCPT ); Thu, 22 Jun 2023 10:44:53 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on20715.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe59::715]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8A882699; Thu, 22 Jun 2023 07:44:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AllV9syy3hYMKddyLt1XSZOGP9LvGOvMUOG93fuOXT/f0VYExiq1FcYvoLoM8p+xcozUSuFTMyJMfqhk/4Qm4hDf25XZK2GuxVBFaR+y7cChjvb9P2EtXreBSPwCkJNTxwFekfUStnGd6oJUWTJndVip8jeJYbd0/8xdHaFJoNbNru+Iiyg4GsgKfA3UMPSjXgx+H3vB1PYPq1l51G9w3wgtXt4OfdORmCJdFEmYFx0THJmwh2d+C03yZ7vdMWF3m0BGMyqUUFkxJpvQn1lIu54ArRGFDThs+/QaweSwHNaOmbchbmiYOXFUuXmJOn6YhYpr3qurTgTEGqPnn+erxw== 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=EJeY5ibdnpRmsomQfUYESaWdssHf40rWMh1d6/AIkI4=; b=EP2zApA/dwk4iLBj9bkjOMWOFGW5dcquvmMXkdBhls+77oX9/hLKJTstOzAqDaq40xvOWZhy5XrL6qC9PnV7cljcZmoH1f/tgSbPrvf727benzdl4AhR9d01p9/9QB1OaIQDfiFtKXyJ1afKrwgxDUgbc7ddZX/JLLNgeX4YzRX84nF4r1E9wcp+44s9GfesZSx4VrbD5hV5FDK0KmE8FqjFYUs7sy79f9qP0ZXzZaUCxSfvmMDODV18JmFI+XepIaFL6hUD4XrYKwaYWDhYul2oh/tZDL8cdu4MSzajsAiOHzPuu424QCiDaaCD7NYZzW3ax7g7mLdsR7MbRFlyPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EJeY5ibdnpRmsomQfUYESaWdssHf40rWMh1d6/AIkI4=; b=Hr/geyTCHIhxiolm98HQn67kihwb8TMzNZufAandRw99mqXu7MCaq82/0Rpplp+hsoce7Yjda0Ay3UtH3YtcbTasnQpXPalXy4wyd4wqaTvAw8omOO5NDxqSAMVfkIuJmQmjzSTLvxvS2iZKRTURwKZLakatBMiGZE/dAOVFf0g= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by CH2PR13MB4474.namprd13.prod.outlook.com (2603:10b6:610:6d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Thu, 22 Jun 2023 14:44:01 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e%5]) with mapi id 15.20.6521.023; Thu, 22 Jun 2023 14:44:01 +0000 Date: Thu, 22 Jun 2023 16:43:51 +0200 From: Simon Horman To: Choong Yong Liang Cc: Rajneesh Bhardwaj , David E Box , Hans de Goede , Mark Gross , Jose Abreu , Andrew Lunn , Heiner Kallweit , Russell King , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Marek =?utf-8?B?QmVow7pu?= , Jean Delvare , Guenter Roeck , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Richard Cochran , Philipp Zabel , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Wong Vee Khee , Jon Hunter , Jesse Brandeburg , Revanth Kumar Uppala , Shenwei Wang , Andrey Konovalov , Jochen Henneberg , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org, bpf@vger.kernel.org, Voon Wei Feng , Tan@web.codeaurora.org, Tee Min , Michael Sit Wei Hong , Lai Peter Jun Ann Subject: Re: [PATCH net-next 3/6] net: phy: update in-band AN mode when changing interface by PHY driver Message-ID: References: <20230622041905.629430-1-yong.liang.choong@linux.intel.com> <20230622041905.629430-4-yong.liang.choong@linux.intel.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230622041905.629430-4-yong.liang.choong@linux.intel.com> X-ClientProxiedBy: AS4PR09CA0029.eurprd09.prod.outlook.com (2603:10a6:20b:5d4::18) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|CH2PR13MB4474:EE_ X-MS-Office365-Filtering-Correlation-Id: 11d523a9-53de-4e0f-ce20-08db732f1e59 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hk2/iYTQFVOXF8s5A1lsWFrtLIlh4SuyeouK5Z/kgUjyxZxIjAKZDexVLLIf6zwdDqbJkj8A2/LA82UZnRlqxzp1AsoVZZDuvmec1Ui5NHvmVN/Tn+1R0m8c5TwXmXEE+OmNlgekVRtzMfB4vgzWjVfdPXncjhThvZ47stGYI+qhvTKv1tdmiwQeyr0Tn0qobF0x8FBgBubFePhgS/A8CfV94VrQuXOZu0LUwUUUhtPGxV2PECN5QjtKnd712KhDVkA2FOJfmrVhPJ6cQgIbt/RugpQSmz6yyFc64hgR2+d2q560jF7GDHlmjRGSby5iPj/aWeI4B0HzhJIh479/leLp2Jwy5dUBdogzmo5PZL9OXDl1a1Qyzeukxu+nJja8WVPXv+kJai6Izy7ELsx8ukdxzTRDzPUyLwCxQi3Gq8CHbI0GjzVL91NX1Bu8qcv7FvtDmPfKFhMEew97SAZuOnqr6yh8U3TA9F2VnjFr/wYj1ypQ3Go6YAVdcxKnfGWNbMzl6K/Op9q6ztVec5rXjfXan+4uhcXA7JASt8nUQ2wy/vZWm3m+TNlFwzSbtxyILQBruTvBxr6aokqkMTl/VCpdpPCR7nCbLadE0foEZuY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(39830400003)(396003)(366004)(136003)(346002)(451199021)(7416002)(44832011)(7406005)(5660300002)(8936002)(36756003)(8676002)(38100700002)(15650500001)(2906002)(478600001)(6666004)(6486002)(186003)(54906003)(86362001)(2616005)(6512007)(6506007)(6916009)(4326008)(66946007)(66476007)(66556008)(41300700001)(316002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9dMpTHa43my7AJEr/qWdSpgNX8ZdFXhOAGifq7k+vhXt+gIfwnxCjzF2kBKF?= =?us-ascii?Q?1GX6Qd2vH2JvQSpRjxMVkSV41zEtw4vgVgpAgnZTSJFS0P5U78x5jNn20AQa?= =?us-ascii?Q?c/Uk7dCfzqGj47sexnXHJxCxacL456anYEPfjw6qMAhQEKFpq/7g/CIdOEUl?= =?us-ascii?Q?47Nd8K2fkjUuqCuwMG7otznPX1qnWLrKY9JVDMnJrpUDX9pPWRixbMcr4HJ5?= =?us-ascii?Q?Bl9HPP+u2Dv4qbwqmwrziqRubdNPtRQ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-ascii?Q?5g/95KQaCSnA/jqa1hE/eHcvewez1+a8ivWBWqGe+hIsFo1gR2F3Yj8SrWpD?= =?us-ascii?Q?DdBizqknnXeW1wvYLUye2mB1UPcjAiFAKqDAT3DNrbfzTLVn7l2ukl5cTvKb?= =?us-ascii?Q?8hmhrmJhu2aYKUzOJBz1ULIMFHocavF76ynQfIZD+7NZdUz0iVy3TcL0aCF8?= =?us-ascii?Q?REo2p0aFBpL+DhiTRyNg/HJHLyCSfNad2E19j6OPD0SPiCPlgu99ag2lXBof?= =?us-ascii?Q?4bhS4FONXJIp6h0hMYEUMhR+m1WGgwQ3gRHmg4LYu4tnQC5qwRBLzh8yabM2?= =?us-ascii?Q?IYAeo512VWPyuerj+lgFPs+Sv1gqlgzu3hMTgG1o0oHDApPXqUvxtFyOvM63?= =?us-ascii?Q?6S6Pnwxv4nZNjCD24Z4HijitXJnsSLZuvJaXOKxTI8F2titb6KBeZ3UyNJxa?= =?us-ascii?Q?aPOCR5YMpt7nLCJXUtcd62z5WfcPncaTf4a/rdHQ1jsoRuGBRvZMzyfd4yBP?= =?us-ascii?Q?ej7TqQu0m7es2zfV2XyfjtQhYNJ0A0s6u6hsn70dpcLEB0M33p0rBhY5bsoQ?= =?us-ascii?Q?G6hp9w=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 11d523a9-53de-4e0f-ce20-08db732f1e59 X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2023 14:44:01.3988 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: f+wLiHjfjojaYeZJtx8vcX3IbehvfGVePKRAYJ+8vUhjPpkgYYPGMDvNIQYozkV+Vo6SU/uEPXgjJLzfDHgUANG/qAwsx6YX/Ccrn9VtV9I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR13MB4474 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_PASS,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 On Thu, Jun 22, 2023 at 12:19:02PM +0800, Choong Yong Liang wrote: > From: "Tan, Tee Min" > > Add cur_link_an_mode into phy_device struct for PHY drivers to > communicate the in-band AN mode setting with phylink framework. > > As there is a mechanism in PHY drivers to switch the PHY interface > between SGMII and 2500BaseX according to link speed. In this case, > the in-band AN mode should be switching based on the PHY interface > as well, if the PHY interface has been changed/updated by PHY driver. > > For e.g., disable in-band AN in 2500BaseX mode, or enable in-band AN > back for SGMII mode (10/100/1000Mbps). > > Signed-off-by: Tan, Tee Min > Signed-off-by: Choong Yong Liang ... > diff --git a/include/linux/phy.h b/include/linux/phy.h > index 11c1e91563d4..c685b526e307 100644 > --- a/include/linux/phy.h > +++ b/include/linux/phy.h > @@ -756,6 +756,8 @@ struct phy_device { > /* MACsec management functions */ > const struct macsec_ops *macsec_ops; > #endif > + /* For communicate the AN mode setting with phylink framework. */ > + u8 cur_link_an_mode; > }; Hi Choong Yong Liang, Please consider adding cur_link_an_mode to the kernel doc for struct phy_device - which is above the definition of struct phy_device.