From patchwork Fri Jul 15 21:59:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12919843 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 57126C43334 for ; Fri, 15 Jul 2022 22:19:21 +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=v+LQDbX16RY7oIXz7/nVbc4uGcD9DRMnLwzxHFjLeCU=; b=mNn4Zef/q2y0O1 WGsVlGgETB9/CifEI27ib13are+RFIIpN1W9HA9uvRO/1kccJsQxMVAsZ6AUvNKnjwTSh1JmMcPMl pT9vzoP4ggUOJnh9EJDeGBKrjomB9nPms8xpJC2W37N2cLVqRgPhhYM9ldZYOkYK05vXg8nRwtBie XGT2Lm63mDnIMPauVHtS1/Qr059+hp/utNR5S2O5v0jUw0Au8ODuqgGht3wq8FFnKQlPJxdhWUAqc Nt/LLlHiZ/M1eeXvTGZYf6k9LmNWrlXDKGIqR3XmLS/RWNnZopMEVGarwbdMIe7CAKj3cxkf25LeK Yks8kKG7EY5iXcjzOmWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCTcu-00Aidk-M2; Fri, 15 Jul 2022 22:17:37 +0000 Received: from mail-eopbgr60055.outbound.protection.outlook.com ([40.107.6.55] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCTMz-00AbL9-A1 for linux-arm-kernel@lists.infradead.org; Fri, 15 Jul 2022 22:01:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UOauI4paQaBkrROT14tChkw98Iduf6nhWETHBu8Y0qV8S0MhG9NoY/Z3fcGswS3a2e1IvLeCknLa/OhuqTVqMUMh74ASSV4EqmehSJ7ZmyCR99s7Rj5N24u4o865C/seH9V9Akzx8Pb5Sx2xhqATsbKqm75/pPtaSJiRRyGTwstgJ0ybZHlDnj0FS7CT4Tu3GFK2vFRukl4B7UsBYeSlJB1lvAsg7UAssIzDUxolvMcIiSea57p/ceZwjx5l7iwnPlDBJgqf4t6nUSdfrRhgi/SzuHval08zbmr8aLOUgPdtZKCRfGJXX8QALrNN6B5FQwejhbKrtxtJNTS5gErYAw== 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=vYexCKk2TM1BAW0Gp720sPM/RFhxakg/POT0BvAiBMQ=; b=KEvsSjrvbeagRjMkKmAVCAz6zFJII2vrzxHpSxVjqh/B6YryePln9FSuzZQB1jMyrjDO2fv1aZxwapE3OL6Log5DhK6iSQYPj2aQLpzu44fjKd6MFAgLGLqQF8a4T2WgfD9nAauLfTs1eJ01wzM63fbAVpAeWhT7xLUytqu0ox4kM1wE8iXnIMC5c31uGEFRV/bAE+05bmTObkrNJt1b2OR9K70YB2OM5Xk8A1IvyMJb4S1vMcZMDluKXdCG2fMAoObdJMq3uwzy409KApz/sQ2c4oFDMnhjPuS9UmArFn2sMsd9eV63bX3uqiT5BaZv/U5Q1CiSbbs6SMYQM+nRxA== 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=vYexCKk2TM1BAW0Gp720sPM/RFhxakg/POT0BvAiBMQ=; b=Nh3m0MxYlLfy24YkPZE4uWQnOcpQTGPuqlqQ47bPbyzxX4GFc95ewzKgKfitC7GH2+qEYVwS2BDpKtexvkOCyVk6Qx2TwoGzq5rkzUO8DvBJc17yloN5HWlFMmUCE6ksMhQ11kaHzibFPiUb7D8AJ4/wPUamgi8IPiNmAT89d68OwZK6gUJROT7Zzxk9H8W++5QWG1L0vaT7YK52pJ3GrV/ZkF8orZ/2lrS4njixx7hsgqXJlop1GGfz6khYqk9UETdXrZr9Ph7Th46GdLxHtwZVhufvvNS/nFh/Phc2xUY+6YXBpxPfrFDd+BVIUPdHVrIVRAy50Bv76LynNp8llQ== 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 DB6PR03MB2902.eurprd03.prod.outlook.com (2603:10a6:6:34::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.17; Fri, 15 Jul 2022 22:01:06 +0000 Received: from VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::5c3e:4e46:703b:8558]) by VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::5c3e:4e46:703b:8558%7]) with mapi id 15.20.5438.015; Fri, 15 Jul 2022 22:01:06 +0000 From: Sean Anderson To: "David S . Miller" , Jakub Kicinski , Madalin Bucur , netdev@vger.kernel.org Cc: Paolo Abeni , Eric Dumazet , linux-arm-kernel@lists.infradead.org, Russell King , linux-kernel@vger.kernel.org, Sean Anderson Subject: [PATCH net-next v3 23/47] net: fman: Export/rename some common functions Date: Fri, 15 Jul 2022 17:59:30 -0400 Message-Id: <20220715215954.1449214-24-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220715215954.1449214-1-sean.anderson@seco.com> References: <20220715215954.1449214-1-sean.anderson@seco.com> X-ClientProxiedBy: CH2PR10CA0009.namprd10.prod.outlook.com (2603:10b6:610:4c::19) 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: 352a50f9-4d28-4ade-8f78-08da66ad841e X-MS-TrafficTypeDiagnostic: DB6PR03MB2902:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OE9QntMVjzBlUOs0SqTRWGWva01hwkT0nLXYmr7jiBCgNxjg614QPtre1qMPA9eRW/KQxoqLktGKUkPGH6TS2piiNl5Lnb7zaQUFx3IP90kY1QLb69vnsxnXYowtEMW6TIgmhaC4jslBIZBrJpR3AnvgjyvDd6xVSRO7IOG6khVIh1mALodCJNqiz+VBi/kPQdw8SzAEUf3YgTXCAqFaBZngahD9BnzetlhJtw+qjTGfgxdXfIikMDsorRpEU1Qa9DxZVh2jt908UjJXNpJ7+vwVLqffGS7eH7h4JfqC6btSDWrYyJs6pkmej32qvX1770Ssr3ekAeiaZka1PySQzBAQlYn7+QCu2rq6+3BHkyRFCc2gWmuwWPKvlYphrFDrgInT7OOSj0Y3D0OLAGptkaA13SVvNkg2zi9rXnHusufmr6N61GBE2DfoLFfTvoJPZc6RDVuqsJhrRmx9zbTdvOMldFEGmdLx+HU5XzkTRBsKPt4uwkD4hCZ7zkQpsACXutJbAQ6k2h0gCSgqVjVDaaDKb9Xsm0NQ+5WVBlpqKHkuPNkfZWtf6TvgWisBCM7py6J4Q0yCgRiRdyfDOGsvqOR1YeqDnIkwb2nykA+GFwyWfGkmXdQqAX2Pov7+wWoVDgoYSgeTW4QKwwSTe2C/feUAPKrdl0J+EJotgGVh1qVuy3UZowuZ9FN2B+f3d/X/ejaLF2e3L968Gqg5dO4qNs0XXCa8uj7tyRkm6n1peM63jmC3SStDX9p1NleOJESWhpAorSbOjBxTP277lHC9bZw09ZuyxAlRSSBhXA/4f1YawPbp12i2DYr21oU9iQaC 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)(346002)(366004)(39840400004)(136003)(376002)(396003)(86362001)(5660300002)(83380400001)(6512007)(1076003)(107886003)(38350700002)(38100700002)(186003)(2616005)(36756003)(26005)(6486002)(52116002)(316002)(41300700001)(6666004)(478600001)(6506007)(110136005)(54906003)(2906002)(8676002)(66946007)(66476007)(66556008)(44832011)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: txmS0BLZp93OGIsaSrJbU2fdfqNaHNsT+vIbp9DTPPmw+uE0jrjWlpuIQg2oQYG5llvrUcMrAEuPaUvCKomTALa/u9mRZG4JCweVINBpbizORGhIFSQzNJ454JKKLIAo/D9QVqBbMfK/ibOzV2eilYcTT/QQU+7FAgq5pFRUrrbJrnxLYSWQSal3FNXOJ0YnDQ6pN/+qclY+vH0VDfNKvUy9aazqMLmJ7lOJt2hN49quvWrKHbR42eLuDF4uGjT6ZEFZc5hMpMEqXPcMDEZIwt4Pj9rtI3IS4oHvnzgpxPuVZPeN6Z+0//t2R3QI91hs/ZWIUbW7bWiYjp4DHV5VRjnVR/qh7PPoD40CIS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zaPtyG/r4vowjuy1uJnkAQNMZwNvNyhk29tw6aPg7nXmMcT+lpz4zjMDw4auxCAyW8vusqneLo3JHIttgSne7BlzwNSM/TGlAPCrABHvtpIG2K9vXVC+WTkHoBDV9EQDzr+/+gjedQbmLNCLF4GNypm/sAvFh18ezsAEnQZOMHw== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 352a50f9-4d28-4ade-8f78-08da66ad841e X-MS-Exchange-CrossTenant-AuthSource: VI1PR03MB4973.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2022 22:01:05.9879 (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: SYfGCIbFgXRysPIR9hfio23fQnzitxPSixakRdFhrpqx5OuAAcVNlSZddtAoRQ8y66GTu9Q5qWabRCKhzJZ2kA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR03MB2902 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220715_150109_404981_013E7CF2 X-CRM114-Status: GOOD ( 11.99 ) 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 */