From patchwork Mon Oct 21 05:48:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ley Foon Tan X-Patchwork-Id: 13843598 X-Patchwork-Delegate: kuba@kernel.org Received: from CHN02-SH0-obe.outbound.protection.partner.outlook.cn (mail-sh0chn02on2131.outbound.protection.partner.outlook.cn [139.219.146.131]) (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 77C49194158; Mon, 21 Oct 2024 06:05:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=139.219.146.131 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729490718; cv=fail; b=A7By3uTiOagmJP/0kXbi7F5kT4mg9IfFEeM9XQDnr+GjByXS6R+cNvC24J5lmPVwObgkLNCWgr/+pF2EibPrqxm2F18H2Rd63NvotV1foEJ1q/yWMDYP+ALrTZ3+WWv48KNZu0sr2xQnFACdm17cxQ+v0RrbXPQUFpg7cKNXuIQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729490718; c=relaxed/simple; bh=5/eQkq1wqu2C/1CuF2zkx3pNQVk6A2SmTaf0uJ+MFsA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=dnZN1QMqlkhRIXv0nE61jkuA/tMAWDQqq26Zbm9g4zgYG154rm5dNg9tsEQvJz+cre+irttlmQ5UdSaTcd8e4vJG+4Yp4doTB4T+rev7ZyzbZTsqd9xl/QLfUhAZ0ksqfg9DhGgqoJLIoHD/Sq9X7tQ/wjoF3YXiS4MQlv5eTAw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com; spf=pass smtp.mailfrom=starfivetech.com; arc=fail smtp.client-ip=139.219.146.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lUv3v8fOgqINFGoXI6+S0lRCfCTF1NeYSWYhxlv21cDsaF8JHuCvrRFbyTr/UiMz51il05PsMtjIouc9Ilw3qKCq8bHL3U6lzNwlI1wWoHF3TyVc9xw11TFDRupwlMI7qdgawRg5oe2FPNyGp6iWdXcThyAs+JN4Vqbj22iBv8bGLop4mcl3jhgZklMtRWNalOI7NEX6rz0BnvH8o9ihhIdT054JAFP5iE1Bjih4nd9ap/kv0T708h1d5L9Tg3RO+BCveMbAErG9DT19SjDpvTs8qqN08xO1em16P/lrbrh9OUYhUYJkcGHzuMy4oT4UqT39pv0svd0+Nqd8iUzIXA== 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=WahXJcbGM8ulZVxAjtg3xSlDTBK4O7kf1zmBe6FFoAw=; b=RHhWwxQ4em3NuqYwvv1HQqOJ1BrjjBI7NUat8gK0vp+UmG74KNjlOKqOGt2+XXDUXTLBnKWH0O5i3djmQ7s+ohmAQoy0pnls5qHeMo9Gdgo4vPGt2JLe8wuxmpo2ftChWld0xfhRrSh0WTMnaKfZgMNV8Qytr4azMcD7MCADJqa9DfcKWQap8kcfKMm6E83jg8z/4nu4s0p+UySj7jo5yP0rYNEe7flMq0sELn6p04ZOPu0x7Po8huz7RzZEhdAh4udzrUrYihZmTkdyKIDnN+kdxBc8MJoQKDxBAKsbGbUdLPVdFc7aiI/r5/2O5q9ECWbqDR8wvlRkFiisxtTJNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:f::12) by ZQZPR01MB0996.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.20; Mon, 21 Oct 2024 05:49:12 +0000 Received: from ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn ([fe80::617c:34a2:c5bf:8095]) by ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn ([fe80::617c:34a2:c5bf:8095%4]) with mapi id 15.20.8069.016; Mon, 21 Oct 2024 05:49:12 +0000 From: Ley Foon Tan To: Alexandre Torgue , Jose Abreu Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lftan.linux@gmail.com, leyfoon.tan@starfivetech.com Subject: [PATCH net-next, v1 1/3] net: stmmac: dwmac4: Fix MTL_OP_MODE_RTC mask and shift macros Date: Mon, 21 Oct 2024 13:48:46 +0800 Message-ID: <20241021054849.1801838-2-leyfoon.tan@starfivetech.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241021054849.1801838-1-leyfoon.tan@starfivetech.com> References: <20241021054849.1801838-1-leyfoon.tan@starfivetech.com> X-ClientProxiedBy: NT0PR01CA0028.CHNPR01.prod.partner.outlook.cn (2406:e500:c510:c::15) To ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:f::12) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: ZQZPR01MB0979:EE_|ZQZPR01MB0996:EE_ X-MS-Office365-Filtering-Correlation-Id: 4c2c93d1-2ded-4e0a-cbfc-08dcf1941711 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|1800799024|366016|41320700013|38350700014; X-Microsoft-Antispam-Message-Info: QvB6JeAGXI1HRAWmrSMlhMT/nCnzTeFstCnbfcwBb/vBxy2pa/ndDM9aplYHw0EmKEksgmdHWz0KCRx7HiTwqWh77Ly/hX+p1ST48cSx5h0BeTHt3S2aRTxTa6EIp5aeYDIb62A1HzZOAUu4Bf7XX8tfG1kTw9kx0Pvlc5s6Twaw4b9Kif14Mk2DZXyJBKS0tlvoPXNM4BGzdNWMik3dkuLJcepGoQJ8j9PqmxV/C1uGWSrV0RP2/LxvQ5XhycBnm7hZIt58QN8o70Jf0xYy8IoSTiBsLDczsUztT7aIRANd5iyV70QmVD2pRHHBavSKVxRgDSC95uEJOUdXal7PCX8upNDnY0/Zx6tc9FregdXnwAbZmen8p+lMgehCsjdkX13XgOTzm3/SZQrMLPcJIF3x4j63EVI3St9B+l07UKOd37FUIlk7bn8NcgEvOB9GIgPUFq9ky3YbDz+psKjwYsJzMmpmKVFugZwnzdquNDoOpH3EEok4Ia30fNNoug/Jq8yKXBNEKPxKFgT3OYulI3XgCaeYVnBuyCzmWkR0oD1vaUVYfbK06XsefoSx8bnTTzH2FWtDKVmJKWptshewT8SgQcXzMTO7Of7ZXqPC1O1s2S1uG6V6iVDo9E4MqUfz X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230040)(52116014)(1800799024)(366016)(41320700013)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ak/BwnkfFTI+at90pnPEpH+Oqh9eIy2pjoXvcLzX9aQK5PGONmoMbe50Ks5iQK7sSRLXGW0VdmFkLb7T6FsTSM4wwspl1DJYUGS7QbFll/AXR1Hx/6Eg0XJQ6C7v4qr+RpIa0Pch+6XUlqRItZcnkijB2t00mKqZf+uIewNm7+5UeXOwwuyPNG9fOr7UOVcK3JnVz2T+2mzyOINbWg1eH+Sf4wd7O4M8pe5wrsRxA6aiEWIC7pQhXkjFKHaqKuUZsPdfYuQgMpUMg5blsHGrEzSlXL9YSVriB0dY80Xxnd341UhDtMN1HhZ13qF9HE+SSPEkGDJU7gl2g6S5Edw61SbEXkZRM8gd0GjQrwaLCig5h6WtdiqEp2KEQZ9bnGD6B9A34OksWraDAs4AwzSxgeERqz/Hdw8mD9ahWoNUiV29Vk3ohE/wp/2cfcAgS+EVDgEJ6BitIGGe9yFD0rdvJZB7l1NchAoADpJUG74Mq5DNQ0Y8r24unbfvMuhEKfHY4MeGxYZO1flYtrGhZSHnq0o5OuhkyqEDSNQJg4urVzhTWIlwS+d+IGRVC2ACU1p2uHBZ2RwG+Z3o4aZiOL5sk2y/cTLP2b9xVhaB14DCN2BBwfS221Jv7WPp02YdmY+bEJcImHnLAv6WysaotjFKlMJ7KcDiRz4vYxnketVvTL5KEogx5zANScsgXvRw1FP10G8BaWW7e8I4AXAq8KabwNHXGWZaqDEh2twGnQA7wBR5SzJEW4o3gbiSdwrrwOvK1B3W6scah5LR3FxoRagmj4OnkO41aKhsYCYEeevsuzECwu527znPeH0uODi0XetfQRH/eCQ9OLi9F+l14IlFecTiJgu3VHc2JDaBcLEh/zqIR9kqwHzSK2wpbSXgJjerWeJqzc9cSRMG7p55qyxQqoodZGcCJG3XyoYF6m+iQIrOD/+TitSkyLpo7QsxOkjWTquUlLlVyPUi0KRB8Y1/f49fzjLAUInnB53ophfFlIk5F2vSQIe8RqjjbEoy/D2vxjkpw7tfwQ3MGBj2oKfsCBNQO1j0ny+1r3fi1GpbcdHdx1pti0PSMh0DQD2JRLV2uHk3PqCV9+3+WMUThYWaQGxALmZ0f/uOXaXQw62m0Tr9klJcf34Eemytf0wUFlsMKuf4+KZb1kMh5cn4NT2xDq93lL0NTbJOIX0bUhQscJKC141DKl2WNDCvW5g+5cOZkSo13dFFIcQE1jPRhk+zdxsIXfrNggZ9r65cfo7tUI5h1folYWU/zd8jofRYChEiGI/NEXfXum+yqlSR1wH3Nz1jV7ZJUXU3U0mthoZRbjcAQuC49rTE76R2z1N7KbFtsVrpbg9QlWxmGNZjlggEY85ABiQEX0LP5Dhh8i9jquGuWSFkvGethK+MX7L91ulybr9TmLvAgfCxlXoF6Pc1hi/9XQcRGcNTPa1cqHUW5ZqXn2N2SK9Dk0UTU8uvb8LOQiKYha4gBJ6DOcWicBvWGPeBD8w8MYwxS20dDfWm0yDTA+vtECcfASXieXNuMS0O3uFwdBlZVFJhmCU4t7W8/pvSU7yyVwVCMRJN4GUgXFTSMLMZ0oa44Qft8h/IZC01LbmDBtzgKNBivYtj5AJVdw== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4c2c93d1-2ded-4e0a-cbfc-08dcf1941711 X-MS-Exchange-CrossTenant-AuthSource: ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 05:49:12.5694 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ru/TNdP0Ga3FypIsYg0gnZeSaZFpYRd3o+0qE8wFoG0Ab14CcxlIxu6vJUTFKmMkZzTMj503Gh15NwXfVWNad7KVRKMsfEJXO6nk9WRQWAI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZQZPR01MB0996 X-Patchwork-Delegate: kuba@kernel.org RTC fields are located in bits [1:0]. Correct the _MASK and _SHIFT macros to use the appropriate mask and shift. Fixes: 35f74c0c5dce ("stmmac: add GMAC4 DMA/CORE Header File") Signed-off-by: Ley Foon Tan --- drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h index 93a78fd0737b..acbe5a027c85 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h @@ -389,8 +389,8 @@ static inline u32 mtl_chanx_base_addr(const struct dwmac4_addrs *addrs, #define MTL_OP_MODE_EHFC BIT(7) -#define MTL_OP_MODE_RTC_MASK 0x18 -#define MTL_OP_MODE_RTC_SHIFT 3 +#define MTL_OP_MODE_RTC_MASK GENMASK(1, 0) +#define MTL_OP_MODE_RTC_SHIFT 0 #define MTL_OP_MODE_RTC_32 (1 << MTL_OP_MODE_RTC_SHIFT) #define MTL_OP_MODE_RTC_64 0 From patchwork Mon Oct 21 05:48:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ley Foon Tan X-Patchwork-Id: 13843693 X-Patchwork-Delegate: kuba@kernel.org Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on2127.outbound.protection.partner.outlook.cn [139.219.17.127]) (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 8552B1CF285; Mon, 21 Oct 2024 07:22:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=139.219.17.127 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729495340; cv=fail; b=Hl9Wdvywq4yvI56fJoXap1H3c+8gQixp/xkXTr2j/r32Ud1T8SR9vuqWRfow3Ww7WHek1LJw80dIPo3aKDoA/qRoYPnLk1TkpnRx+yVppMEOr9+Kvkwf1p1nOKdpmiV0DWdVtt4iNQLdrOrdgzIia63R6Up151AlMLtp3/NclXY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729495340; c=relaxed/simple; bh=HW8KSwXWeO/6JE4pbs1n16h4fsVPU8jQQFlgxBrKAI0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=XG6DOzMFcFsyXR0ZkfbuVXyFa4BhX7pL+vQRm3e3LDGBQWVZGxOThgqd5vj+FU0v7sJ4nMA4D2S8R9N+gMJKxaMhw38WLGBFVgy0wvP8MxfPgHhjUohWHuqDS22QPrdxGTUG7Go4q8MmbbLH6sTVwJRrqz9ysM21atMxSgIzdlE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com; spf=pass smtp.mailfrom=starfivetech.com; arc=fail smtp.client-ip=139.219.17.127 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kIlZ2aaoIxWSkEBWwyeAPIpaww8jawiQssCpxJWhHn3sLYnpI9PG85nH0dOafX4sC+0WsVjQL1SEvWusRgPwLXe33guU9L6QuyZ0zFhZQHoNB2U73IoxYizs1gqg759z5yLWrkIDY8oHGOs6li27Aj1eIHjB+M0ln797yzko6LechUa0ibm39TU92UnTK9/mLwv26wJiwF6ZtAecG03YIvLb30DxbHIDescrD4LPT3cir6LfLIRnlfYsFMCz+BSz85WvY8h3X6pm4exJ640NWXfsCr8n+LwhMUQdM8VT1znDRCJyJoWjzQ/v0AZOgNdHrGuk2Xn3WxSP6Tgb2WfhYg== 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=ImfW7z7XD5azVTc+abegwuNShrnp0d2Wh4zrw+IKVkY=; b=iuu5TIQowKQyi7PX52xRPXNshOQoCt75dLn8XXsiDIVHkT3NY4miId1/nSABRv3lAyvQy2gcKf6GhKbmWEZIhf/96ZbwqH0biFftwlepGEpH6kaqYUOgwxBbzTA8tUNO/5WqWk+XG7tIMmE8KU1Z833wiAQr1kZC/FYJMnxKEBOsq45qsOZykjO9fzNVI+5h7edVrTD3KqJny9Uhq/NXg52c1ABTAckAVsu3STT2US86EejbZpMCh+ek9o0tpC01h9Leuw9Hg7KL0rmfayKHagCOQw3D22PqvatsvQpsSs9RNtgaoeSDwhCyKAGib2ra5/T4x4lgjlcnVdRNtrZqug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:f::12) by ZQZPR01MB0996.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.20; Mon, 21 Oct 2024 05:49:14 +0000 Received: from ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn ([fe80::617c:34a2:c5bf:8095]) by ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn ([fe80::617c:34a2:c5bf:8095%4]) with mapi id 15.20.8069.016; Mon, 21 Oct 2024 05:49:14 +0000 From: Ley Foon Tan To: Alexandre Torgue , Jose Abreu Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lftan.linux@gmail.com, leyfoon.tan@starfivetech.com Subject: [PATCH net-next, v1 2/3] net: stmmac: dwmac4: Fix the MTL_OP_MODE_*_MASK operation Date: Mon, 21 Oct 2024 13:48:47 +0800 Message-ID: <20241021054849.1801838-3-leyfoon.tan@starfivetech.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241021054849.1801838-1-leyfoon.tan@starfivetech.com> References: <20241021054849.1801838-1-leyfoon.tan@starfivetech.com> X-ClientProxiedBy: NT0PR01CA0028.CHNPR01.prod.partner.outlook.cn (2406:e500:c510:c::15) To ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:f::12) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: ZQZPR01MB0979:EE_|ZQZPR01MB0996:EE_ X-MS-Office365-Filtering-Correlation-Id: b22898f1-019b-4fd5-d80f-08dcf194181b X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|1800799024|366016|41320700013|38350700014; X-Microsoft-Antispam-Message-Info: 5xPyOS8+gJndNrStGK0RcXFHsg19JZ9wDpNfVY5uIDZD8e98hNUaVtR8NzY3k1Eq1c1nMY0lQvQESa5xP2m8+iYKSHiZxuQuuxy6UABW8SSza4qcdLACb1kW/cfg1lkjkwurM9wc+07DS3wTcNrsYyeXfqc5m0DxAOZmwgCvOL+E+Bc79Hbw2fwg9b6uKAjQWJ/eR2LZh6BMiMYb2ciBaRNDzo6u0pyVI58kb/OC7QFbHO073TprW9VZW1Ku3DLEithy/jz5hlfX2yP9HX+LYZJvi78/qftz1CeQzEUfOu6Z3UKy4FxSRmURUPHj1iNoXS3yTvrgpibCDQUNz9oPSoeyBz5Jrq1g7nI/eimaTdGFmcod7rbvz3qC43HAxKS+RI2sEBI2xE3v9v7BkBwT15UweHadSXIGIGpl6q4JAYiJEo9xPyUJSqyt+Ttch0QhMnAzHsdcKVXdSrY6sNGpnRJOcMYPRN/SrNiERYz2qw+ayy1eY0XRqvQmeSo0ZvdpyJ+fjPixNfg7Vjan2NGA4Gq1AV6k7wJK7Tr+KKv2MhO9Yiu7S0MZHtmKOlq3YKtwg9KeTPrUPEs+MuvzF7NmkHeo0xLBR3fJi/8g7Qm6QBYfMhSPzl0sRIY1i+wq4/r/ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230040)(52116014)(1800799024)(366016)(41320700013)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: x1G4sGsB7ftfgk59+oZRPyYqfYqThXB1ULKGYDu0LRIdazRQBgtozgFq+g7ej5h759vqf8ZSLgD6ivKas5+zwOgiElZU2oNj5qB4Ortj04gnz085denJPL1+C7iAveT/yG4HwU4B0vSxJuXUIzoUe+x3Y8hFiEIh3dFoRUvjWesP9RiF/69YcYEmh2EjxQLlRRfVytbfWkv1O+yeiXX6TjnmtA6j/KZNQ6O0Y2YKNMIDNJth8HxqTOd1HUQv2G3tBEZW3qNaFvTolmZ1QhUjK+IuDujVFQ1NvvJ9H8awpRPdF/ZkFRRvEC4/scqvXGBqkNZxYqQuJ41TV31KVfn62p+Ar0zAq5V3OSFqWsk3IPSo98VPSf/WKiT04wDxq5BBojEpqcTcUSeGLDysFrF5qQSGh/cvEkisK6+tCwPlBJlcxIrvIORB4pp0TIOXBkAuDcGu1NDTMivhoiCIQ61WSujJUCSpj60ZIAbYPsL68VZT+L/bLLe1GjLN2V0lVff0W13i6k4ji3ep22sDc/a1Au33FRieX7WSge7wbwlTbpSNeZXQhigkwGgC03hcXvyaro/Wr1udEfAgLLb6+ykEpaDBiYpRGVuydqZ8fbmFy+HdQybT799AgsGtbsARrv8Hzq67ZwXyEmBLE8CXqj2wsItWCnMcDFZsE8xF/yTpbyiHoRTY7Rt8LCJRNkCWAhNnq45FhPQgtXpjgNzRr9CGlouU94E8kKftiySLCupUod6/2at0KyekDjcPZUFqZQ391YjIfua7bP3xCGFAJo1UgVuawyWWJxwyAmpCINYfebFMzkE1Lm5XJdJpPW1hgVYaS9FHTeN9N9wdcjUAt3eRsi8tXpjBkqKz06JWEYH9KCIpJtNQavWjTRPBUB6urYESefWYi/KnBogSoWnYZR/oaTPNjE27guzGWLN+gXXfetzG5cNfZLvQUAXgoRONNjJ60+3ZUHWkUq5CDxF8yTxtmKZ2L5VEzYp79Lc1Zd0BEJLRlvEyBAPlNtfTtUoYIiykmSuAvPfKshY5aqZcP5+e1wAXjniD/P67WQkfxzInZLF0rn61aqRMf9ZSMi+YaXcAx97IWsVoACMjTVqIJuymb5Bwk7aGR1hJgtz2NsAwGg3cB7wWQ8kXX/LMmqjRhAnG43TPGZaQ3RSnPnxA98XZtgwokJ7jcfCzpIXspaJbMlvzSxAiKlOYoyEFGo0t4i0Yp0aHqu+W/4at1GCAI2ixBnontMHSIrcRNXuNN3Gk1gbcwDrB06psjd9kPLiTIKCSPdtCHr7e8kRfQq8zhcfLUZzY8krOipQ65a2SORx02sE4vtKAs3G47gpcEZr/GJiUcTqjVaGtse9pL7TnO5ImeAApy/5guFXtbFPFlshIEukxtbqvdwXfokk48pg3oNjnrmLtCc3PkiTU2erLqQw5VzoWlFlKXMpB+LGPw3v8NN3a1792u3O5EIg5pNO0oK+uUqiC5v4CE5vsCIEwtcvSpnI59/fl0Tw3k/RloQrnW5MCaHKd70JY0OXkZbZjeRfghdkt3FUazAjTgU3kI3lLWY4NbFVuVI+vpfGKiyqV1YpPuANomden1qkuxDuPsewEM8ObLO0/cYjXTZynERM5og== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: b22898f1-019b-4fd5-d80f-08dcf194181b X-MS-Exchange-CrossTenant-AuthSource: ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 05:49:14.3103 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3Wl+Jv8HoaJPYedKhygBwHpG+PmqPLieYIxRnyblafMF5z8Fzyqlp88WYOVMQyDaUx9mSrTFJ0X50+qpGC+ov2G1EOq+6qzwZsN+4inZV8E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZQZPR01MB0996 X-Patchwork-Delegate: kuba@kernel.org In order to mask off the bits, we need to use the '~' operator to invert all the bits of _MASK and clear them. Fixes: 48863ce5940f ("stmmac: add DMA support for GMAC 4.xx") Signed-off-by: Ley Foon Tan --- drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c index e0165358c4ac..4e1b1bd98f68 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c @@ -266,7 +266,7 @@ static void dwmac4_dma_rx_chan_op_mode(struct stmmac_priv *priv, } else { pr_debug("GMAC: disable RX SF mode (threshold %d)\n", mode); mtl_rx_op &= ~MTL_OP_MODE_RSF; - mtl_rx_op &= MTL_OP_MODE_RTC_MASK; + mtl_rx_op &= ~MTL_OP_MODE_RTC_MASK; if (mode <= 32) mtl_rx_op |= MTL_OP_MODE_RTC_32; else if (mode <= 64) @@ -335,7 +335,7 @@ static void dwmac4_dma_tx_chan_op_mode(struct stmmac_priv *priv, } else { pr_debug("GMAC: disabling TX SF (threshold %d)\n", mode); mtl_tx_op &= ~MTL_OP_MODE_TSF; - mtl_tx_op &= MTL_OP_MODE_TTC_MASK; + mtl_tx_op &= ~MTL_OP_MODE_TTC_MASK; /* Set the transmit threshold */ if (mode <= 32) mtl_tx_op |= MTL_OP_MODE_TTC_32; From patchwork Mon Oct 21 05:48:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ley Foon Tan X-Patchwork-Id: 13843597 X-Patchwork-Delegate: kuba@kernel.org Received: from CHN02-SH0-obe.outbound.protection.partner.outlook.cn (mail-sh0chn02on2131.outbound.protection.partner.outlook.cn [139.219.146.131]) (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 75467148FF9; Mon, 21 Oct 2024 06:05:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=139.219.146.131 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729490715; cv=fail; b=J7GR538VnFUrfnTUHvVAZqzYHxqBKR7qExkxbQCokBJfhDjwTQpdX0ndu7wH9YgZ0KsUWXQ/OVHrMCOaBsIZ7FaJna2hsGk1JoEgknh0f427D3rxlNsVz0pd8yeIDqspyynZlE6ENPv/y0gQrD9jEXa3DwVz4V3Z5WWte/2aGLU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729490715; c=relaxed/simple; bh=R+EeBlj86pRNtPtgXv896mqaSsSseyfHwsT8jQ5djoc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=YkFYbXIZBLZH0DN+jYjOgMUqXHXAqz6W9D9nR8KGH4OlPY2F6u97E14D06Z7x4g88eie3RIhigAXN284oCbOU53LpmL1xN1FC70ToZzmOHGfPFvRXtV9gARjT5UugXBOnGjI5akZ039YkqvVfSP9ZEE9SsGZNV86AZccYPLTpSM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com; spf=pass smtp.mailfrom=starfivetech.com; arc=fail smtp.client-ip=139.219.146.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j3rTQxMuPcQQCLrf1jJr9Mgwrxbr/RLgf/LRuYtsmFcWlRH9E5KVtMvAKz7irY1WaCCHRiONkQ/IrZK0E6P3uowLNYKPvYAIIaz2XkA+mwUfGLNcHvtyZ3OV4mgT5O4paNv0nj0m6y4iV9i25tz1y2rFWiBbu/j6CShtS2D0kg0WZTI/xUIXPdw+8Qdki4DST/ZYGFVnN6ZVntk1lLtcrbJB9KWrjVtZp5HlqFQSYH4r4arMzw3P4774kZf4OhMpC3B7uWs82+uBPI2UmNsSDy3YdXpB/hgv8/cIv4slh8dv0w3eoxpWyGgbOKpU7pK2QD0659QetUi+Ln4NruVAhA== 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=/sNVfhZi9kq6WRMkg6s9bACOW5z61wVpEKgboggd3Zs=; b=M/T+6pF4G939G/z9iIuIqHWmatCQyWDXYe8/WP75CwBNZx9cSuFuuo/rODJFvtgBJs85mQrCUVptWvEH5w0FgWUCVYgYpL/yqEne1ZT0xyLJtI1QfbyY2xh1Rn3jNgufS3zJKoXHm5xi1tVzEAxdtRXcz25p4Za8n/7+Ltb+g2pF4yRhD+rtx4esnq+KqnCmVwypxVwkYA9FGKEoJNMD2IM1GyNMBuXHUFyOFa4OR41cS7oKbtaQ0REHbsC0ktMX/UR3TrVEPDQKR3q1kuw+52+c9tiw9Eh1vug5X1uxvrIrf6fRTwmGsKFt4NVN3lKeifkBFooALCgQGofygUUM3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:f::12) by ZQZPR01MB0996.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.20; Mon, 21 Oct 2024 05:49:16 +0000 Received: from ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn ([fe80::617c:34a2:c5bf:8095]) by ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn ([fe80::617c:34a2:c5bf:8095%4]) with mapi id 15.20.8069.016; Mon, 21 Oct 2024 05:49:16 +0000 From: Ley Foon Tan To: Alexandre Torgue , Jose Abreu Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lftan.linux@gmail.com, leyfoon.tan@starfivetech.com Subject: [PATCH net-next, v1 3/3] net: stmmac: dwmac4: Receive Watchdog Timeout is not in abnormal interrupt summary Date: Mon, 21 Oct 2024 13:48:48 +0800 Message-ID: <20241021054849.1801838-4-leyfoon.tan@starfivetech.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241021054849.1801838-1-leyfoon.tan@starfivetech.com> References: <20241021054849.1801838-1-leyfoon.tan@starfivetech.com> X-ClientProxiedBy: NT0PR01CA0028.CHNPR01.prod.partner.outlook.cn (2406:e500:c510:c::15) To ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:f::12) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: ZQZPR01MB0979:EE_|ZQZPR01MB0996:EE_ X-MS-Office365-Filtering-Correlation-Id: a164545b-4736-4a28-993f-08dcf1941923 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|1800799024|366016|41320700013|38350700014; X-Microsoft-Antispam-Message-Info: B9fdFMDltopznV+mF9z0mgMzVtoHacy/lZ3BLo97ZIrgzkS4KgF13teipfm/0gSpGilARxPuVl75AqcDc5edC4tdvQlTy4N4/fcGVWu2+Uo8Xigv+/Q8ElJjtr0vGCq/XEw3h9lkIb+lZz/eF9wWwgfi5SYqHsYfLSpH6BalNIQSYnnWYcRrAjAi5YZQvwew5CCkBZat6iTobsLAuPUqCVw0948nSHKUSvFK1kFzEtt4D0iy3kQQPmdT7ytoSokXWMBYpIMm6XNYzDjaYfgpVENVPIpQ0rMNoNHEPvSp0l86DMHiB1+FN/leEjJ6JHnSqq9sluLRhc85Vhi443wt9NXJrUPMJvc4Edbovxfcu7a+weGAL9KscZiQyVLZMfjX38J4BMlwDNQusBo8jeR0EEzdJvqJ1+NlqtT5898DwkEW1T0m7qOAA580hg8MwtA9LXcbX1iiz8KDKrXYAgdpnd0jAc59jUBeLbbxxkBP2kl1GXV+0WZ/pjP3KpB9hJ288NLhUEFh/9V+M5RaHwpatnS0yfnodPv16UnBFQTq6ioix6AzSfRiaukD81sYLpKFs3UMujMzWVI/BPrY3uhOkcNsoYpGzdMKL1Dmb2OwY8UYIGFKQUjS9BUT0CPtVREd X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230040)(52116014)(1800799024)(366016)(41320700013)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 69GpiCog967GC6fHlzf+sohmxO5xLrZ+3k2HuAoWnZERuCUHcfAoS29cIM+WHvYCEl11UMq9sIsGsWo0vRzHNsuFzvWhYPxdykBTy96VYPG0TmHZg59PBsgmSs5hixNJpcDJBLQwZFSyOToVE31UChahF3ZDYg9576QkBbOsxP/Cqoj7qfqy07uSFRNzQezD1XxXGpaO5T/hD3U4BoiNBDzWzzqZ/2mQgHoo2wVgh5aKXzthT9mr0z5Fxc8LA4csV5SSN9veIC8oJp/SjN4Y/ioMB+2I14fcnytCwAeyAf3Gege5Dnwp0ThiHzR7IisS83ImKWMLVqfC2HLo9fsJPbfa6Rv/MoIWynvxiwa4e1PCiW006tNVX4Goig5H1R5rmA1ma5WD9nzBeyYFdfV3zd4c403tnOO/6JDdPTUs+gjsP2ncEdoB2x3XMET01Hl6j4x+tNE3RXOJZhOMChW/hl1J/dOlzt5dpTR/ft+LICdY48M47TxaegCKvfKzDqxXfa2lkpvGLyg5wpD4+hujNF4f+b15ICs2J0ySCoDeppjIJzi5ErElRGJYaCNKc7mpnbVCty1E8jLOQNYduftpcir0a8D/cnKxwEqxWFlgjafT71FoegX4VeUNY5fZ0pk7vnDLE7lixmeCmGONuce6oaAXPPGIawGBz0D2vyoQYKfOrIV/MZ3sKY5RUsS9gekoEr+sgh1kzG36o0bRomjVgwA5GO/Jy76GwSH0kODmcJMHrytbhcrZZ2yNTmZVAjy1XgD7MwNWDguGwXCdBRxeEnZj012plXtPoXENsl1uKcQL4X9tItGo8n7DIcrAWj3FKjGbjuNhXkJH+jsdt0hjat04Xe5Ny8sbdxw8iQYo6fyp6o/CT2sBSOvr+4VJBYXWR4op/I99dXdQeGUCY2TShSU/2vvLUms9HbPWLrgYCtW5ryMhi1doqPWdZg0qXlMKaBX7dtDadDybWnOked7ZbMYQtcy46+7KOdfA3DSoSfg73rzoTSImyZEDjsiXGkG+DfNPFU/0ZrPDmXXAs4qPRZgWZJOQ6if7vhAPHBex0q9lJ+MyK2lQHydGqrRNiMnxdunXj4gThk72IvzRiHBia9uGC0pGJD2ervpqwPNNKbUXjkz2Gl/aQXsRGkqjOCO0LCYtawYIP9MDi9KwUaMdDF4OERTMLNzP9ehof6EbLoXqaVb+igii4NS8AffkXiTQZPJXUriyr+rUWn1vMEi2uZTyMqmCEnPg0VD00bB+Xl0Of8DzYwkVXisINSTkIKsWnB2bVtokW71DlzCHbMlvqPMni5JL9vE9HO8nVHA5CWHzuiFrO/Ljogxl23gqERGxYu/5F3q0GTjc0WKyRROwDvJFrgOcGdKqnn+0rJtyJgonmHK7gaSHNVvGicIZkPW4/rkfZ5Ycma/+DSndG+/CiHxANDDOC1zOZl7OjQYXUjlyay++lx2ElAWn8NhWuvVPwmMAzVskK22QicQgF8bfXY5HaGpjaxDaAniXoy8HVzJXdbCLqc4IUhP+ogYeSW828C/hfq4/4HGbeUAvqHazAVyntfK4ybkM3HZH7lAivREMZPBUObilz+lHI14LkB3G00bko/NwOM83bu52kkImJg== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: a164545b-4736-4a28-993f-08dcf1941923 X-MS-Exchange-CrossTenant-AuthSource: ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 05:49:16.0416 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZvC1E+h7OkT6y9dYZWnWEWP2r2WtNxbvAhY6AEEBsPTLbTWrUj/mBF7qrQGOc4BOHGBIRfr/SBRuNktuo6zmBgV5V4Uzrceblmch1/uOuXI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZQZPR01MB0996 X-Patchwork-Delegate: kuba@kernel.org The Receive Watchdog Timeout (RWT, bit[9]) is not part of Abnormal Interrupt Summary (AIS). Move the RWT handling out of the AIS condition statement. From databook, the AIS is the logical OR of the following interrupt bits: - Bit 1: Transmit Process Stopped - Bit 7: Receive Buffer Unavailable - Bit 8: Receive Process Stopped - Bit 10: Early Transmit Interrupt - Bit 12: Fatal Bus Error - Bit 13: Context Descriptor Error Fixes: 48863ce5940f ("stmmac: add DMA support for GMAC 4.xx") Signed-off-by: Ley Foon Tan --- drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c index 0d185e54eb7e..57c03d491774 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c @@ -185,8 +185,6 @@ int dwmac4_dma_interrupt(struct stmmac_priv *priv, void __iomem *ioaddr, x->rx_buf_unav_irq++; if (unlikely(intr_status & DMA_CHAN_STATUS_RPS)) x->rx_process_stopped_irq++; - if (unlikely(intr_status & DMA_CHAN_STATUS_RWT)) - x->rx_watchdog_irq++; if (unlikely(intr_status & DMA_CHAN_STATUS_ETI)) x->tx_early_irq++; if (unlikely(intr_status & DMA_CHAN_STATUS_TPS)) { @@ -198,6 +196,10 @@ int dwmac4_dma_interrupt(struct stmmac_priv *priv, void __iomem *ioaddr, ret = tx_hard_error; } } + + if (unlikely(intr_status & DMA_CHAN_STATUS_RWT)) + x->rx_watchdog_irq++; + /* TX/RX NORMAL interrupts */ if (likely(intr_status & DMA_CHAN_STATUS_RI)) { u64_stats_update_begin(&stats->syncp);