From patchwork Fri Dec 13 02:17:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Fang X-Patchwork-Id: 13906384 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2065.outbound.protection.outlook.com [40.107.22.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C09054769 for ; Fri, 13 Dec 2024 02:33:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734057222; cv=fail; b=Co+CqFcgTRp2TXKxxWWMMfACRIQUc18GkoBak1SQTmfvohG0q8OlJwbGqcb4GkDIK/2GWzidw3hrRV8aRLnm+oH4LwjBVP1LIZ67UClCFEaWqWYGthQT4cUz3bAfMx+ofWz3tW4Rzxszz+b15QoVUyyFu3Z3hKNnqdK1WtvRmbk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734057222; c=relaxed/simple; bh=JcmjQmXYClNk+/LZkkQoOlCYvSTkEKkBFqR9yBlihg4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=pqmXemPYJaaqcuEir9c3zmjQ1mi6os24Rq0ZaaWnCavl1wsf3wFFJSANJGw88bfx3emsa9W9BPudxeUH0VSOH6RRosbzqSmqG5vHA1lrS/zN1gVbKt+snGs/gFI6tbnyzIWLsSCJ3QsYZXalQQgiJXI7dkdfJHtF/EAoiET20OI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=YcQNEZk/; arc=fail smtp.client-ip=40.107.22.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="YcQNEZk/" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Xrsiw3Si7pyX6NWJfBuyq/Z7DRt5i5LUJnLAw8KNcxAz0jmqqQToURMmu88fx2sO0v5gwbzbieh8Zy6ddgWyn63AOe/plX7cVKhW4BDScSbBSGo7S2WsvPChW+Tc7ckUX/myvvKB/JN1gpbJ/es5qZk2zy/yd9b26PYwNJ5iaj22jwTwGpNdCQw/FRjyQ43Iq4U8uhUSaWHWxV98iVw/kPiurWStpp7HG1wz4BCTKgIdEKaIaKBtCqaJWXbNZev6tMA3P6a14QKgOUhsH6T67oDtMyz7OD9wxalpZsyrGIJl7x5XuhR24r/h405MTyhwiyCTEPHe57Jwtvphkttl5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=PQwdi+hBf8UlmY5O1W3DFR1o2r1aUrjTHTjBIo2nY7s=; b=xII5HBiHctPmbiRHy4rjF0IsEPiwqaVgz+obObUxwRjL3tDXmTE4Ma0PXw3oAGE5TrxspYB4mWc1a5EiFmsiuxQGLKTXwPKWQHGBYuWHPCs5EDuW0iZ6Od9xXTLXa6ErZlcFwf5/+SoJRnvDeCOhHNNpgkdzE3JCLCldRrznh6MgkK1JlBhpwrUq8xKCk4Gt3exUZVl+zKzcsDLGtWoIwn0hntt2nhZ9ijmwzZnOK+ChEUEG1QPCBONNNQjNLSCQLrt4LICd4ENtGrgzY4OXbX47jViHF6NpnGHStZISYpqU08a+bVMISv5KVFgyR9Anv9EZh7SaJmvIdP8peJa2LA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PQwdi+hBf8UlmY5O1W3DFR1o2r1aUrjTHTjBIo2nY7s=; b=YcQNEZk/4B52TsI8eVrZcgAh9tI1EiVE/fa/MwmEM0HtdJepSc6oP6y7VMRoDTcZ+yCPCZfaBwDZcdLslXkigvyabLA0qhT+Nye/VS+WeoGCVbCRlJCVa950g7GFwofKrkI+x/fBJ6Uw8sQbSoRPxNDWx2j7bqvmnuW3Jh4vLw7/UE95wuhwb5xfQS13AlrvpSkBhdNBNZnyoag9hakyiIU6csWRpERS/fsfvtH5I8MTRaMcz+lOfdApxOcb560lOEXfq2C4RoYzX12TYsMrRAaqHWnsK2lc6Am+lcaTyenNxjo8lTlsPT0slLhBL0f1w5+kQXsWgbIibyBaIQuZBA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7) by DB8PR04MB7114.eurprd04.prod.outlook.com (2603:10a6:10:fe::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.16; Fri, 13 Dec 2024 02:33:37 +0000 Received: from PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db]) by PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db%6]) with mapi id 15.20.8251.015; Fri, 13 Dec 2024 02:33:37 +0000 From: Wei Fang To: claudiu.manoil@nxp.com, vladimir.oltean@nxp.com, xiaoning.wang@nxp.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, frank.li@nxp.com, horms@kernel.org, idosch@idosch.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH v8 net-next 2/4] net: enetc: update max chained Tx BD number for i.MX95 ENETC Date: Fri, 13 Dec 2024 10:17:29 +0800 Message-Id: <20241213021731.1157535-3-wei.fang@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241213021731.1157535-1-wei.fang@nxp.com> References: <20241213021731.1157535-1-wei.fang@nxp.com> X-ClientProxiedBy: SI2PR01CA0014.apcprd01.prod.exchangelabs.com (2603:1096:4:191::17) To PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8510:EE_|DB8PR04MB7114:EE_ X-MS-Office365-Filtering-Correlation-Id: 182bf4f9-276f-4fde-325b-08dd1b1e8c17 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|52116014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: k5ncF1VwbYf1PDG6atQmVC0pefhZuXlaQshVICXIOYiGXzebHWO60Yv6WR8PQAP2BP07mOrRFJwqod+Essyv1Rd2wL+jQuwP9Y4JXKzXBYqo+yiRL62EWlWZgpDB/Azo2wjtAOpWHbmakfnvFsi1mVIatoWklLVy3uRz/sJMtlyeoh4wwASdmbdj54aP6R9f9l6R1iw1mtpDRgTTJy+z7ul4A6FaV6uhk89saxhIUyWvGIjT20MMuy92FFkLv6pJOJZY7nvFvezuBgioEXXvZ2QeFY4bo0BiQ07yFbwsm9dBcoWZi3453u5acTViNiepKw4dwCxfpA6rCsMOrPSFPOYdkxAQ9YVyxHlpI0g1A3BERcp7iBceumrcu0FlwDfNsPlrQvDFIK5XLAT2HQoFcrChEdNimn+Ery7brE+uvTO442NSptJTEL5nRTkxRCBRySkX2zEA0XRfJij63XlGVXCa31z2PZNeJa6679L9EUG9BMKGfO79oK8vpLjalFTNL8MMMWrUpsQm9yv4n7J1+ljWrb31E3H4+bnuUuFlxsUbkQ51EC7JrX59qDRAkxjzxL3UKsj+sYPKD9zvtVvxekSOYyt6Gjp0ruCybf/ySkNFz9uuFesB7pB/PBdJBqbc8v5fERr43UnE+GwHzlbMdp8zJZHneoGhzQAnVdFcAzozSUZWYmVhzpAQ5YahYaoMG6WU+n8hgkZpE3QUM2iZmUuev7Fs9TnQoavSEVNqFMVytwi4jxMhq4bP7iNXhcFFHjssonN+3G9w0Az7GaWeJRj12uGcg6yrzNbaC+ZNIgcQqi5LhgCUH1CeIW2tUvOYzGgJZ8Xrit6yhjvkAceUMnpnqh4k0RT0svmTz0xCNc1qqJbQchCvMYyoCdV+kmIt07FHLyso3iQLnEVM+5pC1+FRYTw2BsaDZWn+lSFIqYEedySnAht+OHlEym3BiP+p74xgE8Wgizkw1ax6gL2WNhKxPnlFiuYHIMHLU86Eht0cshyrgguX9bGDK10Ag/vXZT0s+LDRVyKiaSHS9uW9BaUd1KQb3yzX+FI6FOZs4RPNmEy8kfuWMaI/rXgBa7oUOR2Y6Q1SbzDfr80O3mnilaSBbTAW+SioxHKE8TBi5natCo4/UKoQNJxWrTnl64frzqGcnXhe69JhyNpgp+ozVjIaYwxGcD4WHbQgyqPnvOi58kxhXVOvV9EBDkiX0zPymXyIjf406S5jwnKWSrMNHl0IazYntZ6FOfIpNCvrb3cHU6V1e4uJD4qEELNOqONpH3wgKh6Vg89zMf3dwOcBVf84BBI+eMKnXxDTu7sfAIX8a2jhRmyjuj9uYcGMOvv4A4ZrvMG7pD9ehh1CmYK/Rw4C/s9CCbLzr7KRcIUZ8RwbRkNfKsR1eFMKE8mWquXJcZQv1B/y6NJqSCIusq656TNk+KzrUk+CjcPZ59Ab2NI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8510.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(7416014)(52116014)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hYxmIAHiZeKgEcq9fBtRjXzRKMRXdb/vE/mUm+btq50CgkNAUYx3uZCabtf5hexwIuRK65/et/W39enj87oYPxTuuiV2RECYXvzF2ruoPXu3X4spyEIHqaaXHNdy9/i/QVK9iq7ZzdGB7v0MZkT1VyoM9y5CM2XtsJz2s2yAR57yVAChQALbxHb7EsGWNdSsz974tqw7zwUU2J3hO3iVwhr5fmJjTAhNMkRj5rp+gG8FARSrmsItCKADzC5R/b0jhcIj9v+4znZ3g+at8tydw9TLCZ2TsKup5CnofsveF2SE/H7DP8r0XiMDYOIMCGp/T0yyyz1BQZtP33iij6xwDeusoDfDsgjE4PsHrrWon/0sDsDqeUFejCF65Tn+GnGKn/Jh6gjc0gWogvc9vtji9Q0ISszQ4cS2sxHxE0vIz+RHQXhHKAtNAXhYLLAKEZTL2xXYP+YjgGFkmvN4yIcoc7m5pn7Qu7dmV2Si3le12vERzizjwTFNxDlh2Y6tVkkVwmABNo8BVpxwiB5KblSgacqmAwvAqZJwIB8QKHGSUAChhPDvPdk6vUaT6VM4bgmnPKUIMkgmBl809D0aF1L71Uw9OWgTz460fFMwzSkmtgrTcEhYBVzFa2ytRwt49rP+EK2mfZwPu5U4Qibj1xKMbO4oPW4E7lEfju2DjKoB1a6qrZEBALEjX+4de5JYktskJvT9OOFgyu/LZ4UQQN1U+JBjGC7x5ocS01Iuewx6JDrzvpgsUmN8SA2qjZCwn45PAhCx1KmQ4BehLhEi1zU3jnpx9Aa7sk7yGrklY26wrBXNlS5pbBn7Yf5RD55FHdYW21Bod5Xj9E4wACGNpCQZ6OcXlsDD4EsoK3h77DJjLZYwqhWOihWElWFsS1mk0/4btJSkk+iWvrdOy+4b+T+lDITotN2KqPiuwgl+2/P3pLoGYKbyqRkJwR7R5Fu0rWHbqJXCw8Ov6bc93OgI/msBC5VEZa2S7H9XQ1xDPEr4xL4aTuEyJGFxiu2419+IzfDVhS/WOniszJgHyRIXXCAHZRf5rOTdFcKJEmYiAa/LiZ7FRLv/mQYFG6gfKLa7c+Z84586Avy7rK5pQhOesC8/FvyBvbgoFpTWkBaX6/mbycRVtv/A++VORXsBtrBmqgOv+Q3x/dcs32V9kCA4bQxB+4D27FibTS7QltssQwbEixDHZnHaxCbWlMhsVn0mdZmyHjxJDEmOjS74xw6frPOb827zWBrF5dkR9/HtFEbyDyiB2yb/euDg/UlpUJr/HlFcAu6wLXqaLk2p7Kotcz5v/9qMSenHodsbqssinjgvi62IcD4AM3SjHzX4johj0DsoOqxy2wQBbdz+Nl81NlNjjVkkfHMXcNY3xmR7AHLr8gLWsnnHkKrVkIo5gBSHyhNHMXRJk13XKn34H8W7r+Rwi4+7ioG1oMMCh83hFZxNqHCGF0KKgInEVuBrv37pbL5umAoNt6+NZe/y5HUDINRAiVCvFYtzSHzT9IYXds6qyexJ7r7SMSPfKwXmxmYGeO1M6VI2Un16vITLjCdaBoA7Un6QBqsPmHlPPDrsPMlF3qPcTgedFSlC8ivNtb7KhfI6 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 182bf4f9-276f-4fde-325b-08dd1b1e8c17 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8510.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2024 02:33:37.2338 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Ctx97qrBTNa9bfcad3+4xMHvHmgdWYSq2SXPqjJbfftsTCicAVqOvhbRmPTV3kEeH9mzj2VDHzTzNX/PyZBiPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB7114 The max chained Tx BDs of latest ENETC (i.MX95 ENETC, rev 4.1) has been increased to 63, but since the range of MAX_SKB_FRAGS is 17~45, so for i.MX95 ENETC and later revision, it is better to set ENETC4_MAX_SKB_FRAGS to MAX_SKB_FRAGS. In addition, add max_frags in struct enetc_drvdata to indicate the max chained BDs supported by device. Because the max number of chained BDs supported by LS1028A and i.MX95 ENETC is different. Signed-off-by: Wei Fang Reviewed-by: Frank Li Reviewed-by: Claudiu Manoil Reviewed-by: Simon Horman --- v2: 1. Refine the commit message 2. Add Reviewed-by tag v3 ~ v8: no changes --- drivers/net/ethernet/freescale/enetc/enetc.c | 13 +++++++++---- drivers/net/ethernet/freescale/enetc/enetc.h | 13 +++++++++++-- .../net/ethernet/freescale/enetc/enetc_pf_common.c | 1 + drivers/net/ethernet/freescale/enetc/enetc_vf.c | 1 + 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c index b8ac680e46bd..09ca4223ff9d 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc.c +++ b/drivers/net/ethernet/freescale/enetc/enetc.c @@ -535,6 +535,7 @@ static void enetc_tso_complete_csum(struct enetc_bdr *tx_ring, struct tso_t *tso static int enetc_map_tx_tso_buffs(struct enetc_bdr *tx_ring, struct sk_buff *skb) { + struct enetc_ndev_priv *priv = netdev_priv(tx_ring->ndev); int hdr_len, total_len, data_len; struct enetc_tx_swbd *tx_swbd; union enetc_tx_bd *txbd; @@ -600,7 +601,7 @@ static int enetc_map_tx_tso_buffs(struct enetc_bdr *tx_ring, struct sk_buff *skb bd_data_num++; tso_build_data(skb, &tso, size); - if (unlikely(bd_data_num >= ENETC_MAX_SKB_FRAGS && data_len)) + if (unlikely(bd_data_num >= priv->max_frags && data_len)) goto err_chained_bd; } @@ -661,7 +662,7 @@ static netdev_tx_t enetc_start_xmit(struct sk_buff *skb, count = enetc_map_tx_tso_buffs(tx_ring, skb); enetc_unlock_mdio(); } else { - if (unlikely(skb_shinfo(skb)->nr_frags > ENETC_MAX_SKB_FRAGS)) + if (unlikely(skb_shinfo(skb)->nr_frags > priv->max_frags)) if (unlikely(skb_linearize(skb))) goto drop_packet_err; @@ -679,7 +680,7 @@ static netdev_tx_t enetc_start_xmit(struct sk_buff *skb, if (unlikely(!count)) goto drop_packet_err; - if (enetc_bd_unused(tx_ring) < ENETC_TXBDS_MAX_NEEDED) + if (enetc_bd_unused(tx_ring) < ENETC_TXBDS_MAX_NEEDED(priv->max_frags)) netif_stop_subqueue(ndev, tx_ring->index); return NETDEV_TX_OK; @@ -947,7 +948,8 @@ static bool enetc_clean_tx_ring(struct enetc_bdr *tx_ring, int napi_budget) if (unlikely(tx_frm_cnt && netif_carrier_ok(ndev) && __netif_subqueue_stopped(ndev, tx_ring->index) && !test_bit(ENETC_TX_DOWN, &priv->flags) && - (enetc_bd_unused(tx_ring) >= ENETC_TXBDS_MAX_NEEDED))) { + (enetc_bd_unused(tx_ring) >= + ENETC_TXBDS_MAX_NEEDED(priv->max_frags)))) { netif_wake_subqueue(ndev, tx_ring->index); } @@ -3308,18 +3310,21 @@ EXPORT_SYMBOL_GPL(enetc_pci_remove); static const struct enetc_drvdata enetc_pf_data = { .sysclk_freq = ENETC_CLK_400M, .pmac_offset = ENETC_PMAC_OFFSET, + .max_frags = ENETC_MAX_SKB_FRAGS, .eth_ops = &enetc_pf_ethtool_ops, }; static const struct enetc_drvdata enetc4_pf_data = { .sysclk_freq = ENETC_CLK_333M, .tx_csum = 1, + .max_frags = ENETC4_MAX_SKB_FRAGS, .pmac_offset = ENETC4_PMAC_OFFSET, .eth_ops = &enetc4_pf_ethtool_ops, }; static const struct enetc_drvdata enetc_vf_data = { .sysclk_freq = ENETC_CLK_400M, + .max_frags = ENETC_MAX_SKB_FRAGS, .eth_ops = &enetc_vf_ethtool_ops, }; diff --git a/drivers/net/ethernet/freescale/enetc/enetc.h b/drivers/net/ethernet/freescale/enetc/enetc.h index e82eb9a9137c..1e680f0f5123 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc.h +++ b/drivers/net/ethernet/freescale/enetc/enetc.h @@ -59,9 +59,16 @@ struct enetc_rx_swbd { /* ENETC overhead: optional extension BD + 1 BD gap */ #define ENETC_TXBDS_NEEDED(val) ((val) + 2) -/* max # of chained Tx BDs is 15, including head and extension BD */ +/* For LS1028A, max # of chained Tx BDs is 15, including head and + * extension BD. + */ #define ENETC_MAX_SKB_FRAGS 13 -#define ENETC_TXBDS_MAX_NEEDED ENETC_TXBDS_NEEDED(ENETC_MAX_SKB_FRAGS + 1) +/* For ENETC v4 and later versions, max # of chained Tx BDs is 63, + * including head and extension BD, but the range of MAX_SKB_FRAGS + * is 17 ~ 45, so set ENETC4_MAX_SKB_FRAGS to MAX_SKB_FRAGS. + */ +#define ENETC4_MAX_SKB_FRAGS MAX_SKB_FRAGS +#define ENETC_TXBDS_MAX_NEEDED(x) ENETC_TXBDS_NEEDED((x) + 1) struct enetc_ring_stats { unsigned int packets; @@ -235,6 +242,7 @@ enum enetc_errata { struct enetc_drvdata { u32 pmac_offset; /* Only valid for PSI which supports 802.1Qbu */ u8 tx_csum:1; + u8 max_frags; u64 sysclk_freq; const struct ethtool_ops *eth_ops; }; @@ -377,6 +385,7 @@ struct enetc_ndev_priv { u16 msg_enable; u8 preemptible_tcs; + u8 max_frags; /* The maximum number of BDs for fragments */ enum enetc_active_offloads active_offloads; diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c b/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c index 09f2d7ec44eb..00b73a948746 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c @@ -101,6 +101,7 @@ void enetc_pf_netdev_setup(struct enetc_si *si, struct net_device *ndev, priv->msg_enable = (NETIF_MSG_WOL << 1) - 1; priv->sysclk_freq = si->drvdata->sysclk_freq; + priv->max_frags = si->drvdata->max_frags; ndev->netdev_ops = ndev_ops; enetc_set_ethtool_ops(ndev); ndev->watchdog_timeo = 5 * HZ; diff --git a/drivers/net/ethernet/freescale/enetc/enetc_vf.c b/drivers/net/ethernet/freescale/enetc/enetc_vf.c index a5f8ce576b6e..63d78b2b8670 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_vf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_vf.c @@ -136,6 +136,7 @@ static void enetc_vf_netdev_setup(struct enetc_si *si, struct net_device *ndev, priv->msg_enable = (NETIF_MSG_IFUP << 1) - 1; priv->sysclk_freq = si->drvdata->sysclk_freq; + priv->max_frags = si->drvdata->max_frags; ndev->netdev_ops = ndev_ops; enetc_set_ethtool_ops(ndev); ndev->watchdog_timeo = 5 * HZ;