Message ID | 20201204024638.31351-4-qiangqing.zhang@nxp.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <netdev-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4B34C433FE for <netdev@archiver.kernel.org>; Fri, 4 Dec 2020 02:48:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8FB22224BE for <netdev@archiver.kernel.org>; Fri, 4 Dec 2020 02:48:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726873AbgLDCr5 (ORCPT <rfc822;netdev@archiver.kernel.org>); Thu, 3 Dec 2020 21:47:57 -0500 Received: from mail-eopbgr140081.outbound.protection.outlook.com ([40.107.14.81]:37121 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726558AbgLDCr4 (ORCPT <rfc822;netdev@vger.kernel.org>); Thu, 3 Dec 2020 21:47:56 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F0ashuzw67j5K0DdEtt3vWakzuhY5NCIMlp1DVEajR3iFQ6JuN7kL/sxrXQkqwZXxtMqMP9MwPqkGh/1gaVmZdsV1VdPTRaaLxye0pofiA9122ljEPAKr4XEfUImTzOAhM/I/W07ar5ZrriuQi0dapAGgLfVv14aB1Bv2cOhysQRUQgGHJi/WIXgaq4trem+iu0Y83T/JNz/ahO8KZjqBYoq9axY8+MwUFnQtLBpI2zU+xuuV5Y39UELdVknQK4PN2FdvWsjek9cOYC5rB8FrwX9duXuo/BJYSxmxtS3WEApvSqHJ7oVOgmkA18CEaooAB0+DzRx9ENCic12PwpW1Q== 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-SenderADCheck; bh=2alYby+BYm+OeHs39H8hqadqbhg1Dg5kKh5UAw988kw=; b=nKaO7EZrjJUdZ8mIu8W+3bJ0ywpwiHbtCcRYHojkQfInIH/1pDrOvYJ6sbLPoz6Kg6Zq4oHq3IMGNa3mBSFta5AfPpdveu8FTaK5g/9Bx4mHnSZAG/IoBVwOjoDcUBdACF9LNAkQawHnwZ5D1zgn2tFciaL1mgyvig5+ctXdu3CIla/wfr0SGQhsVercNxYWitpq4eX+D3pr2FelfwB59S7oya5/6IJT7Laj65xa/74BtJK87JXh0qz/sMKE0GZpajr8hTW6Kh2ra0yIzIXUFu5tTx+dkXj3LNRgZNOPKwi539wNM1QKHnWv4somxgPibsEyg50GqtWjeBUk5708gQ== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2alYby+BYm+OeHs39H8hqadqbhg1Dg5kKh5UAw988kw=; b=spE9BjW4wr2nKsEZAU8HacVVuTqWr+5kNSvNux4biNcUlZJg6crq1yakm0AOZBKisQA7/rI9esdemFF5h5ugLgU0IwBt4udApV78p4nB7j0ZnlenG+vmOxinltWn7EJm3VfBmEH2q7H2xa9FYyFhFkVyZD4rgUdCinYJPIfsm0o= Authentication-Results: st.com; dkim=none (message not signed) header.d=none;st.com; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DB3PR0402MB3707.eurprd04.prod.outlook.com (2603:10a6:8:2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3611.25; Fri, 4 Dec 2020 02:46:31 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::b83c:2edc:17e8:2666]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::b83c:2edc:17e8:2666%4]) with mapi id 15.20.3632.021; Fri, 4 Dec 2020 02:46:31 +0000 From: Joakim Zhang <qiangqing.zhang@nxp.com> To: peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com, davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH V2 3/5] net: stmmac: free tx skb buffer in stmmac_resume() Date: Fri, 4 Dec 2020 10:46:36 +0800 Message-Id: <20201204024638.31351-4-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201204024638.31351-1-qiangqing.zhang@nxp.com> References: <20201204024638.31351-1-qiangqing.zhang@nxp.com> Content-Type: text/plain X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR02CA0052.apcprd02.prod.outlook.com (2603:1096:4:54::16) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR02CA0052.apcprd02.prod.outlook.com (2603:1096:4:54::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17 via Frontend Transport; Fri, 4 Dec 2020 02:46:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 834f4403-538d-49b5-5398-08d897fece78 X-MS-TrafficTypeDiagnostic: DB3PR0402MB3707: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB3PR0402MB3707D2AFBC1A2407B3319D83E6F10@DB3PR0402MB3707.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b9Tvw/v8rmj/kX3Kg0y8dc942ZYnsXwFAw2gQRWt0IdMhGfZu/iRyOYru6ECKdddPaF+2nt5TBegvfmkjEgLCMkvhxwpZbcaBVkknmpNPn/EQwf4E0aFogWWRY0C92uew2LKFf7LCtTN2EEX60zCpRjpo8K8dEbrVqt/siLffB0SD8jhVOSzo0ZOEQdrk0har2VwjToApIpP0WkO7XGylqTN/2los1IA4k4r8oKMSwQ5bt09KBok7MkOMe76dBiBPj1o34ogTZmhgjsilopNpv9sp9ToLXiKKM2d0LtOzQ3x5O22t7Qu0c2OCu94ljIH9q8lMhxJgWeOq0UbhfdAU82iQnzVloIhxbZYvOMX9INUSW5Yz7zQzQIDfbVNWQBh X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(39860400002)(366004)(346002)(376002)(45080400002)(478600001)(69590400008)(1076003)(6512007)(66946007)(2616005)(4326008)(5660300002)(8676002)(956004)(86362001)(66476007)(66556008)(2906002)(316002)(36756003)(83380400001)(6486002)(26005)(6506007)(52116002)(16526019)(8936002)(6666004)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: S4VlT2cagsfY5VtmmEo9mQvUR5Ir3zDcTh1xX9f7R6qs4ikJaQIMfIPyCr9XTdhIo5QJ+6T8XCh5hIKOwLduvJgbSIlRQF3hHk+ilz0CJawzty/EhZk1UKUnf8qryMehZ3dN2/K3GkRU+0wI7BpFkMZEb9RRbQGAOHoe2Z6wczpwwo3qV9fERay28cCUGzWELmPZ+LyIOzQuc/mNZLrIk4NZP9wEU/iBVeaa1Rzkn1HouGG9/Tnu76cFoBusK/gpBj4ku+/nKDkctOb8bZQatzif57GZ3B3EwI1OSP13LdDGNT+OJcNI54L3Rn4DseQLe5XLhDqzE+OeFMIQyDSALBA+Vm7raA132bRmgUxFSVBCKwUP+paRATHQqz3Nzagg01VBFZzpAMZ/MK9PhC6CU9NcDAq++bZ4c6j17a8rD5sLMRZha1h8M5qhV3x5PzoBnUPLaW8tLzyeXrFI/Ijs7x2wKh37EI7BojwIfCoF8/tB6WExLJwENNLua42Uf+Md88MLlsV7vlpvwcgoGASSyO+lhHizuPbBmySN8KUKhMUQmVl9RN/xKNY4pkzzRxZPpYst5pQ2orS/hDl85z8JQIWGhTlbZwdpUpCAwv5GVmY726N9zZwv0LyxFu4mfPVq6FBqCHhQVTqEj4h6UV4aMgtElsWttvTx9C7eWvfg+ysy7t1c1XFef+79chMQSRAyME87zLjY6NvNz3ku4s8wkL0WgRTKZs2mq5M4O6XrXAw5XofFLSWQ8dLx3hgpD+4eFJ+0yOgL2HrMROZpJau1bVjMIv/gskztwjyu94DRf3MHVeTCbhe8c9vSZ1lQC8roezpMo7RlhJL7QRSrAtxeQwLE3GSk5lXjSIP7Tahu/PyYAv4agRHnNLnW0KogYvfql2bxhBQBXfWLOImioPb5PQ1MYEeQ/H3+Hn4vsYRgY5j4aKJW2Loa1a7IpSXbLmElK6DeotlpC27QY7pl2qDFzQ9YlO5sRY+ThkDxzkG2RshC358udLG/yrhmw0+LwW+h X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 834f4403-538d-49b5-5398-08d897fece78 X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2020 02:46:31.6853 (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: FX/gfAhhJ/rdalXnjgSh0fHQAr95fMHeVloswYfqKYxLG4K9rt34AESy/M3VPKpQwkjBi9KRXZVpLCgnZuhVAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3707 Precedence: bulk List-ID: <netdev.vger.kernel.org> X-Mailing-List: netdev@vger.kernel.org |
Series |
patches for stmmac
|
expand
|
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 107761ef456a..53c5d77eba57 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1557,6 +1557,19 @@ static void dma_free_tx_skbufs(struct stmmac_priv *priv, u32 queue) stmmac_free_tx_buffer(priv, queue, i); } +/** + * stmmac_free_tx_skbufs - free TX skb buffers + * @priv: private structure + */ +static void stmmac_free_tx_skbufs(struct stmmac_priv *priv) +{ + u32 tx_queue_cnt = priv->plat->tx_queues_to_use; + u32 queue; + + for (queue = 0; queue < tx_queue_cnt; queue++) + dma_free_tx_skbufs(priv, queue); +} + /** * free_dma_rx_desc_resources - free RX dma desc resources * @priv: private structure @@ -5290,6 +5303,7 @@ int stmmac_resume(struct device *dev) stmmac_reset_queues_param(priv); + stmmac_free_tx_skbufs(priv); stmmac_clear_descriptors(priv); stmmac_hw_setup(ndev, false);