Received: by 10.223.176.5 with SMTP id f5csp2158888wra; Thu, 8 Feb 2018 09:19:39 -0800 (PST) X-Google-Smtp-Source: AH8x225Ir4HQOkhq3n9lBMyqQgc/T3n38zVJffYijFXAjOMzbkUL9Oft65JBEyUvpnksS3P4HWpP X-Received: by 2002:a17:902:2983:: with SMTP id h3-v6mr1268975plb.76.1518110379517; Thu, 08 Feb 2018 09:19:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518110379; cv=none; d=google.com; s=arc-20160816; b=FUksniWRy3wJQ4owBMQoNJh0roCWQ0YY4ILIIb1RT9jT6RW17jQeQwh8Esdc42CK22 Ta3txliNmAqWHY8QVliSNFL5a6+2vn/vhL2nG8yVEAPI18TEjldjP2oDQVm2EiF5IpI7 hFdZkczQz6qibXlaRI/lSTi2eefgu5A6iTOB/NeA+AaYWFXx4se6sksz/CnkP25Npy6Z MlgEj9ZTVA9TsHstjLe/Xd2xq+14DOpvrnTA4Xdz/H4erGMV903o9G5Rr3VeADMP7ou1 alpDi+M/w1DQRCdtHX+ndtyPepnfHiu/pNNID3ZMEfakb7ZDhHCssiq+QrJrisgBhDdV BPHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=J/9zy/FJDaWvH07Lv6zWARj6fJ2HHmqdqG54XwAs/+k=; b=U6K6zMMn2oAicMnhqqEQr3QHfHzoyztDhPL0mNRGDM2B0kdNjXzLPGtknLW8D9i+JF n8J3dAEafhSoD6FRl7fRTsIrH6IV5ilakkptwarHIQtNI5/j3aVWCNnje5zPZMkjktPN o5+d0l2kHY/npfOT3N2hM7WcM4kvxRJUFVT1S7LXcLZoIO5yOgok4VjQX3nHi4mu4QxG lFKsPO057YOBG/eY8KF3HZMiq2bKWb9PXbvE3hKMdcgCHTh41sPMx60LzuYcw/zYrO1x us11ZVpOiIfpdM4ZByAY2WRdqfW5q4YTcgT6niCdm23tsIeXSasuTS6KHVE1wa5qg3cp 66Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=DCmN+Rem; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si243293pfi.404.2018.02.08.09.19.23; Thu, 08 Feb 2018 09:19:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=DCmN+Rem; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227AbeBHRRP (ORCPT + 99 others); Thu, 8 Feb 2018 12:17:15 -0500 Received: from mail-eopbgr50044.outbound.protection.outlook.com ([40.107.5.44]:22784 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750847AbeBHRRO (ORCPT ); Thu, 8 Feb 2018 12:17:14 -0500 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; bh=J/9zy/FJDaWvH07Lv6zWARj6fJ2HHmqdqG54XwAs/+k=; b=DCmN+RemN/dI9tkJI9BUAnQdzJojKN5zZOxu/awPz+dynvoRhfzTRhZ8yb9zobIonX/QbcE1FNJJoC6Dqk+W4VXXPXXh3M6M+sxItHPb6+5KODxB9bpwRvputaHo7/0LOtvdpWhiQXDhYMP36cmGkA8HKj/YQivTnSplrWFLhiM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ruxandra.radulescu@nxp.com; Received: from rhuath.am.freescale.net (192.88.168.49) by DB6PR0402MB2695.eurprd04.prod.outlook.com (2603:10a6:4:94::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Thu, 8 Feb 2018 17:17:09 +0000 From: Ioana Radulescu To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, laurentiu.tudor@nxp.com, bogdan.purcareata@nxp.com, nipun.gupta@nxp.com Subject: [PATCH] staging: fsl-dpaa2/eth: Defer probing if no MC portal available Date: Thu, 8 Feb 2018 11:16:54 -0600 Message-Id: <20180208171654.15511-1-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.88.168.49] X-ClientProxiedBy: MWHPR18CA0047.namprd18.prod.outlook.com (2603:10b6:320:31::33) To DB6PR0402MB2695.eurprd04.prod.outlook.com (2603:10a6:4:94::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 339c9ae9-7a9b-4234-1744-08d56f17ca44 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:DB6PR0402MB2695; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0402MB2695;3:UdOoHyXAw4qENUxtIeZLcTVi+H3cEpNshNXdqZYmj00Sy1Lc0K8Ym5oau2sRTHeVUSJJ38g0OOkTZelI9JnBmkVRLhlFUxJFdmu0dBVDOwfFVrGkNqR9b4/jv8HAXnie5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D8neWr8r/2LPTbfF73RJX79735qlRPgH3tWG1nHMDUudj4pFpUiM37u7DQtmcnKi+WOgKTAnsl1T0iMB0EzY9cQsN/6kHOXnua+b44Giv6SFKfM4bFuQYnR9AHosYEFPvsB5gY8llLzw2vmuk/oKLQsZKxIw5Wwhv7BIgeUDz3iOJkxNGZDhBX5j41y9MJO94pMDZVYvwQTCYde5RXp3Dt9A/f8akpeBu8VTMSZfTP;4:p9cFu5ByWGvow7YXCt++y+1nArU4uHSka37ibhSFsZJSkYz629JcCxGz1z9TcrngLrRMloW5RnRopzOfiTUrKna/ewnLKcm5KwkcE5UkaoamrIJ6LCemSyMUMTE4xerM2DeSXIF0ff2w8mfIh3fOHy522Pq4F4OV7j+7wykUoRmOYzEXdn/qRz9vXjDnW32TCM3eBa4Is2JgZNWyj2vqEmfYVURscXte4X2XJdhR4560u6So06C9pAARKt7+1jkYFRpTos5y7aEtRUEo7N7GDn41i6uLU0xnNa4q6W4BK08po+WzHpuObigW6chf3PPfqI8WduwLZ3CjVgsIm2LGNVqemJ627qBG1rdrXamfnnTFMi2aRj9K3SIWymlPBE9/ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(227817650892897)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231101)(2400082)(944501161)(93006095)(93001095)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:DB6PR0402MB2695;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0402MB2695; X-Forefront-PRVS: 0577AD41D6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(366004)(376002)(396003)(39380400002)(39860400002)(346002)(199004)(189003)(1076002)(6116002)(68736007)(4326008)(6486002)(8936002)(7736002)(25786009)(305945005)(3846002)(36756003)(50466002)(8676002)(47776003)(48376002)(105586002)(81166006)(81156014)(316002)(478600001)(1857600001)(86362001)(16586007)(2906002)(5660300001)(6916009)(97736004)(59450400001)(51416003)(52116002)(53936002)(50226002)(6512007)(6506007)(106356001)(16526019)(2361001)(66066001)(2351001)(6666003)(186003)(386003)(26005);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0402MB2695;H:rhuath.am.freescale.net;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DB6PR0402MB2695;23:H6HpFof1/6dHmKCpJskYeB7gA+ZwozJvULJx9RC?= =?us-ascii?Q?fhbfFRP3XjjxDPsBGDHxN9NxQWISOVSQLiUJfj2F1Iu7FuFWyAGZ4K/JwTii?= =?us-ascii?Q?y2hP/eUPCQfRy+i0E4En9TshYR71/6F0kb0M7OgXvBw+avKZ5Iauy1XbgEi9?= =?us-ascii?Q?7qe7YjYxZkyZAv9T4QyLVtyJOtjp/XWalUMl/tg+qwH/E3AcSPhMUAB+NBCs?= =?us-ascii?Q?4dJeHTAHtnLbihLXB2dtaPX9VGQQIoZGF3kf+k9p6TvGxgvjxZm3tNwytbQ2?= =?us-ascii?Q?eS/zZvTpvvMuNTbSYwmaLsVE2W6IIhb4b4EGj3z/A3oVXk5hS88L9UlplOv+?= =?us-ascii?Q?h9U2cIHH43MZpq65HU6t0fmKLPdKi91oqEhN278fYOKeqJKpxxy1Kk0PlbjW?= =?us-ascii?Q?75xJpaAFKi8iz6Cnopcz2jCB9XVQYMRFXimF45mtxeta2clkZD5KzAUVkiZN?= =?us-ascii?Q?8NW998kEFv+DBuMju0t8BPkJ2VDzeH1C8U/WZubJmoSVy5Q7kSXl7nSrhGSV?= =?us-ascii?Q?3b6Qo83fs/oIXR2ZjLosufb1sgBW1fzM5S//IwdXTt89/kYsy6Vo0KGyvupH?= =?us-ascii?Q?obhP3RLRqou9ymOac8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g7fMLrvxiNPDOvkv7WLHITrJleBCw2sMsyIY892+M753zTX0FI=;5:skHVEK5kSv4xvPTIMF4tKdDAayNy2wLHV2eLaTLCph0Y/6+BHzm1FFE+BUsx9P89c5yTplEIGgCzZejznXsISWOte5mYxcwoui7vLfDk6uWnT7+klioX7BpfCBZF+oiTBgFmcB2KCiS94dONcjP+CU81PDuLu61NstNSvBFo7hc=;24:ml35DxTkDXHng9ect6pfBvn2iRTQR89NmN5O6N76DtNWfOHv+dj77zGHdAQvbqFfS3sZf9GIEra2fnlFQ9tAiHJRXz9Jm5FpGlEbedLoCc4=;7:sravly5IwGJMhvsZvTLj3elIhZr6TAHwd0xH2H6dKau1qmotTwsx1Wn6ZrPVuJBMLQ/+CkOiJs552Op89AS+Ck6uXVcoioBuVBIhc/wz4TFBKTV2cKk1urF4do3VM6WmilMsMTTlN7C761nPlWYC3906A+q+CfHFpcIEsLBGkKe6UD5GtzRWHIzMkKIiGAs+NA1ww/NWRk9GvaE3wSupnjLqMj4EMMqyWgN9n3dzopTWZuySQWlpPJPqlqLPHvZI SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2018 17:17:09.2121 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 339c9ae9-7a9b-4234-1744-08d56f17ca44 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2695 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org MC portals may not be available at the initial probing attempt due to dependencies on other modules. Check the return value of the MC portal allocation function and defer probing in case it's not available yet. For all other error cases the behaviour stays the same. Signed-off-by: Ioana Radulescu Suggested-by: Nipun Gupta --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 2817e67..e4c2804 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -2440,7 +2440,10 @@ static int dpaa2_eth_probe(struct fsl_mc_device *dpni_dev) err = fsl_mc_portal_allocate(dpni_dev, FSL_MC_IO_ATOMIC_CONTEXT_PORTAL, &priv->mc_io); if (err) { - dev_err(dev, "MC portal allocation failed\n"); + if (err == -ENXIO) + err = -EPROBE_DEFER; + else + dev_err(dev, "MC portal allocation failed\n"); goto err_portal_alloc; } -- 2.7.4