From patchwork Fri Jul 15 21:59:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12919873 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 CCDF5C433EF for ; Fri, 15 Jul 2022 22:46:50 +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=nsz3OWCG6V3AAEosEkQp/o1JLyECOwtvfycpNFUAXRk=; b=VGIpdHwe6OQmde JRQ246AuwGbp0sKTr8hudtQl0RA3zB9T2qDH4cx7pUHUyj0mPxuklcXsiBT9eHT4hsWozSHM/rw13 3fnFre/f7X4CvRfDQEccQ9Krfjsr9HHPxw7d+isLD0mcR/r57ukPOu9+HUpl7/Rkbzgxooa5zjHTA z0kZboFIZCKmiKnQy9hfMsJo16BiH75v2yQ4rFGmpdQH4i6s84qKHlgO7KSaUMYiqHdprgRbox4dV SVr/BiUbXZwSAxFs75Bg3H47kg7QbPVL36AWBsmRKCA0EhmXSX9IMQ5p/QdcgPDDuZfyvu6LB4dM7 pSm2MFawQDec6JVpPZJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCU3R-00ArPp-7K; Fri, 15 Jul 2022 22:45:05 +0000 Received: from mail-db8eur05on2073.outbound.protection.outlook.com ([40.107.20.73] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCTNb-00AbaP-6O for linux-arm-kernel@lists.infradead.org; Fri, 15 Jul 2022 22:01:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dgcHjjJQMe2TeXRxqrQ2nLkOnJ/H/99mNuWookim9vdnLiZD/XpCXSlrCudW7cxxjepiXdHbixzTF8Gv2CnOryrbpDKVOf+92yGDdzfmoxlLZHrgh+XH1mFj0i9j5S2fxfLTqDKws9LtiP+5dAayluokjsirgdRhy2GSPA+GNsvOvEcm08uVLchdibsVsWkdjpLkCtOVKkxLM+smMF9ZIaNraTJjrKy3YU27GWV7SAyQztQGW1kkqRd6/ooukcDUST/SBYGxKrw6sDH0xOVQVuHmCzwCYAx4jY4Y+v0v6EFQsWYF9XYgsX0v7U2Hqfklni90ONQjNEomXqL38OugeQ== 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=ClQv9/2FPO54g4q78T3PSaIdaYtS2SYF8xNzSGVDR5w=; b=m6fGtDEOikXOWm9Yf3f4FSbEHdNHZzusoAQmfx4tNLt165XPjGwHh95LZNEFu1fqM0XdIiqDzNs6eEVdqljBzuKPev0S737zT4mX38YyE4FB83Ofo5Fm1+Zt7Adda0paulhPwyFSfu86fsUOMJsgbu0jO3BqbvRurxNIq+ugpNeSeLyuVerIdnQC9hta9O2gTDckjzsAOxeWdFeoOVn5jwdMAWycX91EnKH26EL4r5LQfvEhpH/LYbKHavuPIRYyWH7cTf/0iBOM6q9tQ6GdRfBoaN20kHwETrVcMOZfDIBqQuY/b0REPeZs7MMeK5ZhJ1oF41ILiVS+UlNV+5GsSA== 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=ClQv9/2FPO54g4q78T3PSaIdaYtS2SYF8xNzSGVDR5w=; b=q4mJsLct73dCTdyhM7WhA8Se5mE/k9buuaVpUPwOA+4oWRfxTZvpqaMglx3/u339Y6ZJ3Q138hDpczNg5JON9UpBdwM+jJKK3/wpJLSNwA8+FzGZ0AC03rAufFMuv5u2Bcjz+kCSmRfInyfi5bCMZVuafhtTEPZ4CglM4/+nnXIWk7x1H8oDfO/wCmvswNj22D491YgmGHOc8BU/zLUrO5dn112AmL01LTuX7nPSNuGBOdmpERvsKO90vU4fC52NoBqPAmLYGlWIFe9Gq/FwKCKAeW1jSn3FTib/vW5P4Ol1fkxUEM9Ieuf8wbGzLSW63QCZOZ/GOCG8sAFo/w81YQ== 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 HE1PR03MB2857.eurprd03.prod.outlook.com (2603:10a6:7:5f::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.26; Fri, 15 Jul 2022 22:01:39 +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:38 +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 , Li Yang , linuxppc-dev@lists.ozlabs.org Subject: [PATCH net-next v3 38/47] net: dpaa: Adjust queue depth on rate change Date: Fri, 15 Jul 2022 17:59:45 -0400 Message-Id: <20220715215954.1449214-39-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: 52060cf8-b1f9-473a-fbd6-08da66ad97a5 X-MS-TrafficTypeDiagnostic: HE1PR03MB2857:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r6/2JsEs79TSkmhR5AFjtCYzoYmr9GGiHQMyksU7JOI6roP1r36mMS4kBWEIQ9i7WVpVpzFES+lxRhseGkSlVHEnZmyV8KcuXYipMzOJxkno9GPLipG7RMH0B9Vq7cSmSp5QzUh/WF/OU5xxKPYiKE27MAqjNMHTmAwsl4thC84KBr1244HYadMVUfTsE/JM+T6yHbLc1mXqrUPZcfY8SaFZNgjGxo4j9n+SvF93zx//LECEhE/wZMndUTJhSlQVfvYl6LDp8l0UIoQq51jUhkjFn8SKZChLIxwsfv/v2wvf5rJ/tqEamD2i0YOw3mLJHBPuA/E+E+uwmpNejOIEPnlznSb8Qu8WMTwNmyUPR3UioNayEv5s8F4X9to2ThCasqG1gx20jn5NgE+D1Bm+tyJeBMflzTqwp3xdb93ojfN5fwnDDUzu0CNOHW635WOul/ltgxCg9rhTBWMgl8xCmZHtqxVHVAxKmQSzXeLeXhTNs7wQwCGawlwN25l4ovkUt/y7RVfGIrvesjq1sux+3eTqMuiwUKdp19pHMYBh1KD9JYSJH7bBthlVMksHO56GU/FtUKteAT9FfcXzEi0+mv5Ia711OhfyAzhyvyVSG+NXeDhxA0R7TtB41szGwoeIfBFH+U4iD+5znsyfcz4Ys0D/vTQaewAHCbGWAxN9PrYqwdvdDV+E+PaAaKi1BS52PD0eMLVRRDaaVbW4vh9SK49JEJdAdnmbPhci7TgoyIDrHb1MS4crM6qL+GAMhmfdKLp+tyrIwMttmuZUCGglh4cWQnEAij4BdhvEnujwOSbBLCru2eoJqBq4SYDf5y/h 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)(376002)(39850400004)(396003)(366004)(346002)(136003)(316002)(54906003)(38100700002)(2616005)(186003)(36756003)(2906002)(6506007)(38350700002)(26005)(1076003)(86362001)(110136005)(5660300002)(6666004)(6512007)(66476007)(4326008)(8676002)(7416002)(44832011)(66556008)(52116002)(83380400001)(8936002)(66946007)(478600001)(6486002)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YN85NKAnsRn21EJGimE+HxXNLkeAiCDwgfzYBHgubAaKUn6Cv/rhpdRQxG71475/zVy05WySLMNYPOsFLVOgDZl56zs0nQC0Dj0/ROPrttfUaP6uc/NCBvWInA40lM59+k9ajJAiKfubjnH1/6haSsJClQcYPfMkUR1t+39rKJzSN3GPvuOnB4g3Uhz8GLHD8feMYcXZrIF5ARmPd51L8vUyjjtmTHFEHfuLK3iBwIRSYPzRI0t4yOkC8FCxHzjQd5VxRjJHb5fAo5kbnrmCM89sg7qcUFvBB21+usnHCKVWMfWkxfBMhFBB3hSUwLbsLgPUWhYJZTsXJFWmp312Jy6f9RFR/6loqWv+7Ijq4pgE8WvvkBOfxEgfNOQoP3vPNiXP6Dv6rKgAzVtOeUFxz3itb8Nd7LvB6ocnCCpmVVk26jaA3bWKLRygiC+5ddOqFIJNuByFH1YlXx0M6XHRWoH/RqukldNMYW05zdY55+PJQdJC3x/oAZQ/pGeS7g1oGaw/S2CXrqya5v4SLlLDrGjElYV6qxTgDdxUbzSxnfGLGGduhyPEX+7ejzerQw17nikUn8iktgQHqAdUomym1zsqAifUphcJjCiPP0qPLsmBFV3Vd3ODi5BccHpqJvsfCMqRNtX45r7f7PKZWnraR/jORwRi4oi/CoD8H+WTGCRVNoSP8VuDm7j0X2WL//AiZZFE9jusr9t78yFB6pEYqo6qBfz/gtJxLjfDhyvfGKJaWOPI/vY6NAEc99k9ql9H52sSXz2bJ0nKz51LsdAEzHe8ZF7CzSd1KQDV8rTWkSkI54HFoRmA6sTBFk0YOlsK3BjtRRF469T3yXsy9y4uArCuuUsYg9DUdJXmkjJMO9LssfNycrBTFSPwIdVWq5iNc0vo2B+HzJioKiFDPv7d4GLppcg2yToYu9AZ9oO7Ds7KQ8NS6huG4DxWGLPe7jJJilm6ziIsLspcgQcXYV2xPWoIcofDbyFInDldu5eLQeSYjOsiTGKTkB82RVnZxExabf70dUULiByWs9yRJM2EAyOjaE6ynm27KxI1KrRC+nFgWGIDRJIyj81CPprKbqC7rlDITK7sIojem1klrgHwWxlzwk0dND8ksu7uegVqrlX5FDDaiUYVB3FxtMMYkSNMhXLm0YVEoLvWwgiRhJgoGZLbietkAqJ1GGJaya31Z+WRLGzdsyKIigAtGcCmSX1yMAzwWfA+fnEEm9Zq6CgyaYwHXLkoXmYtiNPGz8F0IN726gCqqNRi2Fo+iV+Md9/7v644KGhBC6tWxg+1FpxKkLdU/fZ73dsOpNyAu6VoZDjv1ekEQW1XDOevBi7ZW5SwjQKlcupe+rJG7z0V9UifldSUwjxvJ+X2ThH+mIhGOWptTLL2rYPf2z6ROiAr4oAT3l6SmbOxpweYJkTO73zBhYHnDOnY1TPLLb/uBM3H2jJItTifi/YZIA5fIpQ5lFN/v7WWif2eRxC2BDknurnZCyp86UIBGslmHiktTVNGzOTLSSZCR34UgoCCEgT93/adKpY/9LtzLt/tR0lhxmMVL1D9LuVoHZnBDfDhaNKkfMBSEcKcu1sotDZ10vuyHHRvgIJ68AA7wkEKzSDsIxG+Qg== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 52060cf8-b1f9-473a-fbd6-08da66ad97a5 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:38.8615 (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: AhGeiAJC1Uza6hXIidjPm5LJY2mMRaqZngEmNs8170g62V+7CEVB2OBC4ORTP8XZgjxMJ3+WLsdWxNMcjq88gQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR03MB2857 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220715_150147_372848_7A7E930D X-CRM114-Status: GOOD ( 22.57 ) 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 Instead of setting the queue depth once during probe, adjust it on the fly whenever we configure the link. This is a bit unusal, since usually the DPAA driver calls into the FMAN driver, but here we do the opposite. We need to add a netdev to struct mac_device for this, but it will soon live in the phylink config. I haven't tested this extensively, but it doesn't seem to break anything. We could possibly optimize this a bit by keeping track of the last rate, but for now we just update every time. 10GEC probably doesn't need to call into this at all, but I've added it for consistency. Signed-off-by: Sean Anderson Acked-by: Camelia Groza --- (no changes since v2) Changes in v2: - New .../net/ethernet/freescale/dpaa/dpaa_eth.c | 38 +++++++++++++++++-- .../net/ethernet/freescale/fman/fman_dtsec.c | 1 + .../net/ethernet/freescale/fman/fman_memac.c | 1 + .../net/ethernet/freescale/fman/fman_tgec.c | 7 +++- drivers/net/ethernet/freescale/fman/mac.h | 3 ++ 5 files changed, 44 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 377e5513a414..a2a89f547813 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -197,6 +197,8 @@ static int dpaa_rx_extra_headroom; #define dpaa_get_max_mtu() \ (dpaa_max_frm - (VLAN_ETH_HLEN + ETH_FCS_LEN)) +static void dpaa_eth_cgr_set_speed(struct mac_device *mac_dev, int speed); + static int dpaa_netdev_init(struct net_device *net_dev, const struct net_device_ops *dpaa_ops, u16 tx_timeout) @@ -262,6 +264,9 @@ static int dpaa_netdev_init(struct net_device *net_dev, net_dev->needed_headroom = priv->tx_headroom; net_dev->watchdog_timeo = msecs_to_jiffies(tx_timeout); + mac_dev->net_dev = net_dev; + mac_dev->update_speed = dpaa_eth_cgr_set_speed; + /* start without the RUNNING flag, phylib controls it later */ netif_carrier_off(net_dev); @@ -826,10 +831,10 @@ static int dpaa_eth_cgr_init(struct dpaa_priv *priv) initcgr.we_mask = cpu_to_be16(QM_CGR_WE_CSCN_EN | QM_CGR_WE_CS_THRES); initcgr.cgr.cscn_en = QM_CGR_EN; - /* Set different thresholds based on the MAC speed. - * This may turn suboptimal if the MAC is reconfigured at a speed - * lower than its max, e.g. if a dTSEC later negotiates a 100Mbps link. - * In such cases, we ought to reconfigure the threshold, too. + /* Set different thresholds based on the configured MAC speed. + * This may turn suboptimal if the MAC is reconfigured at another + * speed, so MACs must call dpaa_eth_cgr_set_speed in their adjust_link + * callback. */ if (priv->mac_dev->if_support & SUPPORTED_10000baseT_Full) cs_th = DPAA_CS_THRESHOLD_10G; @@ -858,6 +863,31 @@ static int dpaa_eth_cgr_init(struct dpaa_priv *priv) return err; } +static void dpaa_eth_cgr_set_speed(struct mac_device *mac_dev, int speed) +{ + struct net_device *net_dev = mac_dev->net_dev; + struct dpaa_priv *priv = netdev_priv(net_dev); + struct qm_mcc_initcgr opts = { }; + u32 cs_th; + int err; + + opts.we_mask = cpu_to_be16(QM_CGR_WE_CS_THRES); + switch (speed) { + case SPEED_10000: + cs_th = DPAA_CS_THRESHOLD_10G; + break; + case SPEED_1000: + default: + cs_th = DPAA_CS_THRESHOLD_1G; + break; + } + qm_cgr_cs_thres_set64(&opts.cgr.cs_thres, cs_th, 1); + + err = qman_update_cgr_safe(&priv->cgr_data.cgr, &opts); + if (err) + netdev_err(net_dev, "could not update speed: %d\n", err); +} + static inline void dpaa_setup_ingress(const struct dpaa_priv *priv, struct dpaa_fq *fq, const struct qman_fq *template) diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c index f2dd07b714ea..6617932fd3fd 100644 --- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c +++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c @@ -1244,6 +1244,7 @@ static void adjust_link_dtsec(struct mac_device *mac_dev) } dtsec_adjust_link(fman_mac, phy_dev->speed); + mac_dev->update_speed(mac_dev, phy_dev->speed); fman_get_pause_cfg(mac_dev, &rx_pause, &tx_pause); err = fman_set_mac_active_pause(mac_dev, rx_pause, tx_pause); if (err < 0) diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c index 8ad93a4c0c21..02b3a0a2d5d1 100644 --- a/drivers/net/ethernet/freescale/fman/fman_memac.c +++ b/drivers/net/ethernet/freescale/fman/fman_memac.c @@ -782,6 +782,7 @@ static void adjust_link_memac(struct mac_device *mac_dev) fman_mac = mac_dev->fman_mac; memac_adjust_link(fman_mac, phy_dev->speed); + mac_dev->update_speed(mac_dev, phy_dev->speed); fman_get_pause_cfg(mac_dev, &rx_pause, &tx_pause); err = fman_set_mac_active_pause(mac_dev, rx_pause, tx_pause); diff --git a/drivers/net/ethernet/freescale/fman/fman_tgec.c b/drivers/net/ethernet/freescale/fman/fman_tgec.c index f4cdf0cf7c32..33f3b1cc2cfe 100644 --- a/drivers/net/ethernet/freescale/fman/fman_tgec.c +++ b/drivers/net/ethernet/freescale/fman/fman_tgec.c @@ -601,8 +601,11 @@ static int tgec_del_hash_mac_address(struct fman_mac *tgec, return 0; } -static void adjust_link_void(struct mac_device *mac_dev) +static void tgec_adjust_link(struct mac_device *mac_dev) { + struct phy_device *phy_dev = mac_dev->phy_dev; + + mac_dev->update_speed(mac_dev, phy_dev->speed); } static int tgec_set_exception(struct fman_mac *tgec, @@ -794,7 +797,7 @@ int tgec_initialization(struct mac_device *mac_dev, mac_dev->set_allmulti = tgec_set_allmulti; mac_dev->set_tstamp = tgec_set_tstamp; mac_dev->set_multi = fman_set_multi; - mac_dev->adjust_link = adjust_link_void; + mac_dev->adjust_link = tgec_adjust_link; mac_dev->enable = tgec_enable; mac_dev->disable = tgec_disable; diff --git a/drivers/net/ethernet/freescale/fman/mac.h b/drivers/net/ethernet/freescale/fman/mac.h index a55efcb7998c..b95d384271bd 100644 --- a/drivers/net/ethernet/freescale/fman/mac.h +++ b/drivers/net/ethernet/freescale/fman/mac.h @@ -28,6 +28,7 @@ struct mac_device { struct phy_device *phy_dev; phy_interface_t phy_if; struct device_node *phy_node; + struct net_device *net_dev; bool autoneg_pause; bool rx_pause_req; @@ -56,6 +57,8 @@ struct mac_device { int (*remove_hash_mac_addr)(struct fman_mac *mac_dev, enet_addr_t *eth_addr); + void (*update_speed)(struct mac_device *mac_dev, int speed); + struct fman_mac *fman_mac; struct mac_priv_s *priv; };