Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3710918imu; Mon, 28 Jan 2019 09:26:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN7oThJu55CSHF2QNjkSpWpSvaMRiUPZS6vUoJ1rMOcOMdUzSLMAuwW13EcTOESbiBYkbX/d X-Received: by 2002:a63:1b58:: with SMTP id b24mr20257561pgm.247.1548696385366; Mon, 28 Jan 2019 09:26:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696385; cv=none; d=google.com; s=arc-20160816; b=uxLn5PzSR8FzQLmnm/TU5UMlMzte5ZjEH5WQOSqpI3bKA+Js9vnbtclPR8sYA82jjk p7wXV9qNrbGhHzYK/WeYilhcuJP3FNWYv8vwraN0KHio6CrTj7EVVlkcHgJh5sDyyMgF G6HJDOdTYo/1Ddw2cW7xyetuzplRApmk5VQnHyVX1EQXXSmvWP/3xw7K6UtN+hfRZDqD 4x8xj9jpFtle6lhCSPPKS28YAo8l2GvN+NLBjaRmzxMQkx5lxYQikJEMFr7S25NYFMGO YQN472C+adSOVxEAxe7/TN7lX+nUHE6oI0iR8NFinmD7K9nt5mFr8aJ88ICulFSv93G3 1oxw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tzwwlzC5viH5eB4sWUX5D1if9DXmT1zbHbxawpYEx4o=; b=iJ9w6/1MchkJ+3DeJ8jI9aBCc+4uatpfiP6a3y1CydVNaGwBzasfGqBcyI7ARWJma3 GF8WtdgfAmMzadhTTJOZsKPwsZ2xlry8D2TsfivT1HvW324oMiu3kaw4LEpQcspuABpd 51we9xQATaixa7ibIREPa5ijSL8GMI+ImN5tgkUnrEBnLZPN29rsEF7Xb6nj4eiI1F6n xSIHFJbrndKjZEV1KVysNRLHw+2zXcd6NMnDhfhmGaC1TgSBy/iTr+lBz2ojEAOunAy3 nf7v6Apb6IU+/B2GPQCEkAs1pIQLGkyT+InxZ5k0q8RZXQFdXPMH4kRZRYMOTmNAlT3N 62bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=anKW3tmR; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h5si34207882pfg.233.2019.01.28.09.26.09; Mon, 28 Jan 2019 09:26:25 -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=anKW3tmR; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730866AbfA1QAy (ORCPT + 99 others); Mon, 28 Jan 2019 11:00:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:46152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730512AbfA1QAv (ORCPT ); Mon, 28 Jan 2019 11:00:51 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5E35221919; Mon, 28 Jan 2019 16:00:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691251; bh=tVhLaO8AFrXoV9RBbMbzy2X+9ZWeSUKzmb+unBx5Ulw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=anKW3tmRdGDiwjwdSc9N8NwS5QRYjsOhmcLSacjsQazXHFZejtGnliV09T4h+ehtN 04DRtVxBhv24PpIlhe6IswWzB41+NE12X3nXBwi5aOY3epEy4P8zMB2LrzPu0CqQlb blfQ+UCYwEDemZVcepaJojH+C/J8Q3YdnrugN0no= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ioana Ciornei , "David S . Miller" , Sasha Levin , devel@driverdev.osuosl.org Subject: [PATCH AUTOSEL 4.19 032/258] dpaa2-ptp: defer probe when portal allocation failed Date: Mon, 28 Jan 2019 10:55:38 -0500 Message-Id: <20190128155924.51521-32-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ioana Ciornei [ 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/staging/fsl-dpaa2/rtc/rtc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/fsl-dpaa2/rtc/rtc.c b/drivers/staging/fsl-dpaa2/rtc/rtc.c index 0d52cb85441f..318a33c2f7a7 100644 --- a/drivers/staging/fsl-dpaa2/rtc/rtc.c +++ b/drivers/staging/fsl-dpaa2/rtc/rtc.c @@ -142,7 +142,10 @@ static int rtc_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