From patchwork Tue May 31 19:58:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12866089 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B394C433F5 for ; Tue, 31 May 2022 19:59:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347568AbiEaT7N (ORCPT ); Tue, 31 May 2022 15:59:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347556AbiEaT7L (ORCPT ); Tue, 31 May 2022 15:59:11 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2052.outbound.protection.outlook.com [40.107.22.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0C6E60052; Tue, 31 May 2022 12:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O2KfFDJ52Bq4gC1a0MHNyoU+8sJWRblRl5/Y9zuVZ97b60M1KIA+cgxUGX4Hs7xj7C55ixWdk1eQXSFFkuB5bQ8V5QFmyEVkzZpEdQa0MleRBKiBT+an8FaXRuBw/Fp6u9Z96dCUQOQ3odMHi9WYq3CzPitYCSJkThE9I0p/5deUqm5nJ6etABu6W3QCMPZh2DEiyGNRpj9mzEBdYveqWTK8R/KLCmauQcGOH8+1BLPGlKwkZ1pNRcwZ1tgiMR8j/YNMZ2APri12xaRWg0J0bntz3wgzQ6uKuMdQrwVHpLL5tbFwaSIFIyKqqvbdEB/QWLi2I044f8uJqvEfnSonuw== 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=RFFiVc3z3oa09sMrpNC0EwHzT/YrqXPKFtVLUM1yg2w=; b=nrKpCVMbca5zNMJ/tjNhNGpp0mI4O0XO8qbFwdXfMn4iWcBCoPvRortSBFQ2fHRrB49H/Hq6GFXM9cWU5oyOC9yIW4NlELLKG3Z8pQuTNtPSuRTMJ8W41vvhczS+h2vvKxsgPVf4aKfCbqCOTHcDxVqw92PBQBqUcx8VIWvGXpk0pb1Cyv1XpnKUZmdKM7OcIvRS4Q/kKU1fl1JcvR9GmdimNyOis0tlozpXvlj7NDgj+HmY/CPE/3x5AE6ieq5ht51wTUbVDIMy/QSAkVbHcOLV9lZBhJysvzhqXS26MbSCwR9A9KVdCC9zClLOP+QIZaJdzZjW0WaQXLs5X2VHrQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RFFiVc3z3oa09sMrpNC0EwHzT/YrqXPKFtVLUM1yg2w=; b=TeXq/AwKS6CnT2acTDyATIexvtVKfgqiyaQaKu9t/lsd5FnZKCTdKqs9MIBY1fuAh7GKA25vDBpHp8I+l31xuxsRK5SCpll4ha4fH1WgvK4VP17ksK7VZ2DYjUN4ySTC73Bs7GQOIhZ1G78Gov+Qlym3AxboWDveNab4j417EK5xDwq1AfMwbwa2iieL/DnQ+yj4h+fDqg9PxNyaOiTkDTDc2oklm4iRMdfxG5K0YIFInORFVuFwQzaaY4U1LKjPTICSrp8F9heCs1rC1KKTxX7YjtaXDG8aOaJcF8X8pgRV/EFhV8X88w7R41MTzWW5NSMh0/+7DYeEZjeiVz4FvQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) by PA4PR03MB7309.eurprd03.prod.outlook.com (2603:10a6:102:102::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.19; Tue, 31 May 2022 19:59:03 +0000 Received: from DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::c84e:a022:78f4:a3cf]) by DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::c84e:a022:78f4:a3cf%6]) with mapi id 15.20.5293.019; Tue, 31 May 2022 19:59:03 +0000 From: Sean Anderson To: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: Madalin Bucur , linux-kernel@vger.kernel.org, Sean Anderson Subject: [PATCH 1/4] net: fman: Convert to SPDX identifiers Date: Tue, 31 May 2022 15:58:47 -0400 Message-Id: <20220531195851.1592220-2-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220531195851.1592220-1-sean.anderson@seco.com> References: <20220531195851.1592220-1-sean.anderson@seco.com> X-ClientProxiedBy: BL1PR13CA0113.namprd13.prod.outlook.com (2603:10b6:208:2b9::28) To DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1242912e-6660-49b1-c01d-08da434002b7 X-MS-TrafficTypeDiagnostic: PA4PR03MB7309:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7AwPR8rh0R12FgWre85YC9HKXH6b2iVouz/ULTTIfZ0Fewkcw/QYG19215aX8W+A7sr7fzAu797G6msqTH/dvOoeOVQiLoTcNIiJB9cJVcw9DKqYD/DyAcWAGAYDGdpo2tsRHqbLJ+J09pFuz98oor/JppZ+xkzzr1TzDsSeQeo+RiLwNHV2pyK+DH61rzmIhks2O4yprTdYqzg9fWW/v7Gf984UIvWzbRDFiTa5e3Nsb54o0zx3fhr2vk1QHZZn6qS4HC+oIZuwR3la59Y/YmkPnohl9Myhoqx2XW5b0JU1k6mJO8yPYxwMbn0rn6W8dgJItGAczS1C1aJlGZso0hHVNwdrV7R+fgiYtnrdZd9L9MZvKZ85frgSMZ5nva7WXt5N19JilCVnuF6V+R+juzOaBAl6I07qGeG9reRgFIOQUveTI7zLlzqS0yRasQxSxkSVH08fA7aDzFlXV1T1qMV6wjzvW0sOihWNfD688ajwkJDEgVfklK2L3B3X9c6k3K0+XDoC5nh9z5u2QrCIuW7k7f5/HARQSsUgyZ89lZJAflRJSP0/hmaSVHOu5kKISBuXfu7H1HAOVUhP1fNQhADtWWuKWzH5ip4n/5gtcCtiWbpDkOzkojE/eDm99qatM5Aa5vmj/TL0zoGvEVGvHtaGxQO+syye6ffNCPNx91skqrhwXxcwMCKrJBy0kVaKlhz0nodTt1UEq7yG3dvtX5ErgBrL6KwkjbPINsppnAdcmqseuLUIeBgfnBts/rSCR6QOUfpnrYb4289mgnmA7w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR03MB4972.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(38100700002)(186003)(1076003)(107886003)(2616005)(38350700002)(110136005)(54906003)(36756003)(316002)(4326008)(8676002)(66476007)(66556008)(66946007)(83380400001)(8936002)(508600001)(6506007)(86362001)(6486002)(52116002)(44832011)(5660300002)(30864003)(6512007)(26005)(6666004)(2906002)(2004002)(579004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 46fvNMjE7fVOOXdwbHoygXGmI5iqh8Dx4UIXPdMfersRzbduCWnYIhJ46eBrBGOdczQCvlEoJiTgWrDn+YjU48kcAXtJMwhU3D+/Z1GtWFVWx+bm50Cqmj+D/l+b/zRheuOzjjTVzSRsdbuQdlGq1m0QfiS3HiFmtUrfxNoJlRpdaLZa0WcVT2RJNDgH8/w+quUeyVGBk91ppfU5JsCfo51f3iVfRe3HjJQDFXcYtaRpiwnuwz+0qDIdVla4uKdh6JZxmybZq1IOS1tCTnUlQ+Ot0n2IwSk0Rc3ncj1NeKyCsaUUJwIGJPEU74vZCfk2FHwDlCvv715jzINS4tdrRd26LRYtp/h03qAVN9t86WybMDef9IO1EMFtEoiO6iJ/YW4Tf78bcm9SFNiLBR07d1nhrfbVG/s43UFozyVgQmfw2CQ1nJ8eCvGfVOepgatYJzjWCvjxONepjcoT/wkBcKIVcfqSfXtGDo+UfXNvqxp9Sl+jouyjI+Eka/+TM2V+TiQ37YzMd1YsJVABQHosh+rgaSKXHkJGMqLmJN3vBlFcxAztuMCmYUk05NGlmNVZanLiup41emPRUiXa3zkGNPugNAXfAWyt9hSSihP0k0b0lq8jkMbFPcVZo/Qlf6PiM7pasiQaDM+57qnuXzSH9MoN4ADdBIvnwm0PEdpfDC8AotS86jiwLQRZQ1EksOEdTACdhIMH6bFX1/Dlggnr0BeMjDDvaSn1diHkiA+SSfUr0M+9RzbLDOzpE1V8JfAYWlYj3y0THY38Ec7or2G4m9WEOMa7fLzS3G45DkZN6ZNUYLYIDj7AvmQHB8Ko3zihamJsQ+R6hEZmNP4HDTRz5P+cq/FSHKsrhhV/rvbllB5VB/5bO5iJcE/33LkeC0XKG7qYwd2zFN0Baf91SE4mU7fpXMITc9jw0l2rb+aODw9oca9NFAvhEB0Gp9VayspHTOpyuiC9Mh0jQtmggsoKQpCgsMtb+DCb7ndXbDlgn4liIu+Wu05lWjBjQSndyC15wjB1lv5WNvOzw2BzW4NZiv6b4+A76PtOAypHRptAX5n7AQ+sqtMJlh2RQnEjxES2dLPOjEBXB15O/LxdPfByJxFc4q1xVBb9z2SIO2ePnihN4R1WFHTkiBLDpAfBiUFvPcJPEklfHT5Zj/aPKHyh28mHRGjaPpGYwa1FFpd3gzAa1SqhdXPR50svlhN0fWz7oPOWeadddpCMIPQUAQcjQuzAxM5kW43JZTwUOvzifT56EmV8nuT4sf6wg/UJWV2sDiamF+6RltqigqOnAgUX1sLocjCdAk9YAKCUlIqPVKYBiVsRoj+1DjXw/UAAJK0VsO/nUYVV8dLA46DZsQ0sAeUp9YRtxmjUutOHGCh80jaAildJAJALnb4lwYoRSo+QDlQmIQBlaDcKD9RXjviQh7VRQjr8AGKtD5yEMUZGTrIZWjtw26PJT7XHoMvXF1t6uR/7nPAF48LnC4nuvw4mQ7kYudfwGe9fpSdUBylkBKSBkn8CiFKfe9Ufy640MLQAVHKOXQFKZRRsXqFIeq71J8tQyiXjTIAnoE1T3sZnNjhZwm67ycis7IJpYCQpKaINSppliLmWNLIDgU3+yo/sY0q9zDTDdOVjG8eTF57gn5cAXwMcSd+Z9hQ+BXi7ofQCZrkKwvJbNAi5wIY96J59xtWjeQqAXXCZb7YcMu1jluxjeViQk23WO+1FmZGcS1C0yWEk4ZS3kySGBR2QW3H6YqtR7OFMHUa1DX8fgH+oOo4= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1242912e-6660-49b1-c01d-08da434002b7 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4972.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2022 19:59:03.1879 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pDbZ4stJI5ueHs4BO7eMwKO2h+zVJo0wODfrOnyR0qAv4dn8kQYEAocUlkxBs72q95zFx9mrJkNfaCfIZeARZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR03MB7309 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This converts the license text of files in the fman directory to use SPDX license identifiers instead. Signed-off-by: Sean Anderson --- drivers/net/ethernet/freescale/fman/fman.c | 31 ++---------------- drivers/net/ethernet/freescale/fman/fman.h | 31 ++---------------- .../net/ethernet/freescale/fman/fman_dtsec.c | 31 ++---------------- .../net/ethernet/freescale/fman/fman_dtsec.h | 31 ++---------------- .../net/ethernet/freescale/fman/fman_keygen.c | 29 +---------------- .../net/ethernet/freescale/fman/fman_keygen.h | 29 +---------------- .../net/ethernet/freescale/fman/fman_memac.c | 31 ++---------------- .../net/ethernet/freescale/fman/fman_memac.h | 31 ++---------------- .../net/ethernet/freescale/fman/fman_muram.c | 31 ++---------------- .../net/ethernet/freescale/fman/fman_muram.h | 32 ++----------------- .../net/ethernet/freescale/fman/fman_port.c | 29 +---------------- .../net/ethernet/freescale/fman/fman_port.h | 29 +---------------- drivers/net/ethernet/freescale/fman/fman_sp.c | 29 +---------------- drivers/net/ethernet/freescale/fman/fman_sp.h | 28 +--------------- .../net/ethernet/freescale/fman/fman_tgec.c | 31 ++---------------- .../net/ethernet/freescale/fman/fman_tgec.h | 31 ++---------------- drivers/net/ethernet/freescale/fman/mac.c | 32 ++----------------- drivers/net/ethernet/freescale/fman/mac.h | 32 ++----------------- 18 files changed, 33 insertions(+), 515 deletions(-) diff --git a/drivers/net/ethernet/freescale/fman/fman.c b/drivers/net/ethernet/freescale/fman/fman.c index ce0a121580f6..56c65c43c7f6 100644 --- a/drivers/net/ethernet/freescale/fman/fman.c +++ b/drivers/net/ethernet/freescale/fman/fman.c @@ -1,34 +1,7 @@ +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later /* - * Copyright 2008-2015 Freescale Semiconductor Inc. + * Copyright 2008 - 2015 Freescale Semiconductor Inc. * Copyright 2020 NXP - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/net/ethernet/freescale/fman/fman.h b/drivers/net/ethernet/freescale/fman/fman.h index f2ede1360f03..2ea575a46675 100644 --- a/drivers/net/ethernet/freescale/fman/fman.h +++ b/drivers/net/ethernet/freescale/fman/fman.h @@ -1,34 +1,7 @@ +/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */ /* - * Copyright 2008-2015 Freescale Semiconductor Inc. + * Copyright 2008 - 2015 Freescale Semiconductor Inc. * Copyright 2020 NXP - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __FM_H diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c index bce3c9398887..38badacfdada 100644 --- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c +++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c @@ -1,33 +1,6 @@ +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later /* - * Copyright 2008-2015 Freescale Semiconductor Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * Copyright 2008 - 2015 Freescale Semiconductor Inc. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.h b/drivers/net/ethernet/freescale/fman/fman_dtsec.h index 5149d96ec2c1..86f3b74ada03 100644 --- a/drivers/net/ethernet/freescale/fman/fman_dtsec.h +++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.h @@ -1,33 +1,6 @@ +/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */ /* - * Copyright 2008-2015 Freescale Semiconductor Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * Copyright 2008 - 2015 Freescale Semiconductor Inc. */ #ifndef __DTSEC_H diff --git a/drivers/net/ethernet/freescale/fman/fman_keygen.c b/drivers/net/ethernet/freescale/fman/fman_keygen.c index e1bdfed16134..e73f6ef3c6ee 100644 --- a/drivers/net/ethernet/freescale/fman/fman_keygen.c +++ b/drivers/net/ethernet/freescale/fman/fman_keygen.c @@ -1,33 +1,6 @@ +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later /* * Copyright 2017 NXP - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of NXP nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY NXP ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL NXP BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/net/ethernet/freescale/fman/fman_keygen.h b/drivers/net/ethernet/freescale/fman/fman_keygen.h index c4640de3f4cb..2cb0df453074 100644 --- a/drivers/net/ethernet/freescale/fman/fman_keygen.h +++ b/drivers/net/ethernet/freescale/fman/fman_keygen.h @@ -1,33 +1,6 @@ +/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */ /* * Copyright 2017 NXP - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of NXP nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY NXP ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL NXP BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __KEYGEN_H diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c index 62f42921933d..8b2b4fb411ec 100644 --- a/drivers/net/ethernet/freescale/fman/fman_memac.c +++ b/drivers/net/ethernet/freescale/fman/fman_memac.c @@ -1,33 +1,6 @@ +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later /* - * Copyright 2008-2015 Freescale Semiconductor Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * Copyright 2008 - 2015 Freescale Semiconductor Inc. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.h b/drivers/net/ethernet/freescale/fman/fman_memac.h index b2c671ec0ce7..e1d62a7df367 100644 --- a/drivers/net/ethernet/freescale/fman/fman_memac.h +++ b/drivers/net/ethernet/freescale/fman/fman_memac.h @@ -1,33 +1,6 @@ +/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */ /* - * Copyright 2008-2015 Freescale Semiconductor Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * Copyright 2008 - 2015 Freescale Semiconductor Inc. */ #ifndef __MEMAC_H diff --git a/drivers/net/ethernet/freescale/fman/fman_muram.c b/drivers/net/ethernet/freescale/fman/fman_muram.c index 7ad317e622bc..f557d68e5b76 100644 --- a/drivers/net/ethernet/freescale/fman/fman_muram.c +++ b/drivers/net/ethernet/freescale/fman/fman_muram.c @@ -1,33 +1,6 @@ +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later /* - * Copyright 2008-2015 Freescale Semiconductor Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * Copyright 2008 - 2015 Freescale Semiconductor Inc. */ #include "fman_muram.h" diff --git a/drivers/net/ethernet/freescale/fman/fman_muram.h b/drivers/net/ethernet/freescale/fman/fman_muram.h index 453bf849eee1..3643af61bae2 100644 --- a/drivers/net/ethernet/freescale/fman/fman_muram.h +++ b/drivers/net/ethernet/freescale/fman/fman_muram.h @@ -1,34 +1,8 @@ +/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */ /* - * Copyright 2008-2015 Freescale Semiconductor Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * Copyright 2008 - 2015 Freescale Semiconductor Inc. */ + #ifndef __FM_MURAM_EXT #define __FM_MURAM_EXT diff --git a/drivers/net/ethernet/freescale/fman/fman_port.c b/drivers/net/ethernet/freescale/fman/fman_port.c index 4c9d05c45c03..ab90fe2bee5e 100644 --- a/drivers/net/ethernet/freescale/fman/fman_port.c +++ b/drivers/net/ethernet/freescale/fman/fman_port.c @@ -1,33 +1,6 @@ +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later /* * Copyright 2008 - 2015 Freescale Semiconductor Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/net/ethernet/freescale/fman/fman_port.h b/drivers/net/ethernet/freescale/fman/fman_port.h index 82f12661a46d..4917fe8f0617 100644 --- a/drivers/net/ethernet/freescale/fman/fman_port.h +++ b/drivers/net/ethernet/freescale/fman/fman_port.h @@ -1,33 +1,6 @@ +/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */ /* * Copyright 2008 - 2015 Freescale Semiconductor Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __FMAN_PORT_H diff --git a/drivers/net/ethernet/freescale/fman/fman_sp.c b/drivers/net/ethernet/freescale/fman/fman_sp.c index 248f5bcca468..0fac60aa5283 100644 --- a/drivers/net/ethernet/freescale/fman/fman_sp.c +++ b/drivers/net/ethernet/freescale/fman/fman_sp.c @@ -1,33 +1,6 @@ +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later /* * Copyright 2008 - 2015 Freescale Semiconductor Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "fman_sp.h" diff --git a/drivers/net/ethernet/freescale/fman/fman_sp.h b/drivers/net/ethernet/freescale/fman/fman_sp.h index 820b7f63088f..a62dd21c81f1 100644 --- a/drivers/net/ethernet/freescale/fman/fman_sp.h +++ b/drivers/net/ethernet/freescale/fman/fman_sp.h @@ -1,32 +1,6 @@ +/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */ /* * Copyright 2008 - 2015 Freescale Semiconductor Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __FM_SP_H diff --git a/drivers/net/ethernet/freescale/fman/fman_tgec.c b/drivers/net/ethernet/freescale/fman/fman_tgec.c index 41946b16f6c7..49930a5f2991 100644 --- a/drivers/net/ethernet/freescale/fman/fman_tgec.c +++ b/drivers/net/ethernet/freescale/fman/fman_tgec.c @@ -1,33 +1,6 @@ +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later /* - * Copyright 2008-2015 Freescale Semiconductor Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * Copyright 2008 - 2015 Freescale Semiconductor Inc. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/net/ethernet/freescale/fman/fman_tgec.h b/drivers/net/ethernet/freescale/fman/fman_tgec.h index 3bfd1062b386..3b4ecde09bba 100644 --- a/drivers/net/ethernet/freescale/fman/fman_tgec.h +++ b/drivers/net/ethernet/freescale/fman/fman_tgec.h @@ -1,33 +1,6 @@ +/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */ /* - * Copyright 2008-2015 Freescale Semiconductor Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * Copyright 2008 - 2015 Freescale Semiconductor Inc. */ #ifndef __TGEC_H diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c index 39ae965cd4f6..2b3c6cbefef6 100644 --- a/drivers/net/ethernet/freescale/fman/mac.c +++ b/drivers/net/ethernet/freescale/fman/mac.c @@ -1,32 +1,6 @@ -/* Copyright 2008-2015 Freescale Semiconductor, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later +/* + * Copyright 2008 - 2015 Freescale Semiconductor Inc. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/drivers/net/ethernet/freescale/fman/mac.h b/drivers/net/ethernet/freescale/fman/mac.h index 824a81a9f350..1ea5fd32f689 100644 --- a/drivers/net/ethernet/freescale/fman/mac.h +++ b/drivers/net/ethernet/freescale/fman/mac.h @@ -1,32 +1,6 @@ -/* Copyright 2008-2015 Freescale Semiconductor, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Freescale Semiconductor nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any - * later version. - * - * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */ +/* + * Copyright 2008 - 2015 Freescale Semiconductor Inc. */ #ifndef __MAC_H From patchwork Tue May 31 19:58:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12866088 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA41FC433EF for ; Tue, 31 May 2022 19:59:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347522AbiEaT7K (ORCPT ); Tue, 31 May 2022 15:59:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238617AbiEaT7H (ORCPT ); Tue, 31 May 2022 15:59:07 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2052.outbound.protection.outlook.com [40.107.22.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 605EA60059; Tue, 31 May 2022 12:59:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ub/VwAhZ6JAWjDQ6PBZej4XClSJgfufvEsIKPxpUV7S/6+yZYwTdsPhrA5aJ5yqEOd6HR+iKvmAuORfbyO8mzFbQeSexIIdht2TBHMe9jeBJkAXdW7K84otSKIIQFJoZZ+oZjsdc4c3FPoysXcvQW549AxzAZfYm/Ivg0IQCqanCHPVlSmDHRzRmRKKWz4tR5L8uRffLzaZG6XopL8rhV/k37Ish7tvHH+L8b9NuJMYkbbDDebFtWncBTndZmUIh/3ktfa7yNqPbWfGO4KjO+V5bUgc1LPRpQJRiK4kOHDKUljOKqgifCcBJiyw2MztEg81faQB5jx04Kx3pVptF2g== 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=B5mH/UZ1qBnxqfYc2zkN13wFTSzi95vmeuby34wjWq4=; b=aazz7SPRvxlWfN2mhd8pLxLodg3ACnxc8ZJSbkHJT84lF/PGqr7elqzIy/1l+isJZWIC2SCcCmbSlxjp9HyvdRdrb8+E9xBiu8vHZEZF3MfEioEb+kdA8mbtVkFxZX5SW7gKAsq9hPIG7QZ56Pf2m9YSVbThu44ZGorWhBJ1Qcg8hx5ZdLKKQN5U/RCXtJBerK3sY78NSr3WndhUpZziZyX9y4wSLOlfKCImwnU/s8InwVqSjM087YzjH8f7iLvzwurTSXCBcPqvkC9bfYXVilgs3v9TUBhRNTGJCpAy5JY1S5VLTbB6kjFrYwlfb8coW0WvHge7glRm/KxerQfb1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=B5mH/UZ1qBnxqfYc2zkN13wFTSzi95vmeuby34wjWq4=; b=w+M/5U5IqdMWXZ12TOl55YxDdcfbwHle7s18f29VZ0fsbZ9duzha5hYCS1oDw9kOyw1EQR998VlBMhG/lDhfGCtq5HqULNMOmcn9L4j2qafaSd+luLZ4kMfdzjPsuWYvYKazf0WR1G8ku2b0SvSwz1rqsXkRbvUB0hgWDQ+777BJWZbHdlxovdEPGfNHJRwc7mbGUHebr04ht/f4tfeb+q+OaLfFUUkGC2X3R+icPBRlOEBpWAmV/RLrT5D5k5qcZlk2ssvMeg5CgOVyamNEMnV9NJEOEN+9v0TwNZy1YFNhQrLAtIdy8H1JGLXkyrLOECM6sbTEOfT0ft4HALz+0w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) by PA4PR03MB7309.eurprd03.prod.outlook.com (2603:10a6:102:102::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.19; Tue, 31 May 2022 19:59:04 +0000 Received: from DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::c84e:a022:78f4:a3cf]) by DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::c84e:a022:78f4:a3cf%6]) with mapi id 15.20.5293.019; Tue, 31 May 2022 19:59:04 +0000 From: Sean Anderson To: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: Madalin Bucur , linux-kernel@vger.kernel.org, Sean Anderson Subject: [PATCH 2/4] net: fman: Don't pass comm_mode to enable/disable Date: Tue, 31 May 2022 15:58:48 -0400 Message-Id: <20220531195851.1592220-3-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220531195851.1592220-1-sean.anderson@seco.com> References: <20220531195851.1592220-1-sean.anderson@seco.com> X-ClientProxiedBy: BL1PR13CA0113.namprd13.prod.outlook.com (2603:10b6:208:2b9::28) To DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 04dffae2-2f4b-4d32-8b6d-08da43400389 X-MS-TrafficTypeDiagnostic: PA4PR03MB7309:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D9m/WS+PtahWi7asTli5qPBgxH8MtK0bEJaKhN+KUsYus4sHgXYM5NPNMO1c8BzuPeXRunnxbVjTGW6UUQqRhSkXwU9a/lqowIrujyIh3zKSKLHtxi1d1gcndBciv56zdzvNqy/0BYswj/NJLcFJhbDq3KHpjp/eD+JY9iNV3Yvk9BxTfoN56d7KWMGAvOe9LcBc3IgHyDDgfRdN5I5FAPT0xIKNofc6uh45eI4Y2h0EF9/TmOtW2DGptvyTJmmwS+WL3r9dQt/3tx1+wVoJQsp0DgoN7qe/Qq2xpZs87c2IJ6FUK1s1wWY2ialTSiA3VrzlJRFmwfubC8XI2axFpVHdJ8rVstx5AhWgYw1pD06A7l4oB08yUG4dUCUlDPh6n3VDq4GyDuTUu/8y30BRn56W89fAwUL1hlhH3LzAPqbl4YU5t0k339V6aMGUNIR89aIVaWLBJ8UamahiRXtu+2dCiuePJpkgrPzE79G8+DhCy3yQdntVso7zY8ztysegQmwLfRqc31KFIfVZ9FOzEeyQ2DHIyFv06upVkjWBKuXi/JuAHuUwuNLuiui6Hk0XeKV1vWjvLhvFk+a+GfnUk8GIbANQgj0c/BrzdxjFp/8r9a9gqQ9H2F3y9FvVXM8g5pQrc0ixjjerCk2+w1Wa79fEfJR7yViErHRT6bNROhowlvWMxEkf7KomVVrXP/zV6byOzEpamOoqGZzwRX/0gpYyF8TC3D5aDwsSW6YEhTl5yN2wNKhPah3yBEEsTcHa X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR03MB4972.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(38100700002)(186003)(1076003)(107886003)(2616005)(38350700002)(110136005)(54906003)(36756003)(316002)(4326008)(8676002)(66476007)(66556008)(66946007)(83380400001)(8936002)(508600001)(6506007)(86362001)(6486002)(52116002)(44832011)(5660300002)(6512007)(26005)(6666004)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: W9PqKwgmXD5aC8T7KuD2tZwdkiGb42IcAyAl9Gw6N9tZLNyE9nUTAZvbAsGfXzhnY6VbZ78hdfZ/vo59TZDTraBQaA/TR8cNLOa+sF6N+7Ys46AU5ql2fI1oC/RgWi//cf71WDsDZ7Poav48VUbZ2v5bFanq58XVULGs1Py1fyWgiGxxCZ03WXzAZnyvgNJqWDs5s9wejAR1qlbXEFxZU1rMD5SP1wdnpUcrNxIuVp3PVgUVpXYQfAdXGclwB8rQ/5YIBiOCGrwT39swl899Sa7elxtEvIrXcvrpmiCcc5X+u8udFe0lYrBPUtoDCoAn9KKjngIhjjkObfdNbaOC2X33H2O6kydlWbrSeyVcLY442whUx/3vQzfnh6PfD39wW0J2qkcqQC8wlfkKeLbqBNrEI0xA3MdyG/aXOStQkfu/UzK6qpNoPT6sYyRQ37a5dja3DjcJvJ729/ZiYj6qx9TGLeygUKUG5efIWMXNXd+FOuXBAww8zn+0ta0DyIRX3tSF/5EXLR4l0IeyHdhufO5vcxeWOTjkq/dVx4KCItCXwy+QEMtWnoHbR+prBIMVP3Zs6BE2tPvt9bMcevrwuquYe5O3n58E7bjV9A1z5LnmDCADJkp+2Ru0tV2qHKU+5ieognhl5KvehsH1vF/jo9+4NhpQ3GNIbK8QfE30vw9MOIyfftsavGkKlcB9KtZrcj5tvJgAU/RESRD9Sz5GTaJJzpPcgXwgKGH9wb0sxwV+x2RotrAz+kcmZpHblkRYycOm980Vxh+xQHyY/iwAeNd7dbd541NF48dn/7UP8vwFqohuVE1AsKhkd+Jl6fO3xNQcRl8KVw8WntnaM/fuRP2wTvhGrtkaF0juwh/azbZ1q3SkWTVKAZquitDBl52YLIffFLkXqrKmOMXcODb5F4TTBqySPpCH5Z7I5E0p2zwfDAQzQXwl6oQyEew8xelnTCdxaCw9Bb6kYMzZMN+JdGjNHjku+lskCUiQJkjCXbmGCVtBmdfB5tC/s3QQ1rbRu1+nyU+OiHDeJ7YQ5seppFeob2ONxxAW8vsBGs5Y4K+tyjGeWcQSiKYCOlfAzCSPZECvS9MNcBMbeAySz1Ha9OV+g1AXRITvyd37OEhAJmI/+8roFzpHhTi26z7ZcLWB8yCLHn0hasddWQ5kfBJft4TwqJubyP1ewbroXcTIyktNemBTX96yt8/4QWB9v7cw3mmB+D2S9KnSirY+oroWxlf3LNRBmCC+0HHeDkj5O64+YN1lhFVqICWabNEoV8pXlAP8JTsgDl9zdPi4bDydu3wKaE7IqkUQMNaMFAMfqDVbCjxKRziS2S7E7ZebwRhUMqhBg9JmcYTI9gV8TmPhene0a3+m2JtomuenqraGZVH06LVF083NYzObtbOBRZM4dQAZxUhwZQHyw5Z8Q0FodsmkEdF+XFge1AJM3GQUtFx4IjU1mFEYp71qEp+TQ2bOxvXF3TxR6hRRLKhk+qUuaF+xhYJOPKdzV2zz6YgK/JNfWCpXHWxRigp1/kf5HJUsg48Y0fPU7HVW62TV/UmpZpdeCyhfB6zV6MUFIDZlhjyeZptMN+alef8lLjGU8ivXe3mVniXdHTNxEKYovliKUlHrDBbb5WLg33HNnY18TW8k1FXi6ZE0Dp9MgefaFw8wKEx18E24e8Zrw1gLSWvn+i857hpQt5NME6cxNNLFBujD/8pq58iMM/YXVAC7jZrPZkhHJZxg2NZI6wUNlqkH9GTu3Y5z8tdzqp050C4Khn4= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 04dffae2-2f4b-4d32-8b6d-08da43400389 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4972.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2022 19:59:04.5003 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rX/zQvwufTY/jzAVASZSIYqAuUJZC4kxtDaVH6VPvszf6v2fKUrz6wBHKAg2qEvbUFk1wHSVoTJmw86T4nmlnA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR03MB7309 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org mac_priv_s->enable() and ->disable() are always called with a comm_mode of COMM_MODE_RX_AND_TX. Remove this parameter, and refactor the macs appropriately. Signed-off-by: Sean Anderson --- .../net/ethernet/freescale/fman/fman_dtsec.c | 20 ++++++------------- .../net/ethernet/freescale/fman/fman_dtsec.h | 4 ++-- .../net/ethernet/freescale/fman/fman_memac.c | 16 ++++----------- .../net/ethernet/freescale/fman/fman_memac.h | 4 ++-- .../net/ethernet/freescale/fman/fman_tgec.c | 14 ++++--------- .../net/ethernet/freescale/fman/fman_tgec.h | 4 ++-- drivers/net/ethernet/freescale/fman/mac.c | 8 ++++---- 7 files changed, 24 insertions(+), 46 deletions(-) diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c index 38badacfdada..cebdbdd0ce59 100644 --- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c +++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c @@ -879,7 +879,7 @@ static void graceful_stop(struct fman_mac *dtsec, enum comm_mode mode) } } -int dtsec_enable(struct fman_mac *dtsec, enum comm_mode mode) +int dtsec_enable(struct fman_mac *dtsec) { struct dtsec_regs __iomem *regs = dtsec->regs; u32 tmp; @@ -889,20 +889,16 @@ int dtsec_enable(struct fman_mac *dtsec, enum comm_mode mode) /* Enable */ tmp = ioread32be(®s->maccfg1); - if (mode & COMM_MODE_RX) - tmp |= MACCFG1_RX_EN; - if (mode & COMM_MODE_TX) - tmp |= MACCFG1_TX_EN; - + tmp |= MACCFG1_RX_EN | MACCFG1_TX_EN; iowrite32be(tmp, ®s->maccfg1); /* Graceful start - clear the graceful Rx/Tx stop bit */ - graceful_start(dtsec, mode); + graceful_start(dtsec, COMM_MODE_RX_AND_TX); return 0; } -int dtsec_disable(struct fman_mac *dtsec, enum comm_mode mode) +int dtsec_disable(struct fman_mac *dtsec) { struct dtsec_regs __iomem *regs = dtsec->regs; u32 tmp; @@ -911,14 +907,10 @@ int dtsec_disable(struct fman_mac *dtsec, enum comm_mode mode) return -EINVAL; /* Graceful stop - Assert the graceful Rx/Tx stop bit */ - graceful_stop(dtsec, mode); + graceful_stop(dtsec, COMM_MODE_RX_AND_TX); tmp = ioread32be(®s->maccfg1); - if (mode & COMM_MODE_RX) - tmp &= ~MACCFG1_RX_EN; - if (mode & COMM_MODE_TX) - tmp &= ~MACCFG1_TX_EN; - + tmp &= ~(MACCFG1_RX_EN | MACCFG1_TX_EN); iowrite32be(tmp, ®s->maccfg1); return 0; diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.h b/drivers/net/ethernet/freescale/fman/fman_dtsec.h index 86f3b74ada03..0dd74972b112 100644 --- a/drivers/net/ethernet/freescale/fman/fman_dtsec.h +++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.h @@ -16,8 +16,8 @@ int dtsec_adjust_link(struct fman_mac *dtsec, int dtsec_restart_autoneg(struct fman_mac *dtsec); int dtsec_cfg_max_frame_len(struct fman_mac *dtsec, u16 new_val); int dtsec_cfg_pad_and_crc(struct fman_mac *dtsec, bool new_val); -int dtsec_enable(struct fman_mac *dtsec, enum comm_mode mode); -int dtsec_disable(struct fman_mac *dtsec, enum comm_mode mode); +int dtsec_enable(struct fman_mac *dtsec); +int dtsec_disable(struct fman_mac *dtsec); int dtsec_init(struct fman_mac *dtsec); int dtsec_free(struct fman_mac *dtsec); int dtsec_accept_rx_pause_frames(struct fman_mac *dtsec, bool en); diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c index 8b2b4fb411ec..de533d13e20b 100644 --- a/drivers/net/ethernet/freescale/fman/fman_memac.c +++ b/drivers/net/ethernet/freescale/fman/fman_memac.c @@ -685,7 +685,7 @@ static bool is_init_done(struct memac_cfg *memac_drv_params) return false; } -int memac_enable(struct fman_mac *memac, enum comm_mode mode) +int memac_enable(struct fman_mac *memac) { struct memac_regs __iomem *regs = memac->regs; u32 tmp; @@ -694,17 +694,13 @@ int memac_enable(struct fman_mac *memac, enum comm_mode mode) return -EINVAL; tmp = ioread32be(®s->command_config); - if (mode & COMM_MODE_RX) - tmp |= CMD_CFG_RX_EN; - if (mode & COMM_MODE_TX) - tmp |= CMD_CFG_TX_EN; - + tmp |= CMD_CFG_RX_EN | CMD_CFG_TX_EN; iowrite32be(tmp, ®s->command_config); return 0; } -int memac_disable(struct fman_mac *memac, enum comm_mode mode) +int memac_disable(struct fman_mac *memac) { struct memac_regs __iomem *regs = memac->regs; u32 tmp; @@ -713,11 +709,7 @@ int memac_disable(struct fman_mac *memac, enum comm_mode mode) return -EINVAL; tmp = ioread32be(®s->command_config); - if (mode & COMM_MODE_RX) - tmp &= ~CMD_CFG_RX_EN; - if (mode & COMM_MODE_TX) - tmp &= ~CMD_CFG_TX_EN; - + tmp &= ~(CMD_CFG_RX_EN | CMD_CFG_TX_EN); iowrite32be(tmp, ®s->command_config); return 0; diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.h b/drivers/net/ethernet/freescale/fman/fman_memac.h index e1d62a7df367..4cb9db12de0a 100644 --- a/drivers/net/ethernet/freescale/fman/fman_memac.h +++ b/drivers/net/ethernet/freescale/fman/fman_memac.h @@ -19,8 +19,8 @@ int memac_cfg_max_frame_len(struct fman_mac *memac, u16 new_val); int memac_cfg_reset_on_init(struct fman_mac *memac, bool enable); int memac_cfg_fixed_link(struct fman_mac *memac, struct fixed_phy_status *fixed_link); -int memac_enable(struct fman_mac *memac, enum comm_mode mode); -int memac_disable(struct fman_mac *memac, enum comm_mode mode); +int memac_enable(struct fman_mac *memac); +int memac_disable(struct fman_mac *memac); int memac_init(struct fman_mac *memac); int memac_free(struct fman_mac *memac); int memac_accept_rx_pause_frames(struct fman_mac *memac, bool en); diff --git a/drivers/net/ethernet/freescale/fman/fman_tgec.c b/drivers/net/ethernet/freescale/fman/fman_tgec.c index 49930a5f2991..04a19cbe08a8 100644 --- a/drivers/net/ethernet/freescale/fman/fman_tgec.c +++ b/drivers/net/ethernet/freescale/fman/fman_tgec.c @@ -392,7 +392,7 @@ static bool is_init_done(struct tgec_cfg *cfg) return false; } -int tgec_enable(struct fman_mac *tgec, enum comm_mode mode) +int tgec_enable(struct fman_mac *tgec) { struct tgec_regs __iomem *regs = tgec->regs; u32 tmp; @@ -401,16 +401,13 @@ int tgec_enable(struct fman_mac *tgec, enum comm_mode mode) return -EINVAL; tmp = ioread32be(®s->command_config); - if (mode & COMM_MODE_RX) - tmp |= CMD_CFG_RX_EN; - if (mode & COMM_MODE_TX) - tmp |= CMD_CFG_TX_EN; + tmp |= CMD_CFG_RX_EN | CMD_CFG_TX_EN; iowrite32be(tmp, ®s->command_config); return 0; } -int tgec_disable(struct fman_mac *tgec, enum comm_mode mode) +int tgec_disable(struct fman_mac *tgec) { struct tgec_regs __iomem *regs = tgec->regs; u32 tmp; @@ -419,10 +416,7 @@ int tgec_disable(struct fman_mac *tgec, enum comm_mode mode) return -EINVAL; tmp = ioread32be(®s->command_config); - if (mode & COMM_MODE_RX) - tmp &= ~CMD_CFG_RX_EN; - if (mode & COMM_MODE_TX) - tmp &= ~CMD_CFG_TX_EN; + tmp &= ~(CMD_CFG_RX_EN | CMD_CFG_TX_EN); iowrite32be(tmp, ®s->command_config); return 0; diff --git a/drivers/net/ethernet/freescale/fman/fman_tgec.h b/drivers/net/ethernet/freescale/fman/fman_tgec.h index 3b4ecde09bba..16d53f8dbcb1 100644 --- a/drivers/net/ethernet/freescale/fman/fman_tgec.h +++ b/drivers/net/ethernet/freescale/fman/fman_tgec.h @@ -12,8 +12,8 @@ struct fman_mac *tgec_config(struct fman_mac_params *params); int tgec_set_promiscuous(struct fman_mac *tgec, bool new_val); int tgec_modify_mac_address(struct fman_mac *tgec, enet_addr_t *enet_addr); int tgec_cfg_max_frame_len(struct fman_mac *tgec, u16 new_val); -int tgec_enable(struct fman_mac *tgec, enum comm_mode mode); -int tgec_disable(struct fman_mac *tgec, enum comm_mode mode); +int tgec_enable(struct fman_mac *tgec); +int tgec_disable(struct fman_mac *tgec); int tgec_init(struct fman_mac *tgec); int tgec_free(struct fman_mac *tgec); int tgec_accept_rx_pause_frames(struct fman_mac *tgec, bool en); diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c index 2b3c6cbefef6..a8d521760ffc 100644 --- a/drivers/net/ethernet/freescale/fman/mac.c +++ b/drivers/net/ethernet/freescale/fman/mac.c @@ -40,8 +40,8 @@ struct mac_priv_s { u16 speed; u16 max_speed; - int (*enable)(struct fman_mac *mac_dev, enum comm_mode mode); - int (*disable)(struct fman_mac *mac_dev, enum comm_mode mode); + int (*enable)(struct fman_mac *mac_dev); + int (*disable)(struct fman_mac *mac_dev); }; struct mac_address { @@ -247,7 +247,7 @@ static int start(struct mac_device *mac_dev) struct phy_device *phy_dev = mac_dev->phy_dev; struct mac_priv_s *priv = mac_dev->priv; - err = priv->enable(mac_dev->fman_mac, COMM_MODE_RX_AND_TX); + err = priv->enable(mac_dev->fman_mac); if (!err && phy_dev) phy_start(phy_dev); @@ -261,7 +261,7 @@ static int stop(struct mac_device *mac_dev) if (mac_dev->phy_dev) phy_stop(mac_dev->phy_dev); - return priv->disable(mac_dev->fman_mac, COMM_MODE_RX_AND_TX); + return priv->disable(mac_dev->fman_mac); } static int set_multi(struct net_device *net_dev, struct mac_device *mac_dev) From patchwork Tue May 31 19:58:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12866090 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02BA2C433F5 for ; Tue, 31 May 2022 19:59:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347601AbiEaT71 (ORCPT ); Tue, 31 May 2022 15:59:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347562AbiEaT7M (ORCPT ); Tue, 31 May 2022 15:59:12 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2052.outbound.protection.outlook.com [40.107.22.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2D506007A; Tue, 31 May 2022 12:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KLizP/mgdmF//R/6jbvHGk0wijkguIHvfaLbNDapLORxb1SeEx+2a1ewTo7MzNU3LUj0xIH1Cu8ucU0KkAvH9/gVgDbn7aT0MSeCwDseNfjgeG37q6c15Aoslh7YZV0gUzXQMvC+/o3VC+j1gzeEMkxWQeyEpoVZly1w1YkhSKbN6hL1zRD71gSK6yd40GC8XeDv0Rk83f9eXulPCv89nvXozWrwsLsRMe7LunNYC/QcrenL0jVUBKnAhUY4qYi2L09ldDjOBOFSC7QZn/e8XjPMgFgrjJALZcGkbNvmEojbEeSo9mzuj9v/kCNasDzFs8NmD8C6jBMN10RgObBHZQ== 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=0QpUpo+M6ccZxAbfYkoczcKnaaxNjmV9Xiyyaj4XMSE=; b=F2vjZNE34jPrx9ll4vgorW4dL4OesEKV6KASmsZVTTYcRIzsCyM09vL0nGvjQ/WVee/wuvlc/PzXNGK3/v61lKqEA23aG5SEpvb9t/HjyiOcg6S8Z3cIV1bekCRDmuIANmHoVIRZ+CwWIFHPTywdXj7aNfmK9+eLUP3wr1aNjPE2KSgq2SnxlMOEQOzl7+uviQqbBqeb6QYXECXkCwC3EZGg+GVs6JMcHQCjVNJRClNjz5zRQUoOccjPmAMtZaOJUY6Cx4C+ka2aMkiQtOj7uLB8DqZL7rbUoWV3TCqAuz97G9UXFBywBDQrEdp4WiEHhg9/ONqN7u+XJMwe1L+tQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0QpUpo+M6ccZxAbfYkoczcKnaaxNjmV9Xiyyaj4XMSE=; b=utsJcgvNumHBOgD7n2fh1AmEtpbenreHLOVLmHkm2jQK4ynM6hFd/8aGsjvQn0LUsYAfMHhRzxvYnw7ihXGQcLk3bgIBdSyvK14VvtXwJlpIRezJ3AKbTE4B9/ElY9mQK5N35e32ux/wxZAybXiRr9XaXEj5ZWhF50wzn28KHB7DpUuB5+Ca04W16+d94TLL1wvdfcp2386pH1fhSgxFUgbXO7MDFlZgfr0LLPNE2Y1k+2tWURF3YpUpCVeINj/8BgYDsEUfI4AhcUH3BKg9ADO83dk8x+oIbfdBCTAaYfh4sk08W0fUr2BfQaEhnyIeo10AEgys1m+aEQCMiLKlNw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) by PA4PR03MB7309.eurprd03.prod.outlook.com (2603:10a6:102:102::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.19; Tue, 31 May 2022 19:59:05 +0000 Received: from DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::c84e:a022:78f4:a3cf]) by DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::c84e:a022:78f4:a3cf%6]) with mapi id 15.20.5293.019; Tue, 31 May 2022 19:59:05 +0000 From: Sean Anderson To: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: Madalin Bucur , linux-kernel@vger.kernel.org, Sean Anderson Subject: [PATCH 3/4] net: fman: Store en/disable in mac_device instead of mac_priv_s Date: Tue, 31 May 2022 15:58:49 -0400 Message-Id: <20220531195851.1592220-4-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220531195851.1592220-1-sean.anderson@seco.com> References: <20220531195851.1592220-1-sean.anderson@seco.com> X-ClientProxiedBy: BL1PR13CA0113.namprd13.prod.outlook.com (2603:10b6:208:2b9::28) To DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cac81537-11e0-41b4-6b36-08da4340044f X-MS-TrafficTypeDiagnostic: PA4PR03MB7309:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6UHk7d0glcBFHcskx2rgGtJ22zwI33Ma4t1dZo0p5wE0/hJSjF52bxO6oTgVD0dbyQGZzyunVRB+bjj3KKPmF6v7fPJOIUYCoGh4uZRlR3sBgdlnIVe/0RM9m8TRNVJDUcS5AokpLz6tEPPF7/j2cf4lbZKjpijytBce0ucKLzcBIH2ZMoW+xyZi3rZeX8D0CM6OmEQrmF+5d0bL1dl4RPzNNfVGVFa6cbFzMsMvhwhp0HoJuRBr3ntWpY4Ce+nnwJ/23p3FVEHgaDRCqjyhhQwPEFwE7aZ/QTF4+WbE18jWwo1CkeHIdLeYMxxQf4gbsDSZSOJAj5kGXcdy7GpPz9M0eSE96L7jMgK3Fkts6ra7MJwDMAvMaNvC+NhfqsNYxH+mocli0DD1BIiZtVSZ7QlAbR2wG2Hiac4lEJH4deKKu5yJqZQtRlhSnoKljJFN1xJ5xC9ibfYabNUjhC3MTP3hzmHlscpxBLVc3n9FvpuOQWa5XoYxQcDlsT6iAaYi1Pt0m+Seh5O3KmAzhQKyqK+bgXjoxyoSKGifuHktaDvuTIRhJrFZAxLg83iZuUhEi2Pfa+iifmx+tP+PsuOxSHgtMQJ5S1TOr4B/LzLXaSy1xHsmtsOvJfIPSE7ZHn66ZfNC8QCmsvspZi+5rfRQhdx8ZlISAdeK/zi4UC1x2lrS2V3GVrxxMPsusaCtNy1ocCPMrjXEwcs/ZwgNyA8+6UMsFNzdzhmF/bNfK1KguBEtSIizNLmazqn7FZRS8H8b X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR03MB4972.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(38100700002)(186003)(1076003)(107886003)(2616005)(38350700002)(110136005)(54906003)(36756003)(316002)(4326008)(8676002)(66476007)(66556008)(66946007)(83380400001)(8936002)(508600001)(6506007)(86362001)(6486002)(52116002)(44832011)(5660300002)(6512007)(26005)(6666004)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dP6LdF5WNjlFHNft/QbmbtIr0JH8hOpB5psRDxRplRGO5H3x4vBVjubJMtZsItpuLn00dDz55bGUF7bJwzxehpCXpczX4DXKqBpzquwvRdjHRN+arDuXD09aoSDb37MnHXyY16VKw6sWn8iA9TcqEnSzsKa72Iljdp2BvLLH2zK7oLL7xvO0VpT5DyitzkizURUI53wLnCVMtjRzee9jhuewpqB1IbeS4qSEKCzzETSYd8t18v6wdvbtVi+BDLtY4A+ObLMrcXlTE5GYqadtB8mqeEij8q9M9EaDiT11Dt+QrCKKIb1r2Y8qjI9NI9PeU1DvvZHbPw+BZC6jRmb0/H//rhof23DA0KOVZu87M4U07N8vPlp8SQTYO0xnD0EdnKNhwTBgW9iNuzTD8uYcPrvKHVWnUjp26wEg+wTGgDKwYrVQ4gY5b+H7EqxvjH3NLQ/fNyQfsGZ43CepyxxvdaDMhEp5BJK1A1U0kUKBmxK01SsV7+1/ahiZFMswy5owdh4cS7VDhlgjgV9PsUeAAFk/9Qdb4s5u28yJN4CiH86kGSRiibK8f4Ly7uAxyQRVonrmwFaQJ7h4FwgatBDPSo8OPU4mvEcpKVVmDnHKjHcSudzPxfY+ecfBRDeUY27Gy0XtDbs/1dB9uLEH3SseK+jfIby7Ags48y9DKr1XD1kUFpjx+35EOP9ere4jIcnIFC1AYlE1OSSXHtrdldu/XQjPVB+36EjdvQB6yZCo7YZ9h11aarfyIPqT5r7VfBRVBYAo3/BevWdlaxO6qTKnSaPb71LZWMf4Km85uBH2ysULnthuLo2iNlDqkOxDpBW4HrHd396IB1f8jv5ujfG51I0Xiv0Wj/TnhSWHsDfFqfNqDWe9ezcyLtZWDRjUZw34egv3iywN+mpqMPxDDjLvFLX9IcPaGJzs+IGSVojmRWzLXXrghlteBUINhu7BziC3+hUEyscWOWkBuP8KU1jvPX4gKoL6QMEGGYnKVMi1JaImvnqZwMYUajCKsOWx12xaGn4nNi2CdcHAt/AiBND2NesbqsIE46AU/IMIAwuxyEBtepvDiaGIm0CIXRJWKd3Nrvz7QccMtIaq8pcbuwlcAaAdWuH40D2wpq5fa2LmEDbUAIeXkLB8G3AbupmJGsUtqjcDpE9mcLiubSXXkF3ICEkgQb2aGhid4o59s8k8Da8JmN/+4FBjexM9fB6qD5kpkMpB5cru+FQtEDBommpBxyTgOxdzH0eNuNVzytNTC9BlYfFufwkUT9hrOMaplMygVyCJrFWaONZYAYaahkCKE0ifCCozohRVNvPCHUYQ1MEzY1yoGjKvVMu7lwydq0CZA8OGLgT5JZrX1ICqJ1skAI/LNPXnRvyxhVdvFMd2nMzFRDJ9KSFz9e370tClRQ9wbeKIHiC77nCmachvhxtx5gBHy++ut5SevPmo3eZGuzg01BaORDdWbgUTJn1PA6na2C3G4svMkS7JTpeinfqUxyc2xHgJ0FqXYGTp49ePjp8eJ2Vjl2+5LEIfQXcS6g+6rbg9y7WVixSuaV0cNJbVJBWw3ax06dlyoM6reF4JKXYlCgzqdiYN3SLFefQRBxZq7nMcCBOqljWuS1Npx6Cn78sdZwUsHASNCSNIw3H7h41TwIHdjm31YuMA7wCIF5yupiAzkU00IUWWJ4I8gEk57yasVLJtfIREMF1idn59RB9py1D1ubUVDeoz7SxoXZY6DJnPvJq+trXdw56bw/l9YPbyb+VGullJ3O6enVAruhQ= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: cac81537-11e0-41b4-6b36-08da4340044f X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4972.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2022 19:59:05.7034 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HWDiU0GO6031SZqRNbfScuxGO7UL8MeZLQv9BLIbeAQUrK866QxW+bwVoPXIkBVMKDSgmYg3FfklykpFCmWK3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR03MB7309 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org All macs use the same start/stop functions. The actual mac-specific code lives in enable/disable. Move these functions to an appropriate struct, and inline the phy enable/disable calls to the caller of start/stop. Signed-off-by: Sean Anderson --- .../net/ethernet/freescale/dpaa/dpaa_eth.c | 11 +++-- drivers/net/ethernet/freescale/fman/mac.c | 44 +++---------------- drivers/net/ethernet/freescale/fman/mac.h | 4 +- 3 files changed, 15 insertions(+), 44 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 906d392da4e3..fe2572b492b2 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -288,9 +288,11 @@ static int dpaa_stop(struct net_device *net_dev) */ msleep(200); - err = mac_dev->stop(mac_dev); + if (mac_dev->phy_dev) + phy_stop(mac_dev->phy_dev); + err = mac_dev->disable(mac_dev->fman_mac); if (err < 0) - netif_err(priv, ifdown, net_dev, "mac_dev->stop() = %d\n", + netif_err(priv, ifdown, net_dev, "mac_dev->disable() = %d\n", err); for (i = 0; i < ARRAY_SIZE(mac_dev->port); i++) { @@ -2942,11 +2944,12 @@ static int dpaa_open(struct net_device *net_dev) goto mac_start_failed; } - err = priv->mac_dev->start(mac_dev); + err = priv->mac_dev->enable(mac_dev->fman_mac); if (err < 0) { - netif_err(priv, ifup, net_dev, "mac_dev->start() = %d\n", err); + netif_err(priv, ifup, net_dev, "mac_dev->enable() = %d\n", err); goto mac_start_failed; } + phy_start(priv->mac_dev->phy_dev); netif_tx_start_all_queues(net_dev); diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c index a8d521760ffc..6a4eaca83700 100644 --- a/drivers/net/ethernet/freescale/fman/mac.c +++ b/drivers/net/ethernet/freescale/fman/mac.c @@ -39,9 +39,6 @@ struct mac_priv_s { struct fixed_phy_status *fixed_link; u16 speed; u16 max_speed; - - int (*enable)(struct fman_mac *mac_dev); - int (*disable)(struct fman_mac *mac_dev); }; struct mac_address { @@ -241,29 +238,6 @@ static int memac_initialization(struct mac_device *mac_dev) return err; } -static int start(struct mac_device *mac_dev) -{ - int err; - struct phy_device *phy_dev = mac_dev->phy_dev; - struct mac_priv_s *priv = mac_dev->priv; - - err = priv->enable(mac_dev->fman_mac); - if (!err && phy_dev) - phy_start(phy_dev); - - return err; -} - -static int stop(struct mac_device *mac_dev) -{ - struct mac_priv_s *priv = mac_dev->priv; - - if (mac_dev->phy_dev) - phy_stop(mac_dev->phy_dev); - - return priv->disable(mac_dev->fman_mac); -} - static int set_multi(struct net_device *net_dev, struct mac_device *mac_dev) { struct mac_priv_s *priv; @@ -454,11 +428,9 @@ static void setup_dtsec(struct mac_device *mac_dev) mac_dev->set_allmulti = dtsec_set_allmulti; mac_dev->set_tstamp = dtsec_set_tstamp; mac_dev->set_multi = set_multi; - mac_dev->start = start; - mac_dev->stop = stop; mac_dev->adjust_link = adjust_link_dtsec; - mac_dev->priv->enable = dtsec_enable; - mac_dev->priv->disable = dtsec_disable; + mac_dev->enable = dtsec_enable; + mac_dev->disable = dtsec_disable; } static void setup_tgec(struct mac_device *mac_dev) @@ -474,11 +446,9 @@ static void setup_tgec(struct mac_device *mac_dev) mac_dev->set_allmulti = tgec_set_allmulti; mac_dev->set_tstamp = tgec_set_tstamp; mac_dev->set_multi = set_multi; - mac_dev->start = start; - mac_dev->stop = stop; mac_dev->adjust_link = adjust_link_void; - mac_dev->priv->enable = tgec_enable; - mac_dev->priv->disable = tgec_disable; + mac_dev->enable = tgec_enable; + mac_dev->disable = tgec_disable; } static void setup_memac(struct mac_device *mac_dev) @@ -494,11 +464,9 @@ static void setup_memac(struct mac_device *mac_dev) mac_dev->set_allmulti = memac_set_allmulti; mac_dev->set_tstamp = memac_set_tstamp; mac_dev->set_multi = set_multi; - mac_dev->start = start; - mac_dev->stop = stop; mac_dev->adjust_link = adjust_link_memac; - mac_dev->priv->enable = memac_enable; - mac_dev->priv->disable = memac_disable; + mac_dev->enable = memac_enable; + mac_dev->disable = memac_disable; } #define DTSEC_SUPPORTED \ diff --git a/drivers/net/ethernet/freescale/fman/mac.h b/drivers/net/ethernet/freescale/fman/mac.h index 1ea5fd32f689..4c9fdfab8813 100644 --- a/drivers/net/ethernet/freescale/fman/mac.h +++ b/drivers/net/ethernet/freescale/fman/mac.h @@ -36,8 +36,8 @@ struct mac_device { bool allmulti; int (*init)(struct mac_device *mac_dev); - int (*start)(struct mac_device *mac_dev); - int (*stop)(struct mac_device *mac_dev); + int (*enable)(struct fman_mac *mac_dev); + int (*disable)(struct fman_mac *mac_dev); void (*adjust_link)(struct mac_device *mac_dev); int (*set_promisc)(struct fman_mac *mac_dev, bool enable); int (*change_addr)(struct fman_mac *mac_dev, enet_addr_t *enet_addr); From patchwork Tue May 31 19:58:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12866091 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19B28C433F5 for ; Tue, 31 May 2022 19:59:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347645AbiEaT7f (ORCPT ); Tue, 31 May 2022 15:59:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347573AbiEaT7N (ORCPT ); Tue, 31 May 2022 15:59:13 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2052.outbound.protection.outlook.com [40.107.22.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ED2D60AB1; Tue, 31 May 2022 12:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AZYa/2quaj2r/MArdKTCQbgMDvnTDgNaMC4ca+UdTKNBaDdG3Kd4G47ncZco/kKUnL8Q+rMHevFif32ltAD69+NCoGVERk5LMh3K2SKfExv413HHKjYp2kSHo5kYWh5ubki0FpotbyAV/06r7eka1vrCCoLn5vyPr3+2xSDKJkahMZxirqS+L5WVsQPoKXE9TFon0B+q2h5HXufDXwCFmXnLlvfn4oPwibeauXTx2WD1diXTWIo3z0+agrvzVqruLObN3XSGg36SVR2TuSO9nQ0N20NOkIRVwkDnGGO9WLd1zd7lHiNgbtQ8jTKX89Fz9QqLsjgCLFawU6NwTk3eGw== 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=9erax2U4m0CE0NXLEJJuaDr954gduy2d+VAPXo/oskY=; b=PWLX7Km6nh1Ydj4mR1InSwz4wVQfDyVh1/r5CDlGNbjBiRLBJmii5g5lSed/swZ2UAobl5YcMzQItGF3h5T8CU/OodosFcNfVNGzYIA32OioHYGDQV5PmojGxnamcB5jUMMGPLrjA4NkKmiHtTzy2m0Co/gtdPseQAumUDWEV0ELqo6cFHcKUd8tC+hK++setR0lRIMrzW/VKHaFXlRfQaLxQ3xTcp0iJssOYD3rnVkli6zW5RI9ioNld/SiZDhAE7YDoo1ymnRhxWrP/Tj6xeEQ6FYAbs4ur8Rd+iMvpJoohUOaK4Nkp2KnzYgW3qh8If2JV6QxgQVZ90zdhxIP+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9erax2U4m0CE0NXLEJJuaDr954gduy2d+VAPXo/oskY=; b=nA3NTb8nO4Uikq2Mem0X3ABKxW/mcbTyY9vgZmfcLbPL8cRkLkkD+9VgVdJEYXrolu/lF/M9KA2aCRVSSXcTt8RO3lishHNtXt2SiwE+KHpsI6vqT7BjOwQRgkGqUatRw6gniOhpZqQqdiJxHV4RaKxoX0r7oex90AhZI48yv7OHtRrBkl5eVlhFcqqC1phu3LoXPKqN7wNG5sc3WJdnIkfbbcMKfcZ91quULhPblcr8V5KA1jFuxkahfY/4sSCZ3d0eM32AaspE5kzyY2UjLFAnDdDPK3azqucie0xaHaBDyhCa7JOI5MWNQPON/p7KKBMiR2Q/x47AvP7Wtnsf3w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) by PA4PR03MB7309.eurprd03.prod.outlook.com (2603:10a6:102:102::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.19; Tue, 31 May 2022 19:59:07 +0000 Received: from DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::c84e:a022:78f4:a3cf]) by DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::c84e:a022:78f4:a3cf%6]) with mapi id 15.20.5293.019; Tue, 31 May 2022 19:59:07 +0000 From: Sean Anderson To: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: Madalin Bucur , linux-kernel@vger.kernel.org, Sean Anderson Subject: [PATCH 4/4] net: fman: dtsec: Always gracefully stop/start Date: Tue, 31 May 2022 15:58:50 -0400 Message-Id: <20220531195851.1592220-5-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220531195851.1592220-1-sean.anderson@seco.com> References: <20220531195851.1592220-1-sean.anderson@seco.com> X-ClientProxiedBy: BL1PR13CA0113.namprd13.prod.outlook.com (2603:10b6:208:2b9::28) To DB7PR03MB4972.eurprd03.prod.outlook.com (2603:10a6:10:7d::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 819288ab-0a29-4e0d-73e9-08da434004fd X-MS-TrafficTypeDiagnostic: PA4PR03MB7309:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C2FHu91/psTXVZj7K3krgcapfL8pr440NQPyCNhu9VqN/iy7TIFya9A37OLrNAOf8HPx01kcnwVhpxuLHcDkCGRrhW455WtN0uh0VSclsXhjTk60vTAUXhMxLd0ZghrpcMVRI94cC88XQ28yVbl0iumG3oYyHzV7NEk/FswAi49Da1fBeQGrHK2oiuxK8HxKdso+CBDD1RHQZx+1Ukw2/FDq2uJhNuBv/4d0eigvRz73IK2WnWYC2+VjjUlvQ9YY8weyeaaxKXFs0kzLGF1s5iQTt3y85iZYxY/Pb72ka6sCo+veugNXBfMEv5PBhWetY2PeU1ZojzliYXFjZL8MDHM7905dUF+pyev+B1jYP65YChbnqJh9nbYJ13Ih7cnV5hNTxx6vpcKJQzzQtsu3xOBgdvo9l2akgfHoW6jkft6Gi+HOwqKl3jmROJEv1H3dRPFrIBaTeyZiwV0vW3vrGftbZ8sWg2TDIMuglYxDn3nptyxQmczCH6IfNP+f1itV9hJE9xH/b0cg0ooa/Jqsm+cEwjy6um3KlTm4c0K0Pi0oL0jMc7+PtNZA2TJupetVwb+o4DcIlpISr0VO2sVnCnlmCXzr//PsQcYgua76MmwOetCYMBFpLbW13p+0NPcMei3yQAP0koiSfSdiuj2xUTAru2/dvzn27a4cH5HUDr48BzXhNz8n+0/yatbmKvpfDNsHNgmr4bVHby9NbeOn94zwpVTT+V/x/siuYJY/UZoAdAetI85b6x12zSrj2HnO X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR03MB4972.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(38100700002)(186003)(1076003)(107886003)(2616005)(38350700002)(110136005)(54906003)(36756003)(316002)(4326008)(8676002)(66476007)(66556008)(66946007)(83380400001)(8936002)(508600001)(6506007)(86362001)(6486002)(52116002)(44832011)(5660300002)(6512007)(26005)(6666004)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6WRUe3u8A7AF8b7Ol8UMcHa/+ibnt9r4f0Lu+mn8gsGtF3Ft3IBYw9u/EPvNtmWQwDZz/a195IRHRPXGpYLGx/FRDzYTJCDlUrwHjKLKbYOUTMVNZayHo9qNj1Q8K0A7XPYme8GByfwHCc2nRd+Wxx/pBfMhHHFnG/3y2eona9Tllr6AbG9olpxW2KC0Q2weXZUUgZCBFa9a3gkLtq95ae3iEcawmG+9D2/9SqjvQVIIjeErtd56VbyAhpHfBRBAK1dcCYjoi3W3Fm+uAmeJ+jGZk4xwTSxlwu3qm9Qku5g0o7zUNfP38bqeBcfw+fUZhbjN/OmGCh277R99PI0Sr18YMDVpJdQ7Zq3RqkgmhMikUw5mAHMKP9JxvI4figUXagwnnt6qVgXwRFjdYeQnDD36jHCTgmzlQyBMgTDIrYWAPje9gv//0BD5QYqxyksDTCG8VFGlqQL95F3wXMl05IwMg65zyglR+o8zk8bgtJWg7UqlfDgQjpL2I5uSe5STaEdX5WzvuFI3CUZqG7yYm9iu7SWDKjtA9x9ZQ3hx1IZCBu5aFtNWlBtWMOxRffRIu/uMBnwgD2/R7tutA/Xd2w8wyE3tNHUALoFc7A+IjE83+yFi/Z3NZbPRCMpFnxF+b/q2H8a9pPduv0Ue7N1A4iqqMeyziYhzSTJJPZuXshrB2oWCiYQ2HeQotMbJGCy4NqNeitkjqYTDdiV9zO2BZVjswAfDo+GhsnSIBGKH4NejVbXlQ3ssDf8AphFcZd4ZCqI09o4vMhSy3UAXYF04SG6VFMAthLy2Qujs6V0e/Hiat7z/+8hAFP4KFE1Eugg5sXD6XIn2yoiOgb87tal6Lc2Ow6YMERA/7hNdL86ez9TT2kGAhlkKavDEHTUaHDw0ZTB9XeOyBIAUVknljflPXnHEbeh08bIj199bIEQMVgA7ApTiQv3RZtOANOS8EFmO4cIBMfvMOsxYl6rTcRjpddn7oY7UOrt9WLiNrFgJUDEXgCOnzc4E4WAEIrfqqvrPHoOK10nAFms2IGWISXzLfbBXBIdPqZawoFj6Gk7DbHZTkajEsigULrgaWnZHu6ScDA8Q4QhFDt2svFAmo26ddvQdikwUJmtYV+lil75k7++NWjdu+e8c3vB/iWAAMkSgHTUiCvtHnqJW6e+wpGJPooGMUgGlEVrRGkwLzDihRuwvwc28PYOip9jNeueglcJaZHSDFofOw1dkYfBqndrM/cAERUpU7taPrQH6uSjohEXrMOIbvxtEWbqb9HabO7Z5oJg+LHspTmkSaLX7JhUoZCrjZWZVv8bPsCLst3WhkzYINdUR/n2IKUh+kCqTRd6ie6vP1vmQgSfbCp95zMLhkdvtRZVkYZJ1wKxz2nWdIV6HacUBpL9DOwvnFy0mYtWoDD8p3dvSbU4obuALznhdgGSQiRyIHVcrAJ77j2aUhyJzafIzzDUsQDeGooCIGlyu+tW8NuJ5DQatlkQGCLU+yYTfuJ/vJC8LXw2jIgChnWlgfiAz9kWgm3QuiNZSimsolfqdq8GoU2bhyfZk90wGK0LxnsS/ZjgVMEXnVUag7huazXyqSfdLpEbg+duFAm4hWXVZfBB2KpnnZnXI4InpcPRXNv8axywqqMyFA74AtONL61EPAD1Bxbgs1BN4jFKnppruB8wlM8424X6eGioq852Qq7CgOIZfewHAea6n/QPivqDvnVsc9HdOl87HRoCP+5xVBMd8ikbHIPS85zU8r9okFbgEvhAyDbbhVJuevPE= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 819288ab-0a29-4e0d-73e9-08da434004fd X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4972.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2022 19:59:06.9845 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Sreyum443rGtAwkQd5q+TE6uivB7XRDDxoifNUOzCdIhEhj3YoXriApE+NYdYWQ3ykPBDaQXji5sA1BVX94EEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR03MB7309 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org There are two ways that GRS can be set: graceful_stop and dtsec_isr. It is cleared by graceful_start. If it is already set before calling graceful_stop, then that means that dtsec_isr set it. In that case, we will not set GRS nor will we clear it (which seems like a bug?). For GTS the logic is similar, except that there is no one else messing with this bit (so we will always set and clear it). Simplify the logic by always setting/clearing GRS/GTS. This is less racy that the previous behavior, and ensures that we always end up clearing the bits. This can of course clear GRS while dtsec_isr is waiting, but because we have already done our own waiting it should be fine. This is the last user of enum comm_mode, so remove it. Signed-off-by: Sean Anderson --- .../net/ethernet/freescale/fman/fman_dtsec.c | 92 ++++++------------- .../net/ethernet/freescale/fman/fman_mac.h | 10 -- 2 files changed, 30 insertions(+), 72 deletions(-) diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c index cebdbdd0ce59..746fb1cd59e5 100644 --- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c +++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c @@ -833,49 +833,41 @@ int dtsec_cfg_pad_and_crc(struct fman_mac *dtsec, bool new_val) return 0; } -static void graceful_start(struct fman_mac *dtsec, enum comm_mode mode) +static void graceful_start(struct fman_mac *dtsec) { struct dtsec_regs __iomem *regs = dtsec->regs; - if (mode & COMM_MODE_TX) - iowrite32be(ioread32be(®s->tctrl) & - ~TCTRL_GTS, ®s->tctrl); - if (mode & COMM_MODE_RX) - iowrite32be(ioread32be(®s->rctrl) & - ~RCTRL_GRS, ®s->rctrl); + iowrite32be(ioread32be(®s->tctrl) & ~TCTRL_GTS, ®s->tctrl); + iowrite32be(ioread32be(®s->rctrl) & ~RCTRL_GRS, ®s->rctrl); } -static void graceful_stop(struct fman_mac *dtsec, enum comm_mode mode) +static void graceful_stop(struct fman_mac *dtsec) { struct dtsec_regs __iomem *regs = dtsec->regs; u32 tmp; /* Graceful stop - Assert the graceful Rx stop bit */ - if (mode & COMM_MODE_RX) { - tmp = ioread32be(®s->rctrl) | RCTRL_GRS; - iowrite32be(tmp, ®s->rctrl); + tmp = ioread32be(®s->rctrl) | RCTRL_GRS; + iowrite32be(tmp, ®s->rctrl); - if (dtsec->fm_rev_info.major == 2) { - /* Workaround for dTSEC Errata A002 */ - usleep_range(100, 200); - } else { - /* Workaround for dTSEC Errata A004839 */ - usleep_range(10, 50); - } + if (dtsec->fm_rev_info.major == 2) { + /* Workaround for dTSEC Errata A002 */ + usleep_range(100, 200); + } else { + /* Workaround for dTSEC Errata A004839 */ + usleep_range(10, 50); } /* Graceful stop - Assert the graceful Tx stop bit */ - if (mode & COMM_MODE_TX) { - if (dtsec->fm_rev_info.major == 2) { - /* dTSEC Errata A004: Do not use TCTRL[GTS]=1 */ - pr_debug("GTS not supported due to DTSEC_A004 Errata.\n"); - } else { - tmp = ioread32be(®s->tctrl) | TCTRL_GTS; - iowrite32be(tmp, ®s->tctrl); + if (dtsec->fm_rev_info.major == 2) { + /* dTSEC Errata A004: Do not use TCTRL[GTS]=1 */ + pr_debug("GTS not supported due to DTSEC_A004 Errata.\n"); + } else { + tmp = ioread32be(®s->tctrl) | TCTRL_GTS; + iowrite32be(tmp, ®s->tctrl); - /* Workaround for dTSEC Errata A0012, A0014 */ - usleep_range(10, 50); - } + /* Workaround for dTSEC Errata A0012, A0014 */ + usleep_range(10, 50); } } @@ -893,7 +885,7 @@ int dtsec_enable(struct fman_mac *dtsec) iowrite32be(tmp, ®s->maccfg1); /* Graceful start - clear the graceful Rx/Tx stop bit */ - graceful_start(dtsec, COMM_MODE_RX_AND_TX); + graceful_start(dtsec); return 0; } @@ -907,7 +899,7 @@ int dtsec_disable(struct fman_mac *dtsec) return -EINVAL; /* Graceful stop - Assert the graceful Rx/Tx stop bit */ - graceful_stop(dtsec, COMM_MODE_RX_AND_TX); + graceful_stop(dtsec); tmp = ioread32be(®s->maccfg1); tmp &= ~(MACCFG1_RX_EN | MACCFG1_TX_EN); @@ -921,18 +913,12 @@ int dtsec_set_tx_pause_frames(struct fman_mac *dtsec, u16 pause_time, u16 __maybe_unused thresh_time) { struct dtsec_regs __iomem *regs = dtsec->regs; - enum comm_mode mode = COMM_MODE_NONE; u32 ptv = 0; if (!is_init_done(dtsec->dtsec_drv_param)) return -EINVAL; - if ((ioread32be(®s->rctrl) & RCTRL_GRS) == 0) - mode |= COMM_MODE_RX; - if ((ioread32be(®s->tctrl) & TCTRL_GTS) == 0) - mode |= COMM_MODE_TX; - - graceful_stop(dtsec, mode); + graceful_stop(dtsec); if (pause_time) { /* FM_BAD_TX_TS_IN_B_2_B_ERRATA_DTSEC_A003 Errata workaround */ @@ -954,7 +940,7 @@ int dtsec_set_tx_pause_frames(struct fman_mac *dtsec, iowrite32be(ioread32be(®s->maccfg1) & ~MACCFG1_TX_FLOW, ®s->maccfg1); - graceful_start(dtsec, mode); + graceful_start(dtsec); return 0; } @@ -962,18 +948,12 @@ int dtsec_set_tx_pause_frames(struct fman_mac *dtsec, int dtsec_accept_rx_pause_frames(struct fman_mac *dtsec, bool en) { struct dtsec_regs __iomem *regs = dtsec->regs; - enum comm_mode mode = COMM_MODE_NONE; u32 tmp; if (!is_init_done(dtsec->dtsec_drv_param)) return -EINVAL; - if ((ioread32be(®s->rctrl) & RCTRL_GRS) == 0) - mode |= COMM_MODE_RX; - if ((ioread32be(®s->tctrl) & TCTRL_GTS) == 0) - mode |= COMM_MODE_TX; - - graceful_stop(dtsec, mode); + graceful_stop(dtsec); tmp = ioread32be(®s->maccfg1); if (en) @@ -982,7 +962,7 @@ int dtsec_accept_rx_pause_frames(struct fman_mac *dtsec, bool en) tmp &= ~MACCFG1_RX_FLOW; iowrite32be(tmp, ®s->maccfg1); - graceful_start(dtsec, mode); + graceful_start(dtsec); return 0; } @@ -990,17 +970,11 @@ int dtsec_accept_rx_pause_frames(struct fman_mac *dtsec, bool en) int dtsec_modify_mac_address(struct fman_mac *dtsec, enet_addr_t *enet_addr) { struct dtsec_regs __iomem *regs = dtsec->regs; - enum comm_mode mode = COMM_MODE_NONE; if (!is_init_done(dtsec->dtsec_drv_param)) return -EINVAL; - if ((ioread32be(®s->rctrl) & RCTRL_GRS) == 0) - mode |= COMM_MODE_RX; - if ((ioread32be(®s->tctrl) & TCTRL_GTS) == 0) - mode |= COMM_MODE_TX; - - graceful_stop(dtsec, mode); + graceful_stop(dtsec); /* Initialize MAC Station Address registers (1 & 2) * Station address have to be swapped (big endian to little endian @@ -1008,7 +982,7 @@ int dtsec_modify_mac_address(struct fman_mac *dtsec, enet_addr_t *enet_addr) dtsec->addr = ENET_ADDR_TO_UINT64(*enet_addr); set_mac_address(dtsec->regs, (u8 *)(*enet_addr)); - graceful_start(dtsec, mode); + graceful_start(dtsec); return 0; } @@ -1226,18 +1200,12 @@ int dtsec_set_promiscuous(struct fman_mac *dtsec, bool new_val) int dtsec_adjust_link(struct fman_mac *dtsec, u16 speed) { struct dtsec_regs __iomem *regs = dtsec->regs; - enum comm_mode mode = COMM_MODE_NONE; u32 tmp; if (!is_init_done(dtsec->dtsec_drv_param)) return -EINVAL; - if ((ioread32be(®s->rctrl) & RCTRL_GRS) == 0) - mode |= COMM_MODE_RX; - if ((ioread32be(®s->tctrl) & TCTRL_GTS) == 0) - mode |= COMM_MODE_TX; - - graceful_stop(dtsec, mode); + graceful_stop(dtsec); tmp = ioread32be(®s->maccfg2); @@ -1258,7 +1226,7 @@ int dtsec_adjust_link(struct fman_mac *dtsec, u16 speed) tmp &= ~DTSEC_ECNTRL_R100M; iowrite32be(tmp, ®s->ecntrl); - graceful_start(dtsec, mode); + graceful_start(dtsec); return 0; } diff --git a/drivers/net/ethernet/freescale/fman/fman_mac.h b/drivers/net/ethernet/freescale/fman/fman_mac.h index 19f327efdaff..418d1de85702 100644 --- a/drivers/net/ethernet/freescale/fman/fman_mac.h +++ b/drivers/net/ethernet/freescale/fman/fman_mac.h @@ -75,16 +75,6 @@ typedef u8 enet_addr_t[ETH_ALEN]; #define ETH_HASH_ENTRY_OBJ(ptr) \ hlist_entry_safe(ptr, struct eth_hash_entry, node) -/* Enumeration (bit flags) of communication modes (Transmit, - * receive or both). - */ -enum comm_mode { - COMM_MODE_NONE = 0, /* No transmit/receive communication */ - COMM_MODE_RX = 1, /* Only receive communication */ - COMM_MODE_TX = 2, /* Only transmit communication */ - COMM_MODE_RX_AND_TX = 3 /* Both transmit and receive communication */ -}; - /* FM MAC Exceptions */ enum fman_mac_exceptions { FM_MAC_EX_10G_MDIO_SCAN_EVENT = 0