Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2648233imj; Mon, 11 Feb 2019 06:26:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IZQlfFTWSS5NuEHoKltZ2Fpysl8x7lJIirgAKckHtu7zob1YrH2RHH21LqrkuJ3VQYHEnty X-Received: by 2002:aa7:86d1:: with SMTP id h17mr30523644pfo.181.1549895201104; Mon, 11 Feb 2019 06:26:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895201; cv=none; d=google.com; s=arc-20160816; b=NkjLyLcLVl7Am2X3GjpmjDwG5dJXlJv4ql4x2b16yOq8e4lQgTcAweIjrtqnXAdoN+ RKYsdcersKzoVjclAt1mz9euZCz1LPB1BMVacY3mGFd9zTlFDelTOnUlHXFr0Kyr4tfF 3N8UCtXbT6YXcxoGcNgTdOEQo77kUiXCREP+uNcw46GGtJ57zjXdfH6CNa293KJbeMcn vDr+zF4S/j1+VLGZ/SBDQ4OL45qm1HWZjLCigS3ey6r743GsMuyiceXdnQuZn9k7MDLW fsaE36E0MiCyuONkp6KFyXNt0DjHXfNUuc15RGZw/YWMfo+aQ9mEj5UwaAeeQe5WITKU tzYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZcF/H5aLvQKPSn/bOnG8kSSqvN9+D8VSw2JxmoAKPjg=; b=IPxVUP7wSAVIl9KcpM53eVyvlojtjfW9VdF7rI6vFo/ZrhmmZsidNnI4kehwsnDm1Y NtIpnKPh0mnG4vhShISP5g7QnBrF4VJt9sfu8LKMKWTcteCw+Mdy6XEBHTU5YQ+by1mS UqYk50Zo5ZNky5qduFkTFvB6aeBi3+PZ4ZPK4XLSVdD7L8UG7qO8AUtapNHSAOiQLrip F/1lWCAYAcw9QS7nSZUyhz+NpWMEOXgRMe/LGg6jjoEWHrQKozqXhn/025Nog7ZirHl9 MoY542TwXrtOPO86Bmq/oNDddg6FHHZKf44CN2E6kGD+PPEDLyR7qvJB8fPHs0lYHhSh H0eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zOp4PRMS; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y123si9567926pfy.18.2019.02.11.06.26.25; Mon, 11 Feb 2019 06:26:41 -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=@kernel.org header.s=default header.b=zOp4PRMS; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728691AbfBKOWK (ORCPT + 99 others); Mon, 11 Feb 2019 09:22:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:55058 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728677AbfBKOWJ (ORCPT ); Mon, 11 Feb 2019 09:22:09 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9E1FC20844; Mon, 11 Feb 2019 14:22:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549894929; bh=oHtb8RQjyGHeXqg4WDiOfECALbbC1hqoUBGnPZso5c0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zOp4PRMSwgPIZC7LTryAhLA9wyf+h5oVQ4LJCtnUN+ta81f4MjfZqRI43eqIaPL4v 8foZZ9y/onlW2XzJPi3O4lOdTzGgGDknDe5F2PRoqtxqakc0SkBTAI/X5kh7QuYiza YSlBzXVv6tzPQMgPVQWGJyZgalrSq6nyStINQr2Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ioana Ciornei , "David S. Miller" , Sasha Levin Subject: [PATCH 4.20 034/352] dpaa2-ptp: defer probe when portal allocation failed Date: Mon, 11 Feb 2019 15:14:21 +0100 Message-Id: <20190211141848.511147253@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 5500598abbfb5b46201b9768bd9ea873a5eeaece ] The fsl_mc_portal_allocate can fail when the requested MC portals are not yet probed by the fsl_mc_allocator. In this situation, the driver should defer the probe. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c index 84b942b1eccc..9b150db3b510 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c @@ -140,7 +140,10 @@ static int dpaa2_ptp_probe(struct fsl_mc_device *mc_dev) err = fsl_mc_portal_allocate(mc_dev, 0, &mc_dev->mc_io); if (err) { - dev_err(dev, "fsl_mc_portal_allocate err %d\n", err); + if (err == -ENXIO) + err = -EPROBE_DEFER; + else + dev_err(dev, "fsl_mc_portal_allocate err %d\n", err); goto err_exit; } -- 2.19.1