Received: by 10.213.65.68 with SMTP id h4csp344389imn; Tue, 20 Mar 2018 05:06:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELtB2Ut5drk6NmqScQayhRAoCVgn6uUI9NJBGRcxbYfZkX8LcbrO/pVd55XnhGHS9T7UyTzo X-Received: by 2002:a17:902:343:: with SMTP id 61-v6mr10297770pld.252.1521547598098; Tue, 20 Mar 2018 05:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521547598; cv=none; d=google.com; s=arc-20160816; b=f7SE8Mg1YVTB2ApIW/wMxOYq6ly7MLMgAXvfiEp6kutJxPPF1vhvlfZ+7iCTOHNcL+ 3YSu0/MaOYuXgFoJ2oo6wu8vOtCwEYPzqD2Ly1uxbweZWrBmALqwsaFkjrFjKdO+q6A4 q7Tm+RCnpsTImGzQanWBrnqr5e2TMx5gX8qEfXalqI8xxlMxy76TE0WBJGXH903VabNw FMvyuIx32ni9On4pho7X40uuQx7bR+80Viezfx3iohEYlFEK/JBm/Cy6QPNzZYHVDPL8 syOHjmHAZ71KIqg2RRHM9nTI0tdZIDs6C6lBzz6R8bAwFdnG7fIRbzGO/DGvMrewftnj QEcA== 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=ZBCatJCWSsMXZDSsdksVehxE7GEWXQ0XSydVpU6OUOo=; b=xNfT35kfBm4DX7LLWRxTnP3GuwF6f3xZygGL8nWW/4xGLBPZZQk1gz25QUzK/JW1d3 FkB+IU7TYLfDijgcMGxWk6VLJqBxJwJGOxHPndDjwYgpatxYkJxQ1s0Xs4MKdFZUg01H 8VsjUkAwfWlEt6+x3B0m60hROp4KW/tYiDZkWmfPltglUCNzJkrb9GgZnDgvA5Za7QwO SY+H9dQOUogFP2I6HIvwRqmxbeJqAKu+YZ6p7eZitDba65/5uJ3FQ7FZn3GhPNpL3U0S jpFZqj5HT7TfZjsEqbrJcg1zSh5cWMdDOE//pNqjW162IxBLrOWYPDpI1+uT9PoLaPwW zDXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=tzbhVa0N; 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 c13-v6si1602155plz.564.2018.03.20.05.06.23; Tue, 20 Mar 2018 05:06:38 -0700 (PDT) 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=tzbhVa0N; 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 S1753037AbeCTMFJ (ORCPT + 99 others); Tue, 20 Mar 2018 08:05:09 -0400 Received: from mail-he1eur01on0053.outbound.protection.outlook.com ([104.47.0.53]:18464 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752984AbeCTMFF (ORCPT ); Tue, 20 Mar 2018 08:05:05 -0400 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=ZBCatJCWSsMXZDSsdksVehxE7GEWXQ0XSydVpU6OUOo=; b=tzbhVa0NGoVOCQPDTx12UCdtsW6XEatFn1eAQE3CWUSWu7PryV/tZVspGxElEz1mEdFs7mx/NFEGE2Se16A8gnCAgAqpKEAf0krQRdDUHcX2101eu2EVpyuC6HQPh+XAgre6rxjceAFm7KwEbY63lAq3ouX3cD7gQfj67JW/eo4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ruxandra.radulescu@nxp.com; Received: from rhuath.am.freescale.net (192.88.168.49) by AM5PR0402MB2692.eurprd04.prod.outlook.com (2603:10a6:203:97::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.14; Tue, 20 Mar 2018 12:05:01 +0000 From: Ioana Radulescu To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, nipun.gupta@nxp.com Subject: [PATCH v2] staging: fsl-dpaa2/eth: Defer probing if no MC portal available Date: Tue, 20 Mar 2018 07:04:46 -0500 Message-Id: <20180320120446.9573-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: CY4PR18CA0064.namprd18.prod.outlook.com (2603:10b6:903:13f::26) To AM5PR0402MB2692.eurprd04.prod.outlook.com (2603:10a6:203:97::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: bf28b1e2-d18d-4d43-fd3b-08d58e5acf9e X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:AM5PR0402MB2692; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0402MB2692;3:FFG579mDcO+ibf1BU+gWIA9ub1uH8JpBuSMdEYOl7L1mmplBVSS/dqtA3bIh2LCgepJAruV3J4bd2JwkqEN9DXSH6QQdHCEzkGLqsna5Y4kyV16ZvbBhhogbzPAvvqWA5PsBXzfTMQBVIfj0C0d6Vo1JSkbBlZsf26kDw45P9mHKMxmOPusxjLDnIcbUPvzlfAmwGzA18ffS5YAfZXyloeiVOnTHLnDp/ajNsw3XK/oceIshPNa2KM970LGwogqo;25:R7YM127hgZ1Nk/FfeCJKm8zYomWpsaA+XiEwEdxgGJxJBqITErgnXWVWC16tEto0PfMv7x6i9jD7ZHCQS5wsYi8OiMm0C9cVKVMbxcPLpEfY0TLS71FLQ38U3r3lfzw9BM2yMKnWtx39hrHUGGjHnEETyTqna5XF1rUwpU6U95YpxFA1zxRhnjpubbzPky/aeuU4VreBuJLpJcddqAAJzfFxFfxGQ+xoKKtsdGNj3O++RmfwZu+Afhf3fPzR75+lUlye+pipyvD3CdB/ECZGWUbg/mks8/jzPEKAzLBsPhCWHKj+Mh35FqC8536Qnw0SrZj1/rixPNlb7snrhfl14Q==;31:exd5qN3EDPqf0dGJdeWKWe3O6RBrN6YnEWXyMik9AQJDaPy/VEUraSZtlGQshXZCEeyg2pw3BFEeHUXutLqe/en0tgUimrdj+IeI4LemNJD2tBHZosU40/iRJnEdvSQ4tB/SBarix5wN/5HlTHa1R9X595f116NCDPKVuj5Ef4Jv7PPKvp2xx/ESfjOqX9KhSmmAPaTt8Tqdz9wxEkgYiDlhjFoplpCO32uBord7Unk= X-MS-TrafficTypeDiagnostic: AM5PR0402MB2692: X-Microsoft-Exchange-Diagnostics: 1;AM5PR0402MB2692;20:yv4j1dJonas5MJ/v73E5zJ215gd1R52UHu4Y5B600vuiNCHVkbdjNkcmKm6IVcZqxzwGiGS1Fg0eaeF/+1RPH9quErw+IWHPtvnJ+64D/mqK8GlEwAMsB4KoY1rdazTtXAmFeDldW2OfxfXwuSD36QMC5+l3nZijOXARzDxInyArhjHTnh9nhUZOrrf+MRVuMmnqpOc/1ngZg7hC1Q/0S9xCbq708err/JY+7sBVomIAk+9LICqo7cWFAOFwUpBCsY0UTZnR39XdsNI+LMf9YJTaAxzl3pigq0N5IJkglUP8RkVPKl7wtQ4HQA80PUstpe4SX7wjuwyEQwMymbpY0vL2pPLo+F3ZcBSEWXcEWp4dsPVKj8m8z09QobAq11Nn4Ovpnh3aOAUzteTgmsGibfrySSCX5iUT6/fNlx6NpDttfs8z+0Rua5mYKfEHmPBu2d5In3A/FlKm7pHZBkLOn15GPuxzFQBb8CVOFcaiWLWt2Dt5yB4TrBkUP+TOWdCZ;4:a+1PRkvd3bMnO15gG28JzgY3XRFJopeH0Xy/04RnAERVrKmp9mSdkxutPEc9rIADRBESKy1LSv9yT1VuKbHSYZS/f1pI/cFYoawoEX7V8JtbiiaHXDeEtwkjKR7W+Yx05g+7PE5al/cOUboLLTtYg65HbCKaQEvJq6+eh0eFhI9wpw39KjCDxk/lmwZuFt8W/buZtNLC2iYwRJJwr7+SVPVmcYtqSYM89ZsMSk4Fdi5qn58MZTtDh276FXbJthgur66B1JWeHhUC9FsS0sPogCbMwM3LpYopEpaQKan0wyqKtwGCCMzA5jnbxwOWRMeNEJg5jLekrGtsPyXGkVnWAfQfFzcSjFcW1zKNcBfKTaApELH4fjBRN9tdmNLHhGOR X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(227817650892897)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231221)(944501310)(52105095)(6055026)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(6072148)(201708071742011);SRVR:AM5PR0402MB2692;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0402MB2692; X-Forefront-PRVS: 061725F016 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(366004)(376002)(39380400002)(39860400002)(346002)(189003)(199004)(25786009)(97736004)(2361001)(2351001)(478600001)(106356001)(6666003)(59450400001)(105586002)(51416003)(6916009)(4326008)(52116002)(2906002)(5660300001)(305945005)(7736002)(3846002)(6116002)(1076002)(50226002)(50466002)(48376002)(6486002)(16586007)(316002)(66066001)(47776003)(8676002)(8936002)(81166006)(68736007)(81156014)(6512007)(53936002)(386003)(6506007)(36756003)(186003)(26005)(16526019)(86362001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0402MB2692;H:rhuath.am.freescale.net;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A: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;AM5PR0402MB2692;23:5ike2yx4fC9uBYhVTPRPQezo+ixUCL1FbM/GWFt?= =?us-ascii?Q?tQZdcbMEKdnvNLs/j0mb1AnYbVd08Iu/3Qigo8QjlEke8sYUgaqodYh3Q1vM?= =?us-ascii?Q?B7qA/xxy7fpOjpSY+aaW4Ur2Gt88Pf+ugJ5K4cwalpdAAXdKbsqYs8XldGM8?= =?us-ascii?Q?iSdqwwsQuuyZAt0ULA/cs/nKhj5aeoKHr00zlmkapjaSGl3gf16M0XohgCk7?= =?us-ascii?Q?YnmSWFqiQAC5hx/tUAPHa2apjXnUuCESX/xF4TlTIi8mKlRgo0pl/j8+WC4D?= =?us-ascii?Q?9VV4HJbwedphmSMQfUM6Oi+r6aPjpBgX+ToWXhM8QdWcHkPLhprvw+WpkOL+?= =?us-ascii?Q?+//Cak183CPcEojx7jHEj8+D5x0k/fAyItDRmNy1qmswxxPgxLKeJN3d01tp?= =?us-ascii?Q?huf2hcJwNCYDUTPO0Hx096O1bmBt1fx4RnnW7DK1gdwbNix/Wy8P/EhTHiud?= =?us-ascii?Q?r8xt1/x8CfF5XL7e2ZNTdJLja22SYVHDvlKVEASd4hhXFO2tTWySZwFkTfsT?= =?us-ascii?Q?D5awqjeO2wRHogWw2HiOriciGSMtGohTXmntN8J4lAbqFg8DjzKg4mzCIb+7?= =?us-ascii?Q?A5iR2uRrrtP0HwJgCc7Ip5NG6nrID0JloAIaoFDeWR6JNxdrlnMMrEaLeLe1?= =?us-ascii?Q?xS9OvhPd3/ACKzW6c2BhKh7PArYxK+jhE+A32JPze9lWlfYKFTJcGzj+kG75?= =?us-ascii?Q?e/dktSRSAfj65cszYNK640bndy1FoNYzCVMa8UU2xZmx6l5QiM8oWfJiTkTl?= =?us-ascii?Q?0EF6R/URHKPbBk8yhvsJfacjAY/PaORzQStj1q3Hp96G2NaWOPp6ELp+6Ewv?= =?us-ascii?Q?c0slOucqlSHuXO71Jl2wGB6ryi1NihkdsGFXw2PGCMgzysQIUAUUwDZeTizN?= =?us-ascii?Q?IK2e58N8KyWV8wmnM7++u5JK8D6I8svn+fvLtKXsZKD+7zz9TpjSU7w2FS2E?= =?us-ascii?Q?BRsMDMbew4xBW/Py3tNGQ9abYnyCWZrs6TbtjU68OP80zdo1CrrwBtDwfTh9?= =?us-ascii?Q?JyqDA0tS3r+1M7LBexoK5/fkuBOWXstkEXnbp1SZG/oiQJ86llogDHk3/xLA?= =?us-ascii?Q?uLfZ4lLThTjlrzhD2hd5dTL6Z+FPmgKTYUfVzqJ5XLKqYdm8cLAi6yRnwgWs?= =?us-ascii?Q?RHi+szf2VExqOduxjEkAd76BYfY4gp8qi?= X-Microsoft-Antispam-Message-Info: 3AagUVpPTiKZQ1OrMtOSEvnlQ45MJPCrRoEaAUtiFICA4f2BGz9iQ1BPK31Yv2l/GGjEL2fNyp0A/btdyjpfKllkYgC0W19qoOJR1N1u7ykNE4cUAIKw2TthxD5MTlt4RxLJUWL1qRAIVyd2owP3ujEce59Dc9dH32owgY5RHR/oMF/dTm3IUiXu3++M/kMm X-Microsoft-Exchange-Diagnostics: 1;AM5PR0402MB2692;6:23qP/cZlBHIJgZeA8lMor81E+zrs3rNWLYd71mF4VWS5xcu3mYJxTKokgPryc3C/u+yin7H33Q90NfpXpitVJK0VAGeq1VF6MthYiPcA4hkOcy8d+lrcsy8GgJottsdJ+4yYUDl7eHdoWD2moKcxHMF2QZPopQF06ZnzmxWdPkkfRUdD6uPo+avVK7sd9ND5QEI5RRVhphgAexFzDevG1qgrTtnoxhTh4UraNkdcUVQC4hHRlK0O1cUYV3tiicFtvT0jpNm7ATvibe5acFNOrJu1PE9psGXrYWr1FfZ1xGZvsRU4jLFpf4mdWxN6VSxDmxhKKYjrn81FWOcvN/NtmJvVQJZwF7l/TPjMmmnkmzI=;5:L43ERUHfxIwk460V/Gr97iasgfg4irr1zmyXADn4agSm+xavJzJo84evtLSJxzcObcOEFhJWsI1g+/iDcfRDjA2HQKkPWoDeavNvNbL8hvEw3KtKracukbTBPetN3L6np2aI0p8pZwQv9NvVzfBsPeiwW9WzIWfdwMiMbc2EW+o=;24:bKHmXx7h5Lr6jwaCHBncvX25oYdFRhiiMxLx3qoY2ButF8dw5r6608RzDx7JYBcQ1xMd5F3Au3Y/TFm2fwKYeeIvAoc/jybr5T7FOdh7koM=;7:JlfR/r92jnxLIaRR8wtfFgMFNrU53y17zgGAZUY+9TDiQ6d787Wf4Y3zevx/3WTXT77w7IRbchx4VjlY3If1+71oBQZfMi/6/pZKn5lXVRFaEil8YMKA84xy3md4ZP/8uo7LiqdDENovz9ye9iLdxQOlGX7DFwOFyat0uRjV7jVTm7igUikFcZjYYBb5FCrG/AAj5kukSwWgbVFbkjXkxS7VaGlefrBAms2TLg7DUqsKHsPynaqjBwueWRcVFY/X SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2018 12:05:01.1816 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf28b1e2-d18d-4d43-fd3b-08d58e5acf9e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0402MB2692 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 --- v2: rebase on latest driver code 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 f013af6..ac1a750 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -2441,7 +2441,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