From patchwork Thu Aug 18 16:16:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12947423 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6AD09C3F6B0 for ; Thu, 18 Aug 2022 16:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/Lck187ls13uQYA0dC7m513VsAK09G7fK92RPIOYy+8=; b=K1vmLUX7Z6i1Ak tgCJqaJHulT25myiVTvZecA7vv65r9bijElS5VkBtSDYaTbsmECzaGh7b6HuthfIDczavUaKXWKdE gV7UVdd8rcEbFFOf5/OTzK6WOroKmKiB0Wqcj2lCa8JCRIsVl81NnsfztJrQwmzOLB8T0usIwB36R WDGrRGfPAAfdDrdEpZPxLinRF+fabZ3ggC67II76PhUIVW5KQEgK5gqa1v3A8o7zZj8vPsrEzjDlv kXetdF+Aj6L87/Rf/6OphNvF8pWsojt17WNTgME8gd66cmqpjmhMqF6T4gmvqz+jcMBA4NKlMd+MR MNOXKwth+8ef5jW5enHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOiIT-0073Vi-6m; Thu, 18 Aug 2022 16:23:06 +0000 Received: from mail-eopbgr70074.outbound.protection.outlook.com ([40.107.7.74] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOiD6-0070EC-9e for linux-arm-kernel@lists.infradead.org; Thu, 18 Aug 2022 16:17:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iDooIjSj52pOUK64EMMr/xmQjjsFCSdIqrFN/HRZtINF0WOVVhpG9VRFV26RoZJz7m76/mAPsC1eJ1dCdcYAwYX9fnsH+w5Cob2u4OoT+nzClWUaMfNKzk7tslgpgAtUn8/urnEdeeO0zc+cUTDKfVnlane3F+esSm4gAoKyJ3VjsKaKCfM3fGVps17OAIcEjCiREdA3avHYuvz3qSreZ++NXxfP+daywlRgX/P31FzHYQ/oRCfruakEUgX29j5/KXvARevvZNL2ElkXDTkFeUYMHJKAMdC2tVoYZoTJkTyy3IfArXceWdmf7wqpnMY2SqHnx9i+gHqrg6yp4n4FGA== 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=nzEMv80+yImB4Wmb71Po/tzw2y5X2yRQVMwQIIkbHMU=; b=VL6Be2cM8StG83NgWH/KQKgIJQm2BTcMDv+yuzaT3oWIA2Iqhp4Db/9+izReburxXVXCI6dtvf0X7D8YdFV6T/22SpIGNxiaQoQO3ynqoiDJSOi+6BqmSLT8ruSofN7NT67Y51fAxH5GKrKRZV/oW2LsfgWSZmpMcXFgubapX5nhlEvQcOp//au1082GsQwdC5NE/GtXBJ8U5qFoAIaVuYddsGQuGIx+mAjpYtCw7jbvakWIFxeydCAK6TJPJv2cm5yrWy9IK8zhySbIlLPqeWu49VBpJvLvBor1g3oTVuxYWgL6SMzrzM72kFqUNKYRceIMObgRiwiFDPEfksOTAw== 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=nzEMv80+yImB4Wmb71Po/tzw2y5X2yRQVMwQIIkbHMU=; b=PoCcA2VMh6BDFOCZUKksaj4nlEjbov+lRkS6gT7Qs+z3i1EIthOaPurlsZBPi8qjidiwqoaswNbrZheJ5kBBGSX9O/ZwHlValqqfgdk8BU5gxpJ77+XUFAA4mRye5MDoXwQKc/kJjkiFNYV6E0UbPdYTFbnYg9hrE4y7YtboozzeXfjopFNpPdl8gJ5wVq3GpwqsvNucnKnfWw3Ct2JAbpIv8tdWb2sCho5JHBNMRKy9GSOLOHzU5YZMWOvVazT1X0xJ1C9FhWeRsbqR/5F9iFLrzRxnQtgs8tiW0HRXZ2IlCamAAE0arT3JGKam61sun+ncB5X1+VpnI1ta3Dk9Ag== 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 DB3PR0302MB3211.eurprd03.prod.outlook.com (2603:10a6:8:11::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.16; Thu, 18 Aug 2022 16:17:22 +0000 Received: from DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::ecaa:a5a9:f0d5:27a2]) by DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::ecaa:a5a9:f0d5:27a2%4]) with mapi id 15.20.5504.019; Thu, 18 Aug 2022 16:17:21 +0000 From: Sean Anderson To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: Camelia Groza , linux-kernel@vger.kernel.org (open list), Madalin Bucur , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, Sean Anderson Subject: [RESEND PATCH net-next v4 10/25] net: fman: Export/rename some common functions Date: Thu, 18 Aug 2022 12:16:34 -0400 Message-Id: <20220818161649.2058728-11-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220818161649.2058728-1-sean.anderson@seco.com> References: <20220818161649.2058728-1-sean.anderson@seco.com> X-ClientProxiedBy: MN2PR20CA0009.namprd20.prod.outlook.com (2603:10b6:208:e8::22) 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: e5eaffb4-951f-4c69-d441-08da81352147 X-MS-TrafficTypeDiagnostic: DB3PR0302MB3211:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OMsZd6EBaSVC5zBwVlB26SGEgGeBHfHsUHY30yNXqWq/fhbY/T/YzTqMbjpLzIL/435YCnBIDBGfni0ZEcZQ39mjLjUTLB3fRUcd0DiGQxmqnzkaYA6AKlU4ZaFOFq7VYF+2/ihJ4jK9xunfFzM5/A9othrhUITqWtaZRn/Q3JEXOxJ3+E3nXQezKy+VeRsBiAESoRblR2F6AIuQen0Lzfo6oIiD/c009JAKisEWQsua2RsejaLQsiMsQchvLGayQy3dL63PwNLN16zjTqU0tTJFI1Pz87Zv3Ea/bqm6JQ8dA2IGP0S4vqMQPhWgQOnIAZ5DDExLcJ+LyieNkQY0Aai4vq4yn/XPP9/Q0vhWZTnOEguCi/WMG6u4bYzPA6TC5aiat3GrLZTsKH3qIqTcW5dVydRADMIdOJScoe5xL+dbos7uCZOdo2HaK8k61vC3zTtjxZqb06F0MMz/nQNv4TUYxnSgjLF3dgTWpGu28RTYIPBz1Wqdw7Unu1jd2lqD8AoXOTE+sZjEnNzIk4L0z30LfSDb85tWzc3fpefiHSnJcjG/CDWu8zk9ZanWXumQ+Fei9XpgT71nryMn/i1y5XNXR6v7h2WPf/srD03/fd8flqCrY4q7h6wPHBpIuD7M+3lIZKCUA/ZfN/jDocaYYA2FC1Lw7IA+YqK9NGFaBwB2eCNowRKnnjks/LnyKMYe7Ac+O/FZAP3eMte5CGefq4jBiL3D7+/az8OjjQ+bOniAi4Jip0WWlS5k37qgUll7+2pZ7kjnMMjL8regGs4Ijg== 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:(13230016)(396003)(346002)(39840400004)(136003)(366004)(376002)(2616005)(38350700002)(8936002)(38100700002)(4326008)(6512007)(26005)(6506007)(52116002)(6666004)(2906002)(8676002)(36756003)(66556008)(1076003)(66946007)(66476007)(54906003)(110136005)(44832011)(478600001)(86362001)(41300700001)(6486002)(316002)(107886003)(83380400001)(186003)(5660300002)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8OcBlCBfRg+MkGzISe+76dCfTVBo0fNfiYrIaAMay3h2XjJu+axRNopCek5L6DTm834JHdlS7p8fCrBCe/Ua7Cs5k6CGWJnmb1leWmxr2xcNu7LfDwdwtcp2fWDN05hbIAzDv8EvLnqehSlODh1zIJ/gkuGRU1fZ1LgaFF8w12kyZIVLGJgb8aQglBy5r/l50thhf1x4N2+gdNbpQ6G9/Ec/l9IbapG+SJFi2xPZR/BdAlNTiI3+lB1HileMU3RwCk0EihXwoS+PAjlZ5a9kddXjrGn1E/+GmoKnC9jO7HULMgBxzbPVPhSlESVfv4PDCcitDkuPn0AMcLXw4lc21eOjHgsnBapLlpXBd3kZM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/0S004R6p5Cg+SIrxWgiKtMfdcybL1FmaTeMl5Be0WUqKDduWrRhWA7Pf2x+yDICgeBtwzgGbyoaLgX5rtnHgDHShiRRpfZurB5WuTt3Uj6bMqXLV4xfxRsgX2npvT9HsT2vmX1m/O8wy1RXJogTpm3Pt+QnJQmKL63RWhPO0jJ8od09uw== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5eaffb4-951f-4c69-d441-08da81352147 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4972.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Aug 2022 16:17:21.9045 (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: XehLkDVpu3hekUn8bAOvPzJTcixOVAy7DKo291m28zUqxH4NESXPuk5CJwVnZfXK/qqUO9zpnrykb95T6MMzrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0302MB3211 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220818_091732_361478_6A977789 X-CRM114-Status: GOOD ( 11.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In preparation for moving each of the initialization functions to their own file, export some common functions so they can be re-used. This adds an fman prefix to set_multi to make it a bit less genericly-named. Signed-off-by: Sean Anderson Acked-by: Camelia Groza --- (no changes since v1) drivers/net/ethernet/freescale/fman/mac.c | 12 ++++++------ drivers/net/ethernet/freescale/fman/mac.h | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c index af5e5d98e23e..0ac8df87308a 100644 --- a/drivers/net/ethernet/freescale/fman/mac.c +++ b/drivers/net/ethernet/freescale/fman/mac.c @@ -58,8 +58,8 @@ static void mac_exception(void *handle, enum fman_mac_exceptions ex) __func__, ex); } -static int set_fman_mac_params(struct mac_device *mac_dev, - struct fman_mac_params *params) +int set_fman_mac_params(struct mac_device *mac_dev, + struct fman_mac_params *params) { struct mac_priv_s *priv = mac_dev->priv; @@ -82,7 +82,7 @@ static int set_fman_mac_params(struct mac_device *mac_dev, return 0; } -static int set_multi(struct net_device *net_dev, struct mac_device *mac_dev) +int fman_set_multi(struct net_device *net_dev, struct mac_device *mac_dev) { struct mac_priv_s *priv; struct mac_address *old_addr, *tmp; @@ -275,7 +275,7 @@ static int tgec_initialization(struct mac_device *mac_dev, mac_dev->set_exception = tgec_set_exception; mac_dev->set_allmulti = tgec_set_allmulti; mac_dev->set_tstamp = tgec_set_tstamp; - mac_dev->set_multi = set_multi; + mac_dev->set_multi = fman_set_multi; mac_dev->adjust_link = adjust_link_void; mac_dev->enable = tgec_enable; mac_dev->disable = tgec_disable; @@ -335,7 +335,7 @@ static int dtsec_initialization(struct mac_device *mac_dev, mac_dev->set_exception = dtsec_set_exception; mac_dev->set_allmulti = dtsec_set_allmulti; mac_dev->set_tstamp = dtsec_set_tstamp; - mac_dev->set_multi = set_multi; + mac_dev->set_multi = fman_set_multi; mac_dev->adjust_link = adjust_link_dtsec; mac_dev->enable = dtsec_enable; mac_dev->disable = dtsec_disable; @@ -402,7 +402,7 @@ static int memac_initialization(struct mac_device *mac_dev, mac_dev->set_exception = memac_set_exception; mac_dev->set_allmulti = memac_set_allmulti; mac_dev->set_tstamp = memac_set_tstamp; - mac_dev->set_multi = set_multi; + mac_dev->set_multi = fman_set_multi; mac_dev->adjust_link = adjust_link_memac; mac_dev->enable = memac_enable; mac_dev->disable = memac_disable; diff --git a/drivers/net/ethernet/freescale/fman/mac.h b/drivers/net/ethernet/freescale/fman/mac.h index 05dbb8b5a704..da410a7d00c9 100644 --- a/drivers/net/ethernet/freescale/fman/mac.h +++ b/drivers/net/ethernet/freescale/fman/mac.h @@ -71,5 +71,8 @@ int fman_set_mac_active_pause(struct mac_device *mac_dev, bool rx, bool tx); void fman_get_pause_cfg(struct mac_device *mac_dev, bool *rx_pause, bool *tx_pause); +int set_fman_mac_params(struct mac_device *mac_dev, + struct fman_mac_params *params); +int fman_set_multi(struct net_device *net_dev, struct mac_device *mac_dev); #endif /* __MAC_H */