Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1400040rdb; Mon, 19 Feb 2024 14:34:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVyLvFjAvwZD1H1TlvEeO/raj7c4Dan34Oy6EyPQ07U4V7hd23YqFDpRRYTiHOnijKctd1x8OuqlZBcuiD8V1P7lsb80D0Ueea/t9Sx2Q== X-Google-Smtp-Source: AGHT+IGeLc54ClBdNVsvuTTdyaPgwUayhMRutEarGJicspUGU1TUMdVjxNgQb9PalptnwVBAEow1 X-Received: by 2002:a05:6359:c85:b0:17b:df2:5f09 with SMTP id go5-20020a0563590c8500b0017b0df25f09mr9076267rwb.19.1708382081297; Mon, 19 Feb 2024 14:34:41 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bq9-20020a056a02044900b005dc50605acfsi5108119pgb.519.2024.02.19.14.34.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 14:34:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72063-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=J1bCiCmf; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-72063-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72063-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F010B284B70 for ; Mon, 19 Feb 2024 22:34:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 98FF854F88; Mon, 19 Feb 2024 22:34:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b="J1bCiCmf" Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01olkn2065.outbound.protection.outlook.com [40.92.52.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B37BB54F94; Mon, 19 Feb 2024 22:34:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.52.65 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708382068; cv=fail; b=orfUqnUO0uetQiKG+sfOkw9m5grmLpLAmX0pi6JoWKP7NkqXT4ThuH9694of4EuDpO35nVCCtihx5PQJERx0WJU23XHWTO8jWngrImWwQC+8qB5cEXFPv7Yxc3RNPq4PuCak+XNWH2B9cLa8OI21XuBycnjzGLa7i1yIEJeW9II= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708382068; c=relaxed/simple; bh=TTmEiPCWpoKhPhvhaNN1aVSKpO9AEkLkUZA434sqxwU=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=kTkY8GuFuOzboL4f7cQK3S23R+zie1J3CjizHlWqLu/zPCoZSj7vmG5VfVt+A1z8nNfxtZhAyLzJmwyI44aWJFDa56LZu2qlWx8eYhS5aIWy8D7CD7NcZ0R+5FhKPTplIPDR0L/F1RijmIvNYDW+Un6IjEijgJdDbVKL+4G6WlE= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com; spf=pass smtp.mailfrom=outlook.com; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b=J1bCiCmf; arc=fail smtp.client-ip=40.92.52.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=outlook.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dbT7YxhOTL9eWNJFV4iZw7d26GgecxnoRkQGSKycQU60ctalkEjOuzMNGnPvQslRZrEcpPLnSsqZ3UO0BmfE+UKjX4dk1dUKjH5ahG9Lwr6EA+YxY0ELUAlZZXnDgnO33835xeVeZNJDOPmvt4msFUnh+zLRkAXP+usxAGldtQCTXuD0//p+LM9gljOiqsT1A1fPvBCxgyd3bkCN+66W1wWWfJ4NtW598hO8vI0j5AWCExlYkU0HM/k6yPfDJr1ahg3MTOBcXijwwLbyCRvMAUgYe3sU8Ymg8Rn49PAYgucW+LfibUEkRdZ8LWa6xlio/q615UHFi5JPHnrWz5iC4A== 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=mGbM3AC5SJV90fJaTlCt5tBckr/ZJADQtQ7J0uA83gk=; b=ZOG1Pw81UOkmsnblCJZrMK2CFbJ1OgPgjjG2SKvhEj6imx/HeLA/d+XXLIsKB5wcedZ3eRRbcUXu5cQF5LoMl/pgNfEXD7Hk9+2M/NEhsyWhDN2qukofGkLU2IClhwnAZNrb0iyfftnnCXx0DBGsDA/W30eHIrVCrmNRjnnSLdv0XQGVvfSbzwNTyY6VR9nOD2H0+9yEqr0guHU/KgIpWQQmPLpTKUt7laGZyS1pvvODKxuxYP7bIUhvGL4Llhl9DBVzbCvWF4wMAiREdJ1LFh5ApM+mhBpwuTGS7M4MORh2LthLCMMCpzhxO/mx+bh+GYdlofusdJxp29XvCCZfVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mGbM3AC5SJV90fJaTlCt5tBckr/ZJADQtQ7J0uA83gk=; b=J1bCiCmfp6aUCZ0DrVlss3yE69a1oH9u60nU7/LiPxT/xa9/V5jxbF1rUd7zAeahAp9FgzngWdGHegudk6Fi+OX9ypiZ/tMYnRPEhCx8Hl02YLTZ6LXTDa0GioYNxh0tAHijHm9lPSqRqZbXE1OD1278ZvUUuBXOvm7AFLZYG81o5tEwSjUc1dwi+BrKio9p2B3TmmtohocugAKppZXgK5P0FLlFtHEi16MtHGcVmpG7gX9MR8o5XI4d+78MoKQIbDusY0tmtvqS62HEPiibmiSgE7s2Ht1GfTWNxfLhViwKfpLsvxz26xzfirqdqH/TrwICv9YLWz82aFbq/V88xg== Received: from SEZPR06MB6959.apcprd06.prod.outlook.com (2603:1096:101:1ed::14) by SEZPR06MB5958.apcprd06.prod.outlook.com (2603:1096:101:e5::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.38; Mon, 19 Feb 2024 22:34:21 +0000 Received: from SEZPR06MB6959.apcprd06.prod.outlook.com ([fe80::53da:a8a:83cb:b9ad]) by SEZPR06MB6959.apcprd06.prod.outlook.com ([fe80::53da:a8a:83cb:b9ad%4]) with mapi id 15.20.7292.036; Mon, 19 Feb 2024 22:34:21 +0000 Message-ID: Date: Tue, 20 Feb 2024 06:34:18 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v3 3/6] net: hisilicon: add support for hisi_femac core on Hi3798MV200 Content-Language: en-US To: Andrew Lunn Cc: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiner Kallweit , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20240220-net-v3-0-b68e5b75e765@outlook.com> <20240220-net-v3-3-b68e5b75e765@outlook.com> <29fc21f0-0e46-4d0f-8d4b-c4dbd1689c55@lunn.ch> <5572f4dd-dcf2-42ec-99c8-51bf4d1f28ba@lunn.ch> <0beab72d-2919-447f-88ff-fb7c92b28b61@lunn.ch> From: Yang Xiwen In-Reply-To: <0beab72d-2919-447f-88ff-fb7c92b28b61@lunn.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TMN: [+1LCJbXh7vhO7eLkeYwqe1Vv//pXB4cTLMfCKz6DHOOcIIFyOwBJKAzTPRqh5X9lzrTzYwngVl8=] X-ClientProxiedBy: TYCP286CA0247.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:456::18) To SEZPR06MB6959.apcprd06.prod.outlook.com (2603:1096:101:1ed::14) X-Microsoft-Original-Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB6959:EE_|SEZPR06MB5958:EE_ X-MS-Office365-Filtering-Correlation-Id: 18c68fbc-bae8-44bb-e051-08dc319aeaa4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ounD5c9q/rGVTkhm0fNLYQcMFVULPMPTYeauoM7hqRbaMRyHzBqiySXyWB68npnbituPboBGMG0bGhqd8F9RbmLWGh/w1i+/LCC6IXOnXkXDD2kHg0nGDGTZHX0BcvhYwBC3P5ifRspgJXz82ea66nl55lQK+10YDumCB96VI8R1iWQNQ1O8OtgU12iS2zhhgG9f00oYK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VXcG1aOGdvR2VCWXZhdlBtR25tOExyMDgrc2s3?= =?utf-8?B?RHJnNllEcTJIUUg4enY2RGV1akJvRml0Vi9ETklUQnR4KzdJUkNCU0lDLzRn?= =?utf-8?B?SDM5TmJGYkFDazBLQjFDOGZPWk9CT0YyYXNvUHVYaEh4WDU0U3NhT3hCcmZi?= =?utf-8?B?ajB3WitTQkhFV0pFcnNsY3RhS0RiOU1JQmNuNW5kdjN1MnpiQjRnQTlPUVFE?= =?utf-8?B?ZEV6V3pRTTFMR295bThQWER6a2ZNcVdDUXpMd2FzZkxoa0hDQzQwNEwxMnQr?= =?utf-8?B?NUtkQW9qazlnSis5bTNrY1liQk5xL0k1bDRKNTJzeXV3T0I2TmdjQVp5T0NH?= =?utf-8?Q?+X1h9ALdyYObh6sTV5a/i8B8/dGuKXY7BlI0OLy?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18c68fbc-bae8-44bb-e051-08dc319aeaa4 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB6959.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Feb 2024 22:34:21.2466 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5958 On 2/20/2024 6:05 AM, Andrew Lunn wrote: >> It's not MAC which behaves wrongly, it's the MDIO bus. If we don't follow >> the reset procedure properly. The MDIO bus fails to respond to any >> write/read commands. But i believe MAC controller and PHY are still working. >> I recalled that it can still transfer network packets, though it fails to >> read PHY registers from MDIO bus so only 10Mbps is available (And the phy id >> read out is always 0x0, normally it's 0x20669853). >> >> Maybe during initialization, PHY sent some garbage to MDIO bus and killed >> it. > MDIO bus masters are really simple things, not much more than a shift > register. I find it hard to believe the MDIO bus master breaks because I conclude that master side is working. Because when i tried to read PHY registers manually. It does say it completes reading(the finish bit is set). Though the data read out is invalid. > of reset order. If the MDIO pins went to SoC pins, it would be simple > to prove, a bus-pirate or similar can capture the signals and sigrok > can decode MDIO. > > To me, its more likely the PHY side of the MDIO bus is broken somehow. > > Andrew -- Regards, Yang Xiwen