From patchwork Fri Jun 17 20:32:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12886010 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 8F3F6C43334 for ; Fri, 17 Jun 2022 20:41:59 +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=SKV65Bq3sdIUO0Ewvm/fM8nyRRpmLfSK4lpT5niR2sg=; b=RrYJzVm3zeQXBl II1rjQroNiWZex2AjPFhRfhoc6l+/x1xa5aXZb5qQDQ8Qutg/DEDuiG+KmQ9eYu/gcCuedAJUx80P +gjGKpg/Bh2H2JSZFkQFR28aD28bzoARwlFhsuGyAIAqROZnplFuensIajvEmtzbZAVLp2BmnWNkn nmNC02qkz+avEV/PRmpxkZ9YHr2V93b2Wh2O42ipYoKAtajAokHM6ydepSzvfET6unMawcVm3QtMg LRNzepAe+86WoW3x8xhsRKUzSCSCIjBzKP/nzhWUL8wJHTGwx8INQrDRCtopZPGMWOyLYGb+FDsC4 598oVdGM9N9ilKPOQk/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2Ilk-00900y-1y; Fri, 17 Jun 2022 20:40:41 +0000 Received: from mail-am6eur05on2061c.outbound.protection.outlook.com ([2a01:111:f400:7e1b::61c] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2IfQ-008xKA-Nm for linux-arm-kernel@lists.infradead.org; Fri, 17 Jun 2022 20:34:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RhlVCKRpE/jXRdFdYQllcjOiu7hP/Bsa+MWkaCMY5EsBsXbvGNex+qHR49r8PaPHxmq7R14nzE3seqUIcRxGXM8vWsL8TL3X2Zjbdu+gvSgpH9cUPnX+FZq7Enz/FPeWZqRnCiIWN6M0fU9G9+4xWG0i6veXgMvzoHKRZqNWPksjHv+QJZ6aO4bKGrhPzGRHGw+C/de/oJGzRN07ll+jBgNm6avwio6+zCiVzijR7bFgQggCGz1LUwttReosRDzCWfLmqALp3cvjDzK8X8UONzkit5dixOenD45enGFoKjZcELqGrOSJiywaMgLmeVgxnFfa5zR2/DWUxtpwGDswLA== 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=vRiLvnW8cA1S7WsJ/ivzaAIyrGttAsTtVTGeOUB3Woc=; b=XFGn+AJaDEE9jKJkjCarE4MHVUs/kXJeCQ2YH1TRvBol/3b6t/1aETTPokaL/E7A4FVQp6pGClY8UcTTk26WDEuYhHkZ25dD+SzJm139t3MaiP8Nx3qMckQS0TY0KT6Owx6EN3U0s6xYS1OW/6J/xr9Pt/UZ+y53q6VMdx3Zh6FLtrGaDXiuZguMMAv+1EBxmOZnNVNQkRGHt1C05tR60Fqo2kH6y+OTcToRSlEzYSV2uhhq4RCoJaNDu9aJ3tihMAVMLakt3XhQqtxbXj+PZDXD2Hg7WvmeKQ/RY7AIfVxmrhPKTebLHWIoSNc+20g80pdXAR5XaNYZXbiF3nMvBQ== 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=vRiLvnW8cA1S7WsJ/ivzaAIyrGttAsTtVTGeOUB3Woc=; b=Jpzbxzas5IlZo0wXdGaoIZZobQ56d2/iWVtqUHGgudy8NnlLd076zDjUr+qRmmxRyzDFtUPurku/8yqZuDKvQOWB6T51R8OObz2czoUmehCzVZDcm1zy19lDrQ9ZO92vcRncBqXu1UOzp9dW92b14kHvQOiZZ6tReJVFTBukyH4m85Ud+kDhyLpoUtCbOIz3eC83yvzRrwvV28jCX9jRy5UujwsDMsQSHGgbqHIvWNXeXDou35sgBAUb133LeC+uDweLp0BTq2r/ETDbcXP8otPkozu4aA1db5H/9pkAQtsWaOLSm5fqr7DvrT0jFz/cTQRpQXxiNfo11xUKkSqR7Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from VI1PR03MB4973.eurprd03.prod.outlook.com (2603:10a6:803:c5::12) by DBAPR03MB6438.eurprd03.prod.outlook.com (2603:10a6:10:19f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Fri, 17 Jun 2022 20:33:58 +0000 Received: from VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::d18f:e481:f1fa:3e8d]) by VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::d18f:e481:f1fa:3e8d%7]) with mapi id 15.20.5353.016; Fri, 17 Jun 2022 20:33:58 +0000 From: Sean Anderson To: "David S . Miller" , Jakub Kicinski , Madalin Bucur , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Paolo Abeni , Russell King , Eric Dumazet , Sean Anderson Subject: [PATCH net-next 12/28] net: fman: Export/rename some common functions Date: Fri, 17 Jun 2022 16:32:56 -0400 Message-Id: <20220617203312.3799646-13-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220617203312.3799646-1-sean.anderson@seco.com> References: <20220617203312.3799646-1-sean.anderson@seco.com> X-ClientProxiedBy: BL1PR13CA0384.namprd13.prod.outlook.com (2603:10b6:208:2c0::29) To VI1PR03MB4973.eurprd03.prod.outlook.com (2603:10a6:803:c5::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 10798c05-9ab0-467a-a3ed-08da50a0b4d6 X-MS-TrafficTypeDiagnostic: DBAPR03MB6438: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: NSgm7muY6dqAWiOuoN6kwzZkt8s/Z+yOwM5Py+IYiVz/+LH9b6zx6e+pXo5EhIAphPsebRPR/TaxxoB5wZkxDVudFYAECuCvEErmdtRuj6IG5Vo52VteYqk4AT0K1ldxmzP5n7hDhk4F/Rk3sfWrwqCS/A0Lh+ENYKGbYLMh7RWRc/GJHrWf0500+hHwtwXRtNcguB58KSh1NYo0XeLQsZrod57gzNrMiAhxiTO+k7TJoPGuh6sm1DHUTXmGdUrmvg0r2S0g9aXn5Otzk5KnBZ/8dRhZFjW7mtKI1s11rFx9KNSMOkxrl9LSiFH4rZMLqlhuaHTTcbxr6xcnO6fKPq+2I+xUd8VEe0M5dH3Ri/gU4gliPBwa9iyjUHmcAEzFWH8gYtbTxeCUYMeLLSfrgTGrqvQzaQED1bl6YPqJpL/h2Zya9dMv8OBHvwXJ1zHcJFMqvxcPQsdlxiBbPcb6KwyvAcV1Gr0fyWSvQtlJ/X3TXERgiDj15pZGIecdseD1r0peWj5Q86lebViMCOspcj1BXmj7qihw/SMGdcwB8+KYL+8YmPyMmZTrbvYMa4ykdJSvk5PqErAoTa6ytNfovRwqV0fbZHgNsC+6lpadpRBVG6Cjl+KGQ0j6YrYfDMNNMAk+6GxOyBvcygAbqTQAaMkdAqv8WqKSF05wsugYyxh9k8AbL8D9J+sq7x2Dxr0o4QvzwtdFxQW6jFvaYjFCvg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR03MB4973.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(366004)(54906003)(498600001)(8936002)(110136005)(6486002)(52116002)(2906002)(6506007)(4326008)(26005)(83380400001)(66476007)(66556008)(8676002)(316002)(1076003)(36756003)(66946007)(38100700002)(107886003)(38350700002)(44832011)(86362001)(2616005)(5660300002)(6512007)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sK2fPhYVM7lwSCua4bmq5KWhv8wZVMNdP+5FU0QAX3xre7q/jDtqYYF/xn/Xr8AUgNLHJcOQZ9O5CdMmvLnQAhO2TL0KdUPWwxCI8A52DiaRR/DYqBamxzZpoLI1OC1KrYjQhWIw+lLUUR37eO50imeDHqEAmceZNIdkIDtB27fQBxSE4elrV590HGIjLjeE+/q4Obu4U1juO+jVHVvdP+EHp7T3TtG/TkWq/gZ3DLpxxb4zcXQB+mzjWYS0nk0LES/H3GhL8C51VHZ5qIntwJHmz8VjG1v6Q7Y7Rw+YiLyf5DKIszAQX1bC3n1YW5Ia/ioCRMWwJQcIzkNiKwPJoNW19ucs/1w9jsoS847k/6X0Fhh4kF37P2ZkwHsT/bOLsnmxvf/z1oyETYQqG730AxuML5la2R2wsCcSC47MUkDQahSSlddgsHed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gMOfZY/PcQhJ06B+wcrBDaSi/gPZRXjK4snp3LEZ4x+aTS6rl3zpaFrfX/5Qkd3U8fhAjXoN4jZhEYzypCHo8hxyhDy1HIamF96PiGZpcHMUqZio/lCwk2T3kZ6BuoV6CB6PUPwNZmbQYMRAnN6It1lzXzmQ+s2+pALxxqqhjEzJapCzSUfwtP2msI7R83npAchtUNl+KTYA7fvjzaRACozofCRV8snwQwC5xXhv3wxj1fXi2zfN7z+RQ4908XvS84c8= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10798c05-9ab0-467a-a3ed-08da50a0b4d6 X-MS-Exchange-CrossTenant-AuthSource: VI1PR03MB4973.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2022 20:33:58.6551 (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: bhw+4yAu0fRRdQXN8E9bAE18z/gRjC4RHX5FhGsD0/V6mVT9ll7EVwlkmcPyTGDTzYvLtOBtcPqr5UyE2ljzKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR03MB6438 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220617_133408_813046_C23E66FC X-CRM114-Status: GOOD ( 11.59 ) 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 --- 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 248108b15cb0..ac26861ea2e0 100644 --- a/drivers/net/ethernet/freescale/fman/mac.c +++ b/drivers/net/ethernet/freescale/fman/mac.c @@ -62,8 +62,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; @@ -86,7 +86,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; @@ -281,7 +281,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; @@ -343,7 +343,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; @@ -410,7 +410,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 */