From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9540E50E5B0; Wed, 30 Sep 2026 15:35:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790782561; cv=none; b=sUauljq0wSBEzmT1OXV/mQ84qioNo5JyGQ1wZy030LUP9Bs1UmZKb4YuIJ6woh8WEcBA69PQXlAfjIyyeRvk/SsWqqUlJvsy3k+v/OGTw22EZ6gUrkagCoYwgKUuapmhmhHH42nRSnmZXTayUOD+AxSrFb46ii7tTp7M9he0V6Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790782561; c=relaxed/simple; bh=El5JXjVp5ppS+q5yZte8ZlXAFgrYdVfYEQ6DKhBT//Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ql2ujsKzhHJJ/I4PwDUSLVZMV/JhYZ1d1IX84N04818pIQK4DlRlqB/nwMQTUEXZU4yIjpFSOMHSGHa+mtg0wHOfm7K34zA4PwGrmu5tsKynImp/PJxL8PCfPc1kbQkm1wxZow0qRbQjtzcZrdc4AslfYkBLYRgO9wI1nqMsAGo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bN7YECXg; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="bN7YECXg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A9131F000FF; Wed, 30 Sep 2026 15:35:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790782550; bh=0T+Kdk74DGzoBWlk9724p5veDaJAoKIHgKbqCpy53hY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bN7YECXg2uKV/8pAnNkUXAveAO8boyHr6Axv9NKC41WZjIOuvHC8+7KHhVIrmOljV dczA2I2ZAtYQg5kOMdwaUtuh6DCDdnOvol0XF0ccxVRXzMVp2zRz94mz1PwwVu4k8a zhLQuTUTfEqmAu58pqdTD5Gt/h5KlD5TGCSmNWs4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Osama Abdelkader , Ulf Hansson , Sasha Levin Subject: [PATCH 5.10 086/595] mmc: davinci: fix mmc_add_host order in probe Date: Wed, 30 Sep 2026 17:19:39 +0200 Message-ID: <20260930152349.588278864@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152347.700140858@linuxfoundation.org> References: <20260930152347.700140858@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Osama Abdelkader [ Upstream commit d04e0151d316edbdb4f0397a9b92a1936e4a1421 ] mmc_add_host() makes the host visible to the MMC core. Register the interrupt handlers and advertise MMC_CAP_SDIO_IRQ before that, so the core cannot start using the host before IRQ handling is set up. Signed-off-by: Osama Abdelkader Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/davinci_mmc.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index f026ffc4dc1af..887acabf96fb3 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1305,14 +1305,10 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) goto cpu_freq_fail; } - ret = mmc_add_host(mmc); - if (ret < 0) - goto mmc_add_host_fail; - ret = devm_request_irq(&pdev->dev, irq, mmc_davinci_irq, 0, mmc_hostname(mmc), host); if (ret) - goto request_irq_fail; + goto mmc_add_host_fail; if (host->sdio_irq >= 0) { ret = devm_request_irq(&pdev->dev, host->sdio_irq, @@ -1322,6 +1318,10 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) mmc->caps |= MMC_CAP_SDIO_IRQ; } + ret = mmc_add_host(mmc); + if (ret < 0) + goto mmc_add_host_fail; + rename_region(mem, mmc_hostname(mmc)); dev_info(mmc_dev(host->mmc), "Using %s, %d-bit mode\n", @@ -1330,8 +1330,6 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) return 0; -request_irq_fail: - mmc_remove_host(mmc); mmc_add_host_fail: mmc_davinci_cpufreq_deregister(host); cpu_freq_fail: -- 2.53.0