From patchwork Mon Jul 25 15:10:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12928238 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 86C12C433EF for ; Mon, 25 Jul 2022 15:38:05 +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=0L99unxUUKgjsLAIHbLPZsTim/jCPHsVHXyYJabA9oM=; b=Z5nFGS1QPEjXxA 3QcTernctYIUsqewdg1c4zXk4DldicctRzhxNM+xvGytLXXfv5X6Dk0RpyviKapvttV3+Bp7fCcaw XI170GMd6JNc/v4n7XQVbcpKGx/yY6jwQoYLghFPAQWJprB6Y8ndRstUrc0dd8LMem/p4o6oGkxQx /3slgvQvDZDKBFxmptvIsUM2me9PzAcBrOb/z3uwkKhOKySnJNFy6l5sraibuVaQrb/E2ilai05zA JVWnv49qZjuMg/WirCNBcjl62hPSfxflVmPIfL650yxQEJZciaMIXaV8Kl2TZ279y0FWaGK6C3EoD 4DOaKPvumFVLimqOa0xw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oG081-00FOvg-Av; Mon, 25 Jul 2022 15:36:20 +0000 Received: from mail-eopbgr130089.outbound.protection.outlook.com ([40.107.13.89] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFzkM-00FG5l-Sl for linux-arm-kernel@lists.infradead.org; Mon, 25 Jul 2022 15:11:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jC8Eb9Ndy4VIVc0ciooPylvhL5xlcESmW2r1YJ0C6VH1feZm5ZIXjLuZ3cOL4bBCCAJK1jrVKBFSUzKu7Nij8ETNxYAO7U7p4X3oFNvf8AhCBF7YGQOswBf8oCVbw25aexB5yZAlxIjfg/7LdBvx6iwAxQv4OySGkplZ331klkC7YnP3uaBY5GHsz3/XYBNCWawSUAuf91Eay0bROcgriCtiEBr9TuY58yuSOo96sTxVN1TZyCFOtu98DZ0VGCOChJ/mGbbcj+db6Kep5U+dYEwRpnG+PqOvrwUpXNR/iZ3bhTEAPnfzx/PMH9yXaW4skejPQhvasRdzlkd4uMA8dA== 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=m2icLyPw92tchujC7meQbydBWVzlYIdCZDbwzZflRR0=; b=W3vp97dXS2dDWAjQp6qGCk48FbXl+VSCdypdMEq22+YcSgakDHNrD6oe9qBuO6LUtvwRqm2ipnSqIs9TzckcF74Gi6xKbnRyE7miZTKz11qjWn1lMKncZF3Atb48g6I8VYzr899QMPfBB8S9V0Tb2gMWAfNtYU8lS6Gp7Rdsn5Lzv1/Wyb0KIYgkCNePUMGopjwkwfUB8HI2GG78RYKY96OgMXWqqy83/rIp+gn3nPg9H6gGeVbPDaPF8M5cYw/9rTeyG8RWdQDsM2V/Cyi+R5RAElbdFyb0X0b5VkjZ9Xc1Z7Ngm0iOAoJA/WTrzFEDtzvk3gcn7piZs4dIpul82w== 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=m2icLyPw92tchujC7meQbydBWVzlYIdCZDbwzZflRR0=; b=GXvUeNlPiT1ApW95/G+OoAUdCzuwqBa5e5yVniYi6H+qdbS2MtJl1EyugFF709ZVYGk90sXnCSjRzTqdZ2v1E/3LpMesf51eSTdxitf7AI+PQ2HDBj3uIsmmDUAOL1+pmiNxUFDxGMni5ErPei7ldWlSfmRDmeK4St48aiht4F2ZmuKdJBcnlZYz0+Xj+Qh3AFldqDY//FO3FLzpqjRC9t0yoyNN/mnLfrSpw3/fZnUsZcC1+upH1Squu+ezqzgGsKolWHkca915ay34O272SXT3wnilG7gfh/FjLDwZCX/SW6tYO+Xc0LXj1hpO1M8e2kXgivWumNwO72lIYsiJrg== 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 DB7PR03MB3723.eurprd03.prod.outlook.com (2603:10a6:5:6::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18; Mon, 25 Jul 2022 15:11:44 +0000 Received: from DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::59ef:35d2:2f27:e98b]) by DB7PR03MB4972.eurprd03.prod.outlook.com ([fe80::59ef:35d2:2f27:e98b%4]) with mapi id 15.20.5458.018; Mon, 25 Jul 2022 15:11:44 +0000 From: Sean Anderson To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, Camelia Groza , linux-kernel@vger.kernel.org (open list), Madalin Bucur , linux-arm-kernel@lists.infradead.org, Sean Anderson , Li Yang Subject: [PATCH v4 25/25] net: dpaa: Adjust queue depth on rate change Date: Mon, 25 Jul 2022 11:10:39 -0400 Message-Id: <20220725151039.2581576-26-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220725151039.2581576-1-sean.anderson@seco.com> References: <20220725151039.2581576-1-sean.anderson@seco.com> X-ClientProxiedBy: CH0PR03CA0229.namprd03.prod.outlook.com (2603:10b6:610:e7::24) 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: 0dbc1cbb-3144-475b-50e5-08da6e4ffc61 X-MS-TrafficTypeDiagnostic: DB7PR03MB3723:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /kkuuYPOJRqNFrMqtROQOLaW7oQIhr74uA4q6JbysnLmkgIGf0i/Z2A2WZhfihPM67PYQ+r0c/IUJ+DzmE2eU6a6MkYTLR6coeT+0kWk0Luflgj3MC4CGj0z76/Gc9V8qySmqLqZEBrtrgOMykg7pEJmICmxeSMhbqOeNYW+wCG7YgR4TLohsDRRgabbjgibI80JA2UwX0wkwaFdUO2Z21NKKcQTnmB1y8BCCqcAm2Pdnoa6V2WAv2zMEaarq6tMopVmj7kB4Qr7XAisw33tIxsLMZQceZH7Lz+QRWIDgE2D8eZHS2zXtWZBN7e25ri1+PGBMvhwZq/meBVoHjsEhL3Uuss6YUwdlZ2EJGrms38x6HCorOUSkqf739wtlVmEa4Z/5Os/VsJpjPAOlZhA976spUnjOaPiTVYgU7h6BYsuiuc8g8pQ4s8+U/9g66UodD2xPtYK4isH7WiFY046PCBx+jUKM9OgKt3a2qTo+7UPqn8l64rPQDpPB3biPN08JkpKtaY+jlnxmZXEOX/fVCjw6y5KnVoFOmr3KYBGkwr3bgFmxgSXn5fisIIlAE/xpyGOoDL07jQgvYY57Jm8QZQI9qjXr5IuASBw/k9Tf3LBlWnSDXG6yb6rkAs5F8z5ima0OcahxCc87gr7HKBxpRO7yZuirgHumxM1IdsO9vcXpQOjDPbCGJE5tYn06Qst4NCDB4U9Uzu0NJANV4rI23w//bJwBLwmLfMKxxpVEuFPmM063BxSOLsFPTHkJF0u3xz+ScWaZ1mEB7K42DEKvDEOJVIxdHnKlBoycKsa0QU= 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)(136003)(396003)(346002)(39850400004)(376002)(366004)(186003)(6512007)(2616005)(66946007)(1076003)(316002)(5660300002)(44832011)(66556008)(4326008)(66476007)(8936002)(6506007)(7416002)(52116002)(54906003)(110136005)(6666004)(26005)(8676002)(6486002)(2906002)(38350700002)(86362001)(83380400001)(38100700002)(36756003)(478600001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CA1vibEQi+6AZaDHV9k+yure4wk+N+3uR9DS0MghHP9jZdoiwhAqQZF69I42BSIvbq0oDnF9O4qoW6c1ZlQU32yI57fQ8emc/6oeGXDJhDTOL5TmPerTBLNJWfsPwIrqrF10i15tTXOTJ1Gmkn+vBKi5MOBBOUS76Cc8Lceo7N0YAr5AWnOCsT+Qsq3LnDyWIzj2jRs0Bt9IHSR36Xuqe6v7/0Lgn8Dcqb/PKKeQUKaEEEleJk73MRcg/rv+Pvv4Y7EKjdOqdiGQNMEz92Dy+FVDRDMUpG9cFy0p3wRH/vDdhmwiNNnNU4vr9zX0kBC4m/+npctIddif2yf2cceQK7OReX84JeiTHoa5Gd3lmFwnFvgvheoaJkguD3gbS9ps1UeeZfh27chrTP3gzTJX/zFx6nfdkdLVleciCDhV3LsUoGLn/rN7+mkyVVN4WBVI+iwLgVyV/1nnqaYLOC0cnBgb2pP+if0yiVr8760IFiKu7AAkOWySc5PbumWYXQwAV1shFg3sIUcMsWL1w522TyMoyL4awA46HdrldgYiNxiZq4FRhVcMJChvgyJkYIoqL/LiFSxXAeyRaZqnsE9FHWB6NkmEInnoHFrDRrCx8Eqpc7vEd0ejmdY30W/hZ/YWANBd0kctMiQzEkx8RtZL5kWvGBw/LbsUEL44tDmMCpgCNF+RPi7zk1gwnvNBs48tgmXQddECJU2ZEJ+f6GIyPVJM/Uwm8wiYnb5Q51/PG15x40RMbQvD86MvmDpAMk+zIW/3/NJLRwNHhauAAEUFyKLgl/CKwJT7aoy76ODwz5syvCSLDZscHxO8/syy8wnvcQ6CUJqV9VV6AWwRp0mGhxtdBc7Hc8c5heTR9+8VwPcK7816XJyz1yAbcKT8ongYNK6r8sSA334vdwh9ra7xoLNk8K+dTWpoQNobHB1xSepW5kYc6Fd4TvA99ycHM1aNtfaEyX2/1bK66hm3vlexP0dAB2PLe+oTXO03wHIsPwl3J3Fwe8VaUx4hODjtYEEn1FOltrm2sfjuxSzJY5RmydQG9HbrWg3kXTmp3jFNgPlpG4uLOjRhzMhq7RQnmiZy/yU65WM+CcZ+FnQydt2TZj6y2fkqVYRK31aY/bMHZnNnmaUGAIuC02oHFTXNE/cwlzHqbI/GN7fNYq28bLAjKoA+TGIGnd8G7xkO4cZyYWTWAk8dbLSaQE5iorL1TmN1g5qnDkGHKPMzXP5+rSyn1i+yQzX61/l92/PZtuL2tjkMUFc653QtJrX6fCAEAkxQC9KTFWUg/HJAd9HjioVxo6XbcvZ6ousf8AW5E6CUYO2eV5KIWCilw5Dg3PtQyMOwFNe5euN1zHNEA79JDFACOU3rgF5wsR8Jfd7wFIl8Y10Odc3b5xzETLHZJhhFm6akz7NjGMIhvszdIl5ZbZcQNXKPLFaCclz7+Khwpr4DtrQr1SmUMaOKaZzlWbxxB9/T6Bkp9dFF/c69+o2qRB4P0leNmqE+YLZ3bOR7nCnytk8PqhNBj8jrfhFL/rYzScF9vqyH7F8Z2gwpJ1Z7z+gZS19vUvVm0X+jqc7ILigxIEaYuGBFOsk+3dwty+/YhI0p4gxjjv7SPvS7I1ypsLgePA== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0dbc1cbb-3144-475b-50e5-08da6e4ffc61 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4972.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2022 15:11:44.3929 (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: 0W5sY49ioRFsnqNzEEgF35m0wrVCPBsetM/pxOW+JhN58TByk2B3XgqUB9qwQdsR4+1TwaJND/pYH2MZDW7okw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR03MB3723 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220725_081151_002227_9BECBB10 X-CRM114-Status: GOOD ( 22.24 ) 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 b0ebf2ff0d00..f643009cac5f 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; };