Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2580944rwn; Fri, 16 Sep 2022 12:34:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM50/GKkXnf7g1gBkJEUq6o8wug90b3hhMN5GyJx2Sq3bIYq4r9uFk2u1tDgUNqil4YOEtCI X-Received: by 2002:a17:907:629b:b0:74f:94f3:786 with SMTP id nd27-20020a170907629b00b0074f94f30786mr4543958ejc.606.1663356893803; Fri, 16 Sep 2022 12:34:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663356893; cv=pass; d=google.com; s=arc-20160816; b=KPCmBCvBcMpFOaDfDuexEV0nv9sWEdyC1hR9SFO53TNXj0/S/MAgqpaG60XHyEfYni cdzHC72r9CzlSwFJNX6LpuACBoJKUH4LxrpuCk60aT7pBeaRcT7KK7w2DJkItbG6RX/y B7L2lHBMW2ZTwT1nseOob4dfuAJGpA370brOt0DDUgSU9y5vebozxVYOgKPB3ICqbWCO NUmdd2vxWxkpN+VAwU37d56j3cX3JNrDD5QFbJWemYxdkuOTDRgYlOyMWxUz1eYbS8tS EmM6ZbZJrK4k4IoEdMoVBJiHjw39JpZvOMWTovbBL7zAV5jKgXJzs3VkPXSiDUME48j4 pg4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=xH/FiaOPFENc+GAD97kihRXe7kaIlIA39qEztYg7KQM=; b=z4EJG44IY80CjBbyVj1hmcsXwUBbzvsB3eLDi9Ky5TD76X3QjNCUzPvHiAb5NUpkyl OPSFn6yrwdpdb9oCN029Kp7QkyApnyccauVrG2NhyDqPu2NMWxHMcRYUC3fEY/0GBsP7 XdDX1eerKopt3oaBrrIXYuNs6GDN6x+Ajj2bwKIpp734Sa5wupr1jxQRGIOR4exus8iu IcE8Ox+Z5zIILGK0Edmiis6J742rsUbZ4MNeBX1mUq37J0DfuukHixgLu9Q7UXf8ZqMw 8tMvdy4sBilfQtQ4dHOOorZEeumf/770pR17NYrqydt/lx/E5c40BIhb/ukKiqjLaBAU nfUw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=OzvQGZbN; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.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=in-advantage.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xg14-20020a170907320e00b0077f92be81adsi15830019ejb.212.2022.09.16.12.34.28; Fri, 16 Sep 2022 12:34:53 -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=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=OzvQGZbN; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.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=in-advantage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230099AbiIPTOI (ORCPT + 99 others); Fri, 16 Sep 2022 15:14:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbiIPTOG (ORCPT ); Fri, 16 Sep 2022 15:14:06 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2131.outbound.protection.outlook.com [40.107.92.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0056B6D12; Fri, 16 Sep 2022 12:14:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lJmTYMg9TLZz/IDwpHUL6QHt8PG4nax6eRp+fhJkWwDVafosSShV16ieHqf7G8aaVJJJ7HM4Nj+Df1ualVgj2BeVD1SZa239DsuIl6PhmmXD0TnhHhwhwq1zrsK1q9+/aJSb6Sgk+E94xyqsrtIVG3p/K/aOh1TFfRxI54Mdv3coW6l2IW9ycSnfwUPZae4rzq0O5cgMHASfHTk7rQWZi4QwdxBmxNoBl+NzJiziTBG9LyLfFkPxhhh6mBRrqQA2QGK6yt3g0f/bL6PfcR2AVAuLnS00RLhC6btEMDwhdWU20+/FlpsD/dL+7StRa4+ZRuLcBxqO54dt1Tu1d3LpXg== 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=xH/FiaOPFENc+GAD97kihRXe7kaIlIA39qEztYg7KQM=; b=BfJSl3oyPTjQUw0shZJqfJGweAyVMw0myEukTzmfyHK2QEweqAwXdIqvW2qPRc2hDVW1mTCYLufVXrxGWFBR2ZTspFvcXHqEIlyaxBL5hCcNhGd3vpWSjEvNHXFUW0+OzkslTIk0tCMZdlRDdeU6anO8WW+JGBtotKGKNVKRddRSPbSyavvj2zEfx34lClI6G+JKKGRJlKCkANCRknZG78fdiEjOzErr0osPsJF+scjLc/efr5t32yOwNTvHKV6oWEXD3IKGChzhDYKAqcz1sJatfpiTYj2tCtmKO4FHnDCw/h+B+2uvoXAqZQv9CEdweBNgYBpudwYbJjeVoziaaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xH/FiaOPFENc+GAD97kihRXe7kaIlIA39qEztYg7KQM=; b=OzvQGZbN1pz+qBQS16WMfTrV9ot4GgHubF9/EERgq+ve/x5WJzHjh0enwSNDH+dw+982mCKxDUE17/GySiug6ysxf9gN+yA6JYLQSglXKbukKkzS7u2OzFyUejCsjAQBO//dF89xx0wsbqqfcNY1yZUK8Xcsm0HG+MOLYciy0OM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by SA2PR10MB4492.namprd10.prod.outlook.com (2603:10b6:806:11f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.17; Fri, 16 Sep 2022 19:14:00 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::dcf2:ddbd:b18d:bb49]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::dcf2:ddbd:b18d:bb49%3]) with mapi id 15.20.5632.015; Fri, 16 Sep 2022 19:14:00 +0000 From: Colin Foster To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Vladimir Oltean Subject: [PATCH v1 net-next 0/2] clean up ocelot_reset() routine Date: Fri, 16 Sep 2022 12:13:47 -0700 Message-Id: <20220916191349.1659269-1-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BY5PR04CA0015.namprd04.prod.outlook.com (2603:10b6:a03:1d0::25) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2351:EE_|SA2PR10MB4492:EE_ X-MS-Office365-Filtering-Correlation-Id: 9625227c-cff2-4d59-9646-08da98179c6d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xVBQAern+bYaW/WQevHnSYxJH/Mto8ZtODjN9uLgsx04XjkZaQbcrjAPH3Jidb1cdaWGSOu8lg8S3nyFyewJ2SqYdAh7lzLmyITlb0Gfj6CW7/Bj/Cg3Xz9AnXjaePRTdexrzNcPcPt6+Dr1NsI1SVbAPfi+A9gHj5KiCuVy7+M9OmEkBgug8q+0KIGhILKzkBfzqnQ4vJViwSEsOeiJ46tQvNbTCMueqi65hEW7p9KiiwYs/+LkUcEdDmMorot0rf9XYLubxTaY7HId1D2qibylL1kLI2JlNnC4bjs7J5y/WwaHauGfOGymmVSOe9igJhIi5AZmD9BRD1obL3qyAFlexBsZfI7KPOjtnQm/SBVBKLSHhYCzEqy6k8LsJpOYkf5pwnBZsOsvZHalukSLDlrJiOMGsQq72TdmvV9ebeKEcKGww6VSMv5vSU9kzTjHtve8IMYqJZI8ydkSJx1sj4oe2INMXAN7ZpurJpCmooG+8KiMBgDm8+22/wV3iwfw1BYgqq3t/bJhOSUL117rhG19cPUi2593+SF21KgIgcsuvHEr0Ds6J9uUPxTm+sl7sSflgNyZHW1gjIrwAxOqPXhCL6VP4JOL7dO7Gg79ieSi5boW+YQn8zAJxpwGAlFF9E6RhnuViS61zv1iIuKAKQkLOeQErYQdNyaltf7TPzyWKyjhaMDPEG3gPSv1mpITUHYAk6/BcJpotCG+wMMOy/sSo4SzccpJplZnJr0IJI5mBNaJTjRUG84QgtFSyZgJG/eiYT3L8ptJqVHNrkFy9g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(366004)(39830400003)(396003)(376002)(136003)(346002)(451199015)(38350700002)(38100700002)(86362001)(36756003)(83380400001)(44832011)(4744005)(6512007)(26005)(2906002)(478600001)(41300700001)(186003)(6486002)(6506007)(2616005)(1076003)(6666004)(52116002)(4326008)(66556008)(316002)(54906003)(66946007)(5660300002)(8676002)(7416002)(8936002)(66476007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?BAMtj40vVYvzE6HoJeEqe9+TQrz7ogwH0BwGJD3wSFM08jnbRX1VvHlNH0eh?= =?us-ascii?Q?XFpu94z0EZ/eWnnW4VII1ONxWOY+86D5diZ0RpPHZ9JPTxjYaNpm86sadQD0?= =?us-ascii?Q?zOHC/+qtSlVrHTehXBkcPrxr2th+o/zoibK2ZBteLxOJ+O0lgPoxwMNxud7P?= =?us-ascii?Q?6NTVEaByaDYypChsw/ZJX6FIe8ZzUulXwC0mnT4wfdE9XT9w1LdpWcy//KkS?= =?us-ascii?Q?TeiFGKYtZM2PKgOk4wBeVMhmTJZjEsqEFLqQtpAh/SUYVqGvgKoI5Q1SOSez?= =?us-ascii?Q?VOhnnoEODwvF3/eHgaiMSfIFe5ugcrMWcxFvZwTrVA6AMHyGKYa1NLJB9MhF?= =?us-ascii?Q?IAiCupHHvHugyVzhynmVd6HWAedGFolAKFNJabimTdawFJrDR5WACyTz2X1e?= =?us-ascii?Q?OJRR28OOhAOrIMQQaqirRLPU/WTMN4haUjh3Xu+V9BuFVrE0Z4RSMbwhCnHB?= =?us-ascii?Q?dVmn0EH1HaNPASy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wMsDhQJYEt/5lP0RcvZ6wL53KF04sKEqpe7h/Ln9LqV+y5IV9Puzkh1gTbs?= =?us-ascii?Q?UFUU6m7MWYEse/Q5YSCoYgIRAFn+Aa6MPBBBFnueX9Jv1Lh/E6jiVIE/zh8L?= =?us-ascii?Q?CVpyZcWiMiKzr0pMRobJfeUEf8ThAftBoobnNWk2TiTIkoMCrz29vrtdEQmR?= =?us-ascii?Q?8zcXuZq0ck++2Cr3rcTJjMPEOB6dTOvc3SmsxCx+4mBDAmBBCTW0xSlgfbhA?= =?us-ascii?Q?dQ=3D=3D?= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9625227c-cff2-4d59-9646-08da98179c6d X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Sep 2022 19:14:00.4631 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0ofDZZG79V9d+LpfevYLBxTHwuBzR3rlYDrzTiRUePBs/nYsQnSPRvUzmUA5nBf1npcgM9qxm3wtMQ5+00vWv4bcPwebQMgcTWyiWKPIjmI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4492 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 ocelot_reset() will soon be exported to a common library to be used by the ocelot_ext system. This will make error values from regmap calls possible, so they must be checked. Additionally, readx_poll_timeout() can be substituted for the custom loop, as a simple cleanup. I don't have hardware to verify this set directly, but there shouldn't be any functional changes. Colin Foster (2): net: mscc: ocelot: utilize readx_poll_timeout() for chip reset net: mscc: ocelot: check return values of writes during reset drivers/net/ethernet/mscc/ocelot_vsc7514.c | 48 ++++++++++++++++------ 1 file changed, 35 insertions(+), 13 deletions(-) -- 2.25.1