From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D5EEA0353; Thu, 6 Aug 2020 16:32:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5D7392C28; Thu, 6 Aug 2020 16:32:52 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80048.outbound.protection.outlook.com [40.107.8.48]) by dpdk.org (Postfix) with ESMTP id 4B7512BF2 for ; Thu, 6 Aug 2020 16:32:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F9RgDnczjRubGbEQ7ICr4ZVeo6nfEZP0EsOYy3QzohsKGoAsF7qQ7lldN9hH54k49J9ZECaThccXnA8SxKJnXctfyRu6T7J64zFa1GQHDg62eVZhC18NhbPE30Kv5Jft0rbeXfdJIfF08tLNNQtR1WTp60V+Jfx2sBEK8ZnwVoA/n2sOL/6Qv/1qq36zMH7wLq2W/CA18ou1RUyjCxyqMGAvcIJWIq5y++tmXez+SfWdFY1WhBo7iiOf2gRTfvpb8NNIEvds9aVXlkikSFmriUzsCJjuFdOmqg4Mv2JTooaO92hLntFb6ukrNakkEl0TBkLt2bO0hTOaTON/tcwC6Q== 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=cBWH0TUvosyQ4kNkdzIfMDVbkarLZhuA08Ur7C6E/i8=; b=CYTXCtMYhwzwACb6q5yUdbx7MzvAYCJvsrrGPVX5J752RRnAt/J6nDHu3Bc9ICjt46VjSzD1LoR8f5elsS0abzdkYyKtKuzgS3avZlU8uu+actCiobSiJDSGfSNTlI/xW/sp7+yGHyErBt2OsGfHJqBI9LBC7+Oq5FmdOmZLIqdl36WnuArBxzeOawdhYcEbIx9z/F9XIoJLgp/qTyofVKQYQke3P3ZYJR+UMROYut5HwOtlZebZRrmZ+VsA9iyCQvfXmKrecBtsuGC3yALV9ULIA6UySVpBuBUvlunCLB5pcVXMt8maH3U7NiVh7nChxgB4ZUpK8rYrk/obfHhSBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cBWH0TUvosyQ4kNkdzIfMDVbkarLZhuA08Ur7C6E/i8=; b=cpu+eaGvbNDEk/5oT1O9yR8+3QY4i9p1AiJjIa/ovqF+RFE4CoIyMLY1sNPx6q+aDh0Jlkd64T6sb06BMaIuD+N3RQqkm9yCDNli87rpu8T8/90XLy7bAZiUTL7FDDB4t1d3qDVL5gvdPYKDIKEIYF02j9se6Mg6HM3vaMO/Nlg= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR04MB5837.eurprd04.prod.outlook.com (2603:10a6:803:ec::28) by VI1PR04MB5120.eurprd04.prod.outlook.com (2603:10a6:803:62::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.19; Thu, 6 Aug 2020 14:32:49 +0000 Received: from VI1PR04MB5837.eurprd04.prod.outlook.com ([fe80::c506:dc43:37b2:7d52]) by VI1PR04MB5837.eurprd04.prod.outlook.com ([fe80::c506:dc43:37b2:7d52%6]) with mapi id 15.20.3261.019; Thu, 6 Aug 2020 14:32:49 +0000 To: rohit.raj@nxp.com, dev@dpdk.org References: <20200728162459.990-1-rohit.raj@nxp.com> From: "Sachin Saxena (OSS)" Message-ID: <0cd84dc2-648a-62ed-a004-7bff35b864b2@oss.nxp.com> Date: Thu, 6 Aug 2020 20:02:40 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 In-Reply-To: <20200728162459.990-1-rohit.raj@nxp.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-ClientProxiedBy: SG2PR02CA0027.apcprd02.prod.outlook.com (2603:1096:3:18::15) To VI1PR04MB5837.eurprd04.prod.outlook.com (2603:10a6:803:ec::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.10] (171.61.173.213) by SG2PR02CA0027.apcprd02.prod.outlook.com (2603:1096:3:18::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.15 via Frontend Transport; Thu, 6 Aug 2020 14:32:48 +0000 X-Originating-IP: [171.61.173.213] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 63355541-318a-4b68-ac41-08d83a15980e X-MS-TrafficTypeDiagnostic: VI1PR04MB5120: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aELQsKbYcxy9vb/0yktTgsJNVwR8SoQywM37BrPr8bxDMSboMyOJC2IIW7SW10b9ukKC+q3Vrdb53vPC0/ojb4ofPgbc+mRiFoVuYC9Oytr/xIlUlh16IymlkqDJoivfay3FqCl6WHjEUsytYdBFMPpplFKRDzgsarvcG2Vx6SAYjqvk5Oo63H88XDXF7m1MOD+MNZdaHui+7xkNZzsRgSyvYKRdF4ttJTz1ctwYlGgbnDS2E2+RxzguSSaiTDzkt5vSzzY0h9nEemWKf83dFf76ATbiwtWfX4YPAJDtmK7eMo9CyBA2JXi9Kop+wZbNa9dgTP649n+rQUAcqjnOiXxQjsfB5JErVSd2g3YjxfN7JGCWZ98PkstKSNsLTIAc X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5837.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(39860400002)(366004)(376002)(136003)(346002)(186003)(86362001)(31686004)(16526019)(2616005)(956004)(26005)(53546011)(478600001)(83380400001)(8676002)(52116002)(31696002)(6666004)(2906002)(66476007)(66946007)(6486002)(5660300002)(316002)(8936002)(16576012)(66556008)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 1r4ACA9iWrieT+xh9Aj5AqtwycxG/ecw5lWmBTjxNJuOOAI3J30oFT9wvjwTd81VbXmYLzhYc5sGFLukCQjWR+pfVtodtDT0slNS/nhvkvoDboQnQj5HN0FgIPHlGNzwzEUiSUU6FwvPrOj94K7CVe6oktviKs5MUjafL0swlt8ypCdgN/H47WLKs37SvFwmSaeK3tIqKH3xTDBDSJNy3q/0bhuuGvGHBuBdx21HIq7Nola2dfbNo3CGeBU2R71kbq5/E9QoDGkm0k/9a4H6B9ZXzZJbJkGCD4mZL9+IrY+o2u+krbwvhURNa1wNTe121C4v+1ZgZxPccwCI9TxzX/eTR6U4fZf2d75Kzr8t7WPl0Klts2cqPxh0sgGwZ/j+0fCZIbQZQzZ1+Z2QY+SjVdFa1kAjpYa9MfOxH+feAQOQKOBfIO2bKpg1Pxiyx8AFmtTLYp67oHDQurPhjnuumhjyd8pC3ijPsY7aQZ0fNAZZrMmgh+QWQLdZukgrTYWPYMDw9ZpuP4T31q5avTS/MWqF5hsNnAM8Qum6wnGfWY/AqNhF0W3kEk8aa/mw5XIw24224Y9i00ijs5OkadiP2CqDhtDunU9TnFPecq+9zYyj/BBhlXh4uEswugjB360wzmBASzi4t8KIITDHp8mGtg== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63355541-318a-4b68-ac41-08d83a15980e X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5837.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2020 14:32:49.6225 (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: DJzDvtveTiPoR39VxoKYhtFIXAWv9+YoTgSHs5erc3AyESIJWI0Dfc7feM8cyf6F2BN22EfIeb2ucsMww2Mj7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5120 Subject: Re: [dpdk-dev] [PATCH v1] bus/fslmc: fix dpio close X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Acked-by: Sachin Saxena On 28-Jul-20 9:54 PM, rohit.raj@nxp.com wrote: > From: Rohit Raj > > The current state of the DPIO object should be checked > before trying to close/disable the object. > > Fixes: 293c0ca94c36 ("bus/fslmc: support memory backed portals with QBMAN 5.0") > Cc: stable@dpdk.org > > Signed-off-by: Rohit Raj > --- > drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c > index 97be76116..b0055b164 100644 > --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c > +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c > @@ -528,8 +528,13 @@ dpaa2_create_dpio_device(int vdev_fd, > > err: > if (dpio_dev->dpio) { > - dpio_disable(dpio_dev->dpio, CMD_PRI_LOW, dpio_dev->token); > - dpio_close(dpio_dev->dpio, CMD_PRI_LOW, dpio_dev->token); > + if (dpio_dev->token) { > + dpio_disable(dpio_dev->dpio, CMD_PRI_LOW, > + dpio_dev->token); > + dpio_close(dpio_dev->dpio, CMD_PRI_LOW, > + dpio_dev->token); > + } > + > rte_free(dpio_dev->eqresp); > rte_free(dpio_dev->dpio); > }