Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751583AbdFFPBF (ORCPT ); Tue, 6 Jun 2017 11:01:05 -0400 Received: from mail-co1nam03on0084.outbound.protection.outlook.com ([104.47.40.84]:28189 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751511AbdFFPAz (ORCPT ); Tue, 6 Jun 2017 11:00:55 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Ioana Radulescu To: CC: , , , , , , , , Subject: [PATCH 10/18] staging: fsl-dpaa2/eth: Defer probing if no DPIOs found Date: Tue, 6 Jun 2017 10:00:33 -0500 Message-ID: <20170606150041.10955-11-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170606150041.10955-1-ruxandra.radulescu@nxp.com> References: <20170606150041.10955-1-ruxandra.radulescu@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131412348453472425;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39410400002)(39400400002)(39850400002)(39380400002)(39860400002)(39840400002)(39450400003)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(9170700003)(6916009)(85426001)(305945005)(2351001)(106466001)(5660300001)(189998001)(105606002)(76176999)(47776003)(36756003)(48376002)(50466002)(33646002)(81166006)(8936002)(50226002)(39060400002)(8656002)(38730400002)(86362001)(7416002)(4326008)(8676002)(50986999)(110136004)(5003940100001)(53936002)(356003)(1076002)(77096006)(104016004)(6666003)(2950100002)(2906002)(498600001)(54906002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0301MB0906;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC008;1:fnwy6WsKOoqA6mj0Fmtb1xYpVG3Oj4pU2wGZsCThezQqcGgltGZYwZuaO6JVah9p3SFCBGpJcvjsdHXzbv8sTR6hbXUFKqvaV/JpOqzam5sTHxFygeRCkqs979n2BBPM7D5NviCJE1XcB8DlbqRF390thuWf75FlNF+UyksBF3RfVxCchFrK23LR+5p7XU56GHykDMnwqE6Krve6k3abPMcPbKZYdsIJN3ANfsE6Vffro9OXZxNlkoPCO5duWJSQshPFjdOHVOJJKdnhjm6KQWXtSwRVz7hcTqtPTbc58NfuCaFvIGd64rY0yw/++gOvCqqdQ5AD99IJzlm8rfk/K7Dy0vwCJmwn5kbTX/J/W5qVa5igL+/h/40aigZz4RFTeGNQ5LAchtJ4nO1LKzRabC3p/7oN/4LaV7qAUx2SWCiqIV0uUphguEoxagBxRMj7oEibu8+kf7x6LfRO9a//FGcKdlp70SX9/2kbzjNDpWCTVGycSaug5bAPdd1uSTFw60iqeE67bJpz6QD8t8Wl08PBThY49xISCawYvPgEW3eDyceBfrgY78lysDz7EMQ3nqzAOf/UJfYQIuvoViz0DJFL7kVT+BZNF6RV1Qzs8KessnRsbgK4VzPly5rMylqvqjgNaWmCXvF+ReLIeIGdBepE5ZLwp4wcsditg/3RNLAAh//upJlMVXeSD9BZOAYK MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY1PR0301MB0906: X-MS-Office365-Filtering-Correlation-Id: 31c1ff5e-25ef-4d99-3dc9-08d4aceccf0f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131430075)(201703131517081);SRVR:CY1PR0301MB0906; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0906;3:lCh26PoXzBAKEXLB/GgelUiKkfZWwTfvvmGrpszikaB211lujt+KCGKgs4kmlGIem5BJAD+r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2xRzUu5BUDYe4UBC4j2mXSbHVC5ta6TB8EW48MD60zR7B48UckQppMz3/OEHv0+lOg/HP+IYlewa+2gLWy4P1Ao2g8bl97upoTjSEBToBO/w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123556025)(20161123565025)(20161123563025)(20161123559100)(20161123561025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR0301MB0906;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR0301MB0906; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR0301MB0906;4:rwVyeOxLcnZI/TB/horALskbStk+xobFV350Ff/w?= =?us-ascii?Q?mIYzHzgu9U7tNBINe7kqJRlcn6Wey90ORPyTtTcdO/O9tYE8jolRaemNe2+E?= =?us-ascii?Q?dqXQ0cZT1Mbx+Fsq3aPdYMMURwuGQbEzKtdj3AYWquryzZTTX2Cn0A29L2wT?= =?us-ascii?Q?PZP5eu580nrbCGIDOD2aQlyIzyhhlEpRAmE7umPrtXOOy5HQV0KVH2Vpt9kH?= =?us-ascii?Q?GVzcje3++KPFShB+AXBoGf3/sE9Q7IcKjpScu/kg5KR4x3j9ipZGwDTn+WB4?= =?us-ascii?Q?S8B4xBbYewb56ME5VjFivMzDz6UWLRSzpSWE3aMhUm5B1AnVz56Fm/ZkCPKJ?= =?us-ascii?Q?9DP6f3sCHmdKstruGQBZxrqZeMopnKLQ8ITv4vLRa3g3cg4sd/3HquBAD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?= X-Forefront-PRVS: 033054F29A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR0301MB0906;23:BvpVqxJQCau0MMGWMOqnmbqnW+ijD1HlLAxcjxh?= =?us-ascii?Q?df9jq73IjaEFdWFi0db82UL6722+sMRHLZAk0aONDeM0gCc0NXU+T5F0AzC3?= =?us-ascii?Q?tIZ6S6dvHpfFZpWuY6sHVB/wnoPFGLqzSD/Q56P7mbV+foE4Q9xgFgvng7D3?= =?us-ascii?Q?DfPfrFAwgyqjdfcyt9ZDUdlEdBfy87y0oWJqOwoiG9yi6uykb4jryqY61cjI?= =?us-ascii?Q?h3y6b0W5+TogLukx4EoZrHsWV14BCCVgTk8Oqlpe7ywRVAJvkAi+gqmki1sF?= =?us-ascii?Q?Brihy1wY3iIl690OcbKUQoDY1PH3PNn36HyTgaW7YWo3mfLy1v0im67MEzkn?= =?us-ascii?Q?CvepQApgXcMXkfSJEhtrTF9bd9tGgODdgHLzcaV8jnDNZDIr3MxVO9RgpqFz?= =?us-ascii?Q?A/0P+/0wiGrJWKTnxbkMsUQFYovFYzgGwQSkPfONP1vd7/fxwTFf8YM9Afyi?= =?us-ascii?Q?9d2iBpDQNh1NqEUD/l34lL1tNIwa99NurMHMRqMZjJmk26mpvaxmxc5h9qZ8?= =?us-ascii?Q?YpkbbNfO4WZOxiNwGDn11n0s+KC2/+7TfCsADHyMZywElloLBmvpxfI5lp6H?= =?us-ascii?Q?3l7wgPn64URnX5Ywbr0Jxl/PF/mylRUZGih5ovXSBFwA4cV1hAqkNxpRBfOn?= =?us-ascii?Q?hm1VWaHY9DQqbx/8YjldWUCap0zXsaKlQo9CIPA7eJeLOGZEq6z0CS4Qg2j5?= =?us-ascii?Q?8CibBQ6D/0zEP4t0b9KMU43ItBK4BX6bdyJwHF8g2HFZ6w5uNjH+v0s7YdvN?= =?us-ascii?Q?IgS5A4jpKIGI4tH6Mq3nhYJBpxMyLyahZDbfD9A3FOTfClMZ9AgVPdIBdnHE?= =?us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gsv8a2ZGUrAUhnwnYXFrDA9sz3SpFoQMuW4LUTCzYz8PaUHkYYzQP14d68/JNHSKdAQkcrgLzBJ9qRWT9pFE6IBQrpJ/3K4fMyUd716aV7zi9hyiWVM3oM49OcN51dEolb/WovxsBpHWMaD/d/13i4nWYSGH9P4+w== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2017 15:00:45.0352 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB0906 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1799 Lines: 50 If the Ethernet driver doesn't find any DPIO devices during probe, it may be either because there's none available or because they haven't been probed yet. Request deferred probing in case it's the latter. Signed-off-by: Bharat Bhushan Signed-off-by: Ioana Radulescu --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index fd56fbd20087..025b5f6559a4 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -1510,6 +1510,7 @@ static int setup_dpio(struct dpaa2_eth_priv *priv) if (!channel) { dev_info(dev, "No affine channel for cpu %d and above\n", i); + err = -ENODEV; goto err_alloc_ch; } @@ -1524,10 +1525,13 @@ static int setup_dpio(struct dpaa2_eth_priv *priv) /* Register the new context */ err = dpaa2_io_service_register(NULL, nctx); if (err) { - dev_info(dev, "No affine DPIO for cpu %d\n", i); + dev_dbg(dev, "No affine DPIO for cpu %d\n", i); /* If no affine DPIO for this core, there's probably - * none available for next cores either. + * none available for next cores either. Signal we want + * to retry later, in case the DPIO devices weren't + * probed yet. */ + err = -EPROBE_DEFER; goto err_service_reg; } @@ -1565,7 +1569,7 @@ static int setup_dpio(struct dpaa2_eth_priv *priv) err_alloc_ch: if (cpumask_empty(&priv->dpio_cpumask)) { dev_err(dev, "No cpu with an affine DPIO/DPCON\n"); - return -ENODEV; + return err; } dev_info(dev, "Cores %*pbl available for processing ingress traffic\n", -- 2.11.0