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 7BCA3515980; Thu, 17 Sep 2026 16:55:08 +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=1789664109; cv=none; b=aKiTbChSH+cgRTrrCKwOEdrihV2n9R5g/vl76KIWYB7nYidVxZB4WBCoAf7ku5H7rVDVlUmVnnkXVknU6Xg1Fs5OS+8+sBTAF6aRFWJyE+sI1yhLTRjwhVBIRbBcie/uavjABF10ygGFI3JQacvQW2crfLmFuK4pEQ5HpRmsjxM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789664109; c=relaxed/simple; bh=HvQJDJ3jSKXEOZpMEHYMpHlEa7ZFg/YXXHVEAd/pzJw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fxHiiCID3sT0pLzCG+RHTc88ULJZgnam1gOHxdRED7vp57M8Bqk2mGJWyjqW9WC3btTPinMoqpXNtEkRr6B7Jqmp2baaCWSdeTjKwwbRxokKYiJOU7q4nU5gf2ahDki7xiM0etMck1/X08cqr46lvqj3NfbT86g+qhplxGj2m0g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SNjSkNPc; 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="SNjSkNPc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D702D1F00893; Thu, 17 Sep 2026 16:55:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789664108; bh=X4m0YVSH+FHofrIgtokuC7dlxLqWkwXTYfX24c6ETfo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=SNjSkNPcq/ipF6kn7kYAQ0CO81LhQHs+0yzMm2czQo4MnX2INI6sEs9wjkPLeuqUe zvt8lMFeRmNsesEwdi0pQo8k70yaInMSzq8Hyqgf3vArMvGwhDR6r3ZGQIfvHkUtDU 7Kpa77UemV6tjcQRVq6QbaBu0mHzPXhUrPQMulWI= 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 6.18 0263/1250] mmc: davinci: fix mmc_add_host order in probe Date: Thu, 17 Sep 2026 16:00:58 +0100 Message-ID: <20260917151559.277767065@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260917151551.901433442@linuxfoundation.org> References: <20260917151551.901433442@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 6.18-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 00adc15956fd2..3d0d05ab1fe48 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1294,14 +1294,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, @@ -1311,6 +1307,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)); if (mmc->caps & MMC_CAP_8_BIT_DATA) @@ -1324,8 +1324,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