Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp3499463rwp; Sat, 15 Jul 2023 04:11:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlGvnBOOs4+Ua/nqNLYQSu0Fuk4+PrvCBvUxu9RPvHtMWSMMx4sez93O1dL7rSM0sPVocyj0 X-Received: by 2002:a17:902:e84d:b0:1b3:d4bb:3515 with SMTP id t13-20020a170902e84d00b001b3d4bb3515mr2123011plg.0.1689419475335; Sat, 15 Jul 2023 04:11:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689419475; cv=pass; d=google.com; s=arc-20160816; b=E2qC1vqNQyaXzAiwEaK3852nippEx1lspS6ScWVJxmpy8jxdS6DsgyHrXbXH/gdR1E eTd2Y3GywnJMqQr5qotWmW0Xm8qmDa4xtP4A9SMU7Jgn63IdN3/AaqvxKNeCmVSn2aYy OUEIdYiHguMEO8rKvngG5iCSt3rpGtw6ZOPfhMnDR8+LlcTYeiO0OayBUcQ3VpPM4UUe DTX6SIRPLpCxLzPUbsAEu2/albPMSFoJX2AIUt2pMtlE6NXPDnDw28NeyXf1X5raA6Gd u7Y9NleR8qRHtDYVKYtUccVL6YHI/OImgAE8IwGZudN9U8QW7wh8HZsLkIJRqb58QrKR MTUw== 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=SuaxMiQ5f2RFmvUf0BkEsBx+X7QRrhoX6n7x1RHbqWo=; fh=55Gjt6Te0cl6nX051npcz8eUbgnhphist1tUCIeqsxA=; b=SeNUB+4K019MKvlsontNp9LtRAfD0Ga+8SpygIbOcqeUOlxySKV7xyOs7TCicVvycI HBzokfI/gpRHFiPOA0jwMCkurImzlYkYLu20aAgkWCX3bM9PHTNvHVywzZ1NbcKVk4hX jbj2zZURs2psSv6bbH/uRBOvo6fM+cgv5zmKQM5kcphI09ajKDN85K63J9wFJ1mzQTOW kV3qdqvjR1hMhaPEPVpMZiKCJdOT9f+blHc9br4sMnTUGMQt3iTcRW21QgGYAG3s87O3 r2xUVmQc3vsZoF8t5utlV+u3wCf5CYHV12JD2Tt/oacnpnnJKCDlfKpmMVmPJafNXoTH B1hg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=BjvLns76; 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 m19-20020a170902e41300b001b9cdf11649si8438194ple.275.2023.07.15.04.11.03; Sat, 15 Jul 2023 04:11:15 -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=BjvLns76; 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 S229473AbjGOKzK (ORCPT + 99 others); Sat, 15 Jul 2023 06:55:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjGOKzI (ORCPT ); Sat, 15 Jul 2023 06:55:08 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2116.outbound.protection.outlook.com [40.107.243.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E99435B7; Sat, 15 Jul 2023 03:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S5xX3pAx/5RhPP1ZfTh18J1tIGplrkZTfk3NF3WAKxbT+gL25NV0672/dfxTdxXU25OU7wwi0+BDti+K2/MYskVglE1P/JtbyfbIwq+LaotVIVLgtCrvCJMBj/i1vuM91hmqD+ln0CXd42GS4KMF/XVfxJsC6faBj/uMU5p2tMoXukVK2bBhCQe62jgX+aPzqNM6NODiVgDHsVwwtAsOLOWvs6d6+UqqKCKGYg0Zp3AbrZIeC5w1KSY7FI1syRwIP097acdIEq4PBJjEQL+xk9Qm9vGFXpiqW43L/4hsRozW6xy3mbiwAgVE8/a6HrSMT6IFPjHD6dchqpxK7Rryqg== 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=SuaxMiQ5f2RFmvUf0BkEsBx+X7QRrhoX6n7x1RHbqWo=; b=S1REV2RMr6+WvIj1Eelkt9U+1KnvY0QBRjCCpK3Q8M6Re19aiUPCP4ZpzGJ0TB4oRjpQLqOvn4yVnZ+CIEcA+sbwaL1T3ivfAa2ULkzDdsDE92uj34oFwVbhYhWEqc5QkwJtXVoiTxuBj5mN5HolB9yc1smOI2aOo+2X+BpV2xVFVpw1ZsIaJNcdpXzl6n1iCUMn6vWfD8pXD1iEfMnuhitdNZDXSuZ29Zso9unpr7huYRU9iAv1NGrvQ1a5xku6UeyPuiJVVGilCKjvfZvnwRdxPbPq8HNO/M2Siw0NWdfXj5C2dxVW9fNg0zC9LVmkgsMrW8hiGJXb+b34H9KdBQ== 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=SuaxMiQ5f2RFmvUf0BkEsBx+X7QRrhoX6n7x1RHbqWo=; b=BjvLns76/4cbjhP5hoMI+kEzunU1x65edUpBGid8BcCzoGYlr9rt/1mEI7t806ght+KA/6WhoIf5aqIfOa+n/VD/1B+x0mSQDswyBBX0slk9Q+Lum6zWG4GE7roT9MXo4bMe11B1tm+Xmdoedd6CnR5gldj7cQQHi5roOuLNFMU= 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 CH0PR13MB4681.namprd13.prod.outlook.com (2603:10b6:610:df::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.28; Sat, 15 Jul 2023 10:55:03 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::d23a:8c12:d561:470]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::d23a:8c12:d561:470%6]) with mapi id 15.20.6588.028; Sat, 15 Jul 2023 10:55:02 +0000 Date: Sat, 15 Jul 2023 11:54:53 +0100 From: Simon Horman To: Tristram.Ha@microchip.com Cc: Michael Grzeschik , Oleksij Rempel , Woojung Huh , Andrew Lunn , Florian Fainelli , Vladimir Oltean , netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, UNGLinuxDriver@microchip.com Subject: Re: [PATCH v2 net] net: dsa: microchip: correct KSZ8795 static MAC table access Message-ID: References: <1689295582-2726-1-git-send-email-Tristram.Ha@microchip.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1689295582-2726-1-git-send-email-Tristram.Ha@microchip.com> X-ClientProxiedBy: LO4P123CA0156.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:188::17) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|CH0PR13MB4681:EE_ X-MS-Office365-Filtering-Correlation-Id: 78b48ace-cdae-459e-6a64-08db8521f09d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PVtyzJiuGWtTgPcC/9JI9tTV6DB3Ay9LYNfjK9ApSAe4hLyFsFvQWRbV3RMggepl97Ke01/NSAhKgZ5BnvafqJPbfaXnaL6AB4b2v7txIehvZmRgAUGKfd8yYToFIIpsQJA34EDvu3GjmzW05885Y44T2SHCMvMm/Ge5N/O2k0srQ+0pYBL5bnGPertZIoROoYOkFN9bX2vQpZJ6fvhpMQ6uVHp/nkJWTZzof7JtrNf0chuFw1t/aYgGXm7HQzB2+ywp/Dy3qI6wxjP+Pq+xOsKPwi2OtBMcBxGVfjPiZJf0GnGdGri2l2yVBQ1NILwl7Sn8emzoLjScgHpNIF2BlbLQMJRIlfMI+25MNpmMfAp6sy0+aeIyo1Hay6Wv6aTgmGmzE33tEMZIz2ln0kP59fprCF2elpcjK0Bz/vA6ETG8RWAZNFVEmB9ogmIlSjeeSkYb6oehCtSgSOJxLNOJwPhSk+CPkfzJILblhYPVBd6b30WT676qjWabafvOGrzkxeXXPczlvwlYJij6SW3pBieQMWmWWFPkUDyjn46bgfcNyWAv6s0NLvov7+6is9yBJxi9T4pyaizl0ubSksNesOH02uGhTth/UGL7rEWaGsA= 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)(39840400004)(376002)(346002)(136003)(366004)(396003)(451199021)(8676002)(5660300002)(8936002)(316002)(41300700001)(6916009)(4326008)(54906003)(44832011)(4744005)(2906002)(478600001)(6666004)(6486002)(6512007)(66946007)(26005)(6506007)(186003)(7416002)(66556008)(66476007)(83380400001)(2616005)(38100700002)(36756003)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?rCPsilAZLokz9b0kUaThqwHcGoE5+BYNV5dBqGhyUesdGg5b5z1nrSAUgwaJ?= =?us-ascii?Q?w73OPkV4/TI8YlzPFHf5upbOxrAU9pTe38tvzLsUUktzMJBk0sRsH9SzabJN?= =?us-ascii?Q?lAJk6BzL1khfG5jAJrnMohLDkvjioX4zocnQudkXlVvWlWhpc5OpzuB8g3xj?= =?us-ascii?Q?FEsyGFHP6nIYH70zcMK2OAo4eb/ffx5YzjwkeCS/2QXSunggnoDRU3EVhIqN?= =?us-ascii?Q?uAN3GKVcDKLg8PixglhsuyQ+DPf3wgJ+JlAVIuXHZU2arlZ91j7d1ZDXRP47?= =?us-ascii?Q?417VnPV1mvoFN2CDyYTlRqfT50Y1w5ph+TE3eZ4N8ApSe0RVXa79KgzIQSPq?= =?us-ascii?Q?WuazF6Pq9+lzGFIIUNECD5z2AjFd/LAkt0U1HLcBkmt4UDhflJmH8kZQjGNE?= =?us-ascii?Q?p/P8LBNLJNonkuWhgjo5vfdJ0kQcYk6Li6gsSdNJ67Jep6QaeEBttayxvTwi?= =?us-ascii?Q?vnDMUeCJ1jGe1WfHHcWbIR+Phw4w5wYaSP5nZzsuhl6Iv21ytxhvlW2b/Otc?= =?us-ascii?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AxI?= =?us-ascii?Q?aw5MAy8XMzU1wTRW92MUJOB/moF2XXRlNwJQAXdGrJvSgiW6i0WwQ2eZU3Eb?= =?us-ascii?Q?cN07Aizxbeqfb51vy5NpHKMuXG4o8MlJs28/AEdvIYdOCpWJdKSBWONd/scc?= =?us-ascii?Q?JieG8RwDNzlrMKVIEdm+gjXTMsj2LTmRQK6On17yg3b67zj1MHOp45w7R/aB?= =?us-ascii?Q?1g=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78b48ace-cdae-459e-6a64-08db8521f09d X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2023 10:55:02.1572 (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: WXYnDC9p+f5RWHTQjAAQmpTVH2CQw11LeTVs4Fw2c65YOGe/wrNQOxEdNsd8dGR81MKDXrgSr9D48ZiZx/1IkQkpsoPTHSfgBIpUZd2FJSU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR13MB4681 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,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, Jul 13, 2023 at 05:46:22PM -0700, Tristram.Ha@microchip.com wrote: > From: Tristram Ha > > The KSZ8795 driver code was modified to use on KSZ8863/73, which has > different register definitions. Some of the new KSZ8795 register > information are wrong compared to previous code. > > KSZ8795 also behaves differently in that the STATIC_MAC_TABLE_USE_FID > and STATIC_MAC_TABLE_FID bits are off by 1 when doing MAC table reading > than writing. To compensate that a special code was added to shift the > register value by 1 before applying those bits. This is wrong when the > code is running on KSZ8863, so this special code is only executed when > KSZ8795 is detected. > > Fixes: 4b20a07e103f ("net: dsa: microchip: ksz8795: add support for ksz88xx chips") > Signed-off-by: Tristram Ha > Reviewed-by: Horatiu Vultur Reviewed-by: Simon Horman