From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7577D45CDF; Mon, 11 Nov 2024 01:16:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 58AFD4027C; Mon, 11 Nov 2024 01:16:42 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2056.outbound.protection.outlook.com [40.107.223.56]) by mails.dpdk.org (Postfix) with ESMTP id 84F0E40151 for ; Mon, 11 Nov 2024 01:16:40 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mlMjQBRHGk9S94qdjAeIUkzFrOiELTmiC3eXaOK2MXSuDR7rbFC5SqWvWdzhZscaF1L9SrNFCYu2MItpjOv31wgrsGO+HJd7oXNZV8FIlyRsJDGWdXZoCqTgFOXO30vzlqDrAFIwHJ+WQW6m6CsBFu/acfqjr8pmpUkdQTViKr/JMLAbbsIXRnOygaS3BjG+4zxssOwaG+79na5Z7HxW/MtFf4qPHREsSLu/a6T04nO9Mr2a9C9tpCcz4B2A0jclQe7rvUjeahjp1BUvJTy/Uwv6XeCgoIEKdG3XD5ke/uBSmN1QZ/mbZHdUEytIun4mLiPsd9Nzz+htCGzqbn7r7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=gtUxaaA4Ou+av+o+Ib7ect2+3CzWOPkFpB/WRbx5RoI=; b=Ey7UE+fykM9kUQhee0jreSI2PjbdppdPFzjOq6xGqWa0qAYiEvyS4eoYInJGX8QNKTaZXGijSC2PiiLG+6/TQQy987D9NnAQsrdmlM2vbDXnZs8R7+wTcBVjeQZF1N1F4xjT9XfGT6vuPpW5t1LXdldjrnu4m6PW57Lw/xHRuDpJUZ7b6kEyBO64shmrHIRhMbskbmrgoW8GdPo1Gdh0TOXdoZtTG0bqcgGGSz9kiQ57H6jSfhSCeCq+PkvdKiZ+OIJKC9DbmuGt6kZzt8CySL/81kQHelI5ojDykU7O19Vu2+z+6dt6dZY7FzMC+NfNfMKk8PgfgiE6P5iGAZ6c5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gtUxaaA4Ou+av+o+Ib7ect2+3CzWOPkFpB/WRbx5RoI=; b=BfJOqERsg3moU7twXb48IBrDOJAwEiPpS/rhalTxUrU3ULuO2Uro8k59kEVmdakqz9D0BP2BN/6VrlEfeiVQ+Pak82Y5elrfT+OCvuhr29agZp/ACxfDuW0yHrDSf9R6SBUUPne7eMl8ZAs5r8Xfg+Cyb49kTYZSDQyrvYaOWjs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SJ2PR12MB8830.namprd12.prod.outlook.com (2603:10b6:a03:4d0::9) by LV8PR12MB9264.namprd12.prod.outlook.com (2603:10b6:408:1e8::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.26; Mon, 11 Nov 2024 00:16:38 +0000 Received: from SJ2PR12MB8830.namprd12.prod.outlook.com ([fe80::c3eb:df02:eaa9:2055]) by SJ2PR12MB8830.namprd12.prod.outlook.com ([fe80::c3eb:df02:eaa9:2055%3]) with mapi id 15.20.8137.027; Mon, 11 Nov 2024 00:16:38 +0000 Message-ID: <606cd6b0-6c68-4dd0-aa1b-e9b7fb1c3ee1@amd.com> Date: Mon, 11 Nov 2024 00:16:32 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 08/17] net/r8169: add support for phy configuration To: Howard Wang , dev@dpdk.org Cc: pro_nic_dpdk@realtek.com References: <20241108121123.248797-1-howard_wang@realsil.com.cn> <20241108121123.248797-9-howard_wang@realsil.com.cn> Content-Language: en-US From: Ferruh Yigit In-Reply-To: <20241108121123.248797-9-howard_wang@realsil.com.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO6P123CA0040.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:2fe::18) To SJ2PR12MB8830.namprd12.prod.outlook.com (2603:10b6:a03:4d0::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR12MB8830:EE_|LV8PR12MB9264:EE_ X-MS-Office365-Filtering-Correlation-Id: daff1f49-8d1a-4a93-fd7d-08dd01e61be3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?NHc1TTh5eWc0Ylcvd2N4WkltaThzMnFYN2VydDF1akMxOXh2Zk10a1RPWU0y?= =?utf-8?B?TkZBaGVrMnJ4OUFXRUUrWXFOOUNsNWp3dkxWUkpPb0dhSEF0c0V3MHpwcHpV?= =?utf-8?B?VWtNdHdVcWJLSldJOEFkelN0WS9uT3ZGY0pSdDJNUUxQYlplSU8yd3hmZldk?= =?utf-8?B?U1JyWVhvdUxNbTAvK1NZYWVLTTFTZDV3SmlYTldjYmUrNG9mVDQ4bmNQY0tG?= =?utf-8?B?WE41bEVuTFZkUkgrWllVMTB6WHJJQVJmYTZDcnJFOHpaME5NQzFIMGp6bnVr?= =?utf-8?B?aFNzS3M1RXM1UFZ5V1cybUNmQ1plbGtHZVJiSDVRdjZDL2wyd0Fm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85Yjh3SG5CT0ZHL2drVUxSZ1Bk?= =?utf-8?B?eGt4VTdaWEhBUGIwdTZBVWxBa3pEU3I0MDJGNTlubU9VNndJQlZGYnd1YzIz?= =?utf-8?B?WXlFS2N6bmVSS3o3MGh2Y2FvcE8rTXY3d29sU0tZejlZMUJpMlVuQkZsM2Q5?= =?utf-8?B?ZG9FbjBWRWkwejNNTjBFcDFXNE5NNThYTFlUSWJKRTBoV1g2ZTNIYTBoemtk?= =?utf-8?B?aTZkRHVLMFc4eG1lWVpjN2k5R2NqSGFYckRvRkgyYWVJVWE2dTdtckhQQk9I?= =?utf-8?B?ZHFmTWR6dnRiM1BpcmdmNWt3SWlzUDR1dnpqd0JuSjNvREFmTlJUb2pNV1pL?= =?utf-8?B?RVM2Vkt2Y0MweW04akVvVjhXbGZrNFgrL2F3NDVDY093Qi9HVnVoYU5ETFhl?= =?utf-8?B?Y2JEWDFyL01yK0E4UHJBYS9oWXRodkxjb01LUlRxS3VuY01mVU9BbkphZkpw?= =?utf-8?B?Y21KZVJPMFA2dWlpdFAwdkdSZm82MTZ0ak8zbjJHUnhXNW1zcUFvWmJQcER4?= =?utf-8?Q?JukgBE2ObbM9ntfmuHDmhiqdeh1foU9EwCM+P3l?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ2PR12MB8830.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cndVSzNpcG9ackRkQ1FCWlNIUldCeTRacU1kaWZRVHBRUU5ycjdlTk9OVkVE?= =?utf-8?B?bm91dXgvcXFDNDF0OE5seXd4aXlzckpQR1NxUUpiOS9LR2thTkEzd3cvV2po?= =?utf-8?B?aXN4VDFnR0Vwc3ozMHBIdlQ4MkJqaEFuQ1NPcGdBcl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ScktZM0grZnA4QWpZZG93bWlMWjcxcUNGNGd0a1NoMkVBQXBKR0pr?= =?utf-8?B?bjVjWWhXcXlzVGpkeWxPRlIyTDMzQzcwTEZkZ3NhYjhPNHNyMVdrdzVJOUg5?= =?utf-8?B?OFVMMUFXeUZJUUZ5ZXRBdmMrQnBvM1V6bkYrUEIvaDVpRHdLc2doTitEaG1w?= =?utf-8?Q?Co79pKT+Ybzct5nDUIwVPnP2g?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: daff1f49-8d1a-4a93-fd7d-08dd01e61be3 X-MS-Exchange-CrossTenant-AuthSource: SJ2PR12MB8830.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 00:16:38.0780 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pHcPxccQ0CZoHbxleXmzstT620/D8uKKvc9OFC01tJ8kRCrMqdm7Ta1PS9Q/HIaB X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9264 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 11/8/2024 12:11 PM, Howard Wang wrote: > This patch contains phy config, ephy config and so on. > > Signed-off-by: Howard Wang > <...> > @@ -62,6 +62,12 @@ rtl_dev_start(struct rte_eth_dev *dev) > struct rtl_hw *hw = &adapter->hw; > int err; > > + rtl_powerup_pll(hw); > + > + rtl_hw_ephy_config(hw); > + > + rtl_hw_phy_config(hw); > + > rtl_hw_config(hw); > > /* Initialize transmission unit */ > @@ -74,6 +80,8 @@ rtl_dev_start(struct rte_eth_dev *dev) > goto error; > } > > + rtl_mdio_write(hw, 0x1F, 0x0000); > + > It is very hard know what code like above does, which makes harder for anyone to read and understand your code, can you please either create macros for registers or comment as much as possible, so others can improve/fix your code when required.