From patchwork Tue Jun 16 15:35:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 188063 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp3773075ilo; Tue, 16 Jun 2020 08:55:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzieZZHfcKwzzLCsSnrnwAdARBnIWvzoCyGGDMp7tC0rPLGnWNRNb4O+cv2bBVgroFcJZMo X-Received: by 2002:a17:906:1088:: with SMTP id u8mr3594328eju.428.1592322917822; Tue, 16 Jun 2020 08:55:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592322917; cv=none; d=google.com; s=arc-20160816; b=IzUha9rS0fnVXTGnIDLO2sROVKA8qYep77U48vd8lMCFOZbhrOfLNqJuWRCeDxeLfv tZxl9HPtR7KYJsGOA5QVYHN0bCu8XVLyExlGsGa9iqi0hGWLcAGSVLXGeR45awgqn8A1 jIf6wG4zVEb8sHxp/VIwkzlsTedGoxpwXB2JGPnbfuCPVLHHUohjSfHisMjWWURlXW+W IUVGfRGJM0om3e3EkC2d64ey63lVRrfT0tQJmPkVnf4bS1RaBezR3csUcoO7pL8WerST STjpHZSSd9+kvYhxkJ6AWXr6kqpi8wS+DlR3JPxHBzgduEvFqsXOVn+Ir9R3PH39iDFK h03g== 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=kkGkZx3ByucaJSLyRgW+O/aBFEFRuCLO8fn9eHrGbQQ=; b=fhuIpXJBMtvkRxLsK6PEdqt70FpzU5QL4ZJsjIyI1m3KljtePx7Sa9LRXEfrsNihLk 9GOgvHtOwsgCEyvx1266YNhEAkjS3lrV807+VvX5e+JcnQP8SfsWYZwZnigjIPjpBANR GQImnQfKq8KyzfNgL50abDKgo++CXr/2nFhOT6bcCelXJr/lKOcVk3feGY6MSnQftBve DNT+WWFw5kh2nkUl/bKPW4ETXvfEaZlN4TG1gbsmzqLy0kYzAwDRbA+PeGkGCDClUG0K b/ghg54XUrzvyPfpR/aurfah3VCNNXUtagtazCh1pvlMGufB7Xh1V1CxYe9CFx2h5IZR I0YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eph9299B; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oz13si3896145ejb.567.2020.06.16.08.55.17; Tue, 16 Jun 2020 08:55:17 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eph9299B; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733067AbgFPPzO (ORCPT + 15 others); Tue, 16 Jun 2020 11:55:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:55164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732745AbgFPPzN (ORCPT ); Tue, 16 Jun 2020 11:55:13 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 D037221532; Tue, 16 Jun 2020 15:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592322913; bh=wvkG8oLcFXZiSR2IS2+UDxHhiG4WeeVdy5UKKuQIeE8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eph9299BMkjeABbAN7I7I5+VunYgCIMs99To5u6aeyQxVBRPVUocqwKe7ol9xc4Xf 1MgA/Hm9pc+yRtGvymk1TY+h+vuZ/5xaVMVeIuvM9LU+A0WhmfXPjdtfW8C4xKtygF BURMv1Ei36iyAH0EEabW4BFV62vNUmrvr5Fs7Rjw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Ulf Hansson Subject: [PATCH 5.6 152/161] mmc: uniphier-sd: call devm_request_irq() after tmio_mmc_host_probe() Date: Tue, 16 Jun 2020 17:35:42 +0200 Message-Id: <20200616153113.583131562@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200616153106.402291280@linuxfoundation.org> References: <20200616153106.402291280@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Masahiro Yamada commit 5d1f42e14b135773c0cc1d82e904c5b223783a9d upstream. Currently, tmio_mmc_irq() handler is registered before the host is fully initialized by tmio_mmc_host_probe(). I did not previously notice this problem. The boot ROM of a new Socionext SoC unmasks interrupts (CTL_IRQ_MASK) somehow. The handler is invoked before tmio_mmc_host_probe(), then emits noisy call trace. Move devm_request_irq() below tmio_mmc_host_probe(). Fixes: 3fd784f745dd ("mmc: uniphier-sd: add UniPhier SD/eMMC controller driver") Signed-off-by: Masahiro Yamada Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200511062158.1790924-1-yamada.masahiro@socionext.com Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/uniphier-sd.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -610,11 +610,6 @@ static int uniphier_sd_probe(struct plat } } - ret = devm_request_irq(dev, irq, tmio_mmc_irq, IRQF_SHARED, - dev_name(dev), host); - if (ret) - goto free_host; - if (priv->caps & UNIPHIER_SD_CAP_EXTENDED_IP) host->dma_ops = &uniphier_sd_internal_dma_ops; else @@ -642,8 +637,15 @@ static int uniphier_sd_probe(struct plat if (ret) goto free_host; + ret = devm_request_irq(dev, irq, tmio_mmc_irq, IRQF_SHARED, + dev_name(dev), host); + if (ret) + goto remove_host; + return 0; +remove_host: + tmio_mmc_host_remove(host); free_host: tmio_mmc_host_free(host);