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 A4A9E374A0E; Thu, 30 Jul 2026 15:59:26 +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=1785427167; cv=none; b=iZQ8IrhXPkKuwZ/uPgIMmFDdxmwkciKeV7r0uiUChQ4DSo994Ly4zPyvksq6YPuEafd4fPJ+mCiSVi6rmwpcQDBoF4+fVp00Kc1LHMpv7gpf6egAYiYc0QfuJI5jg04hSGP9jBJQWTkxK52K8/pLqFik1JYZe70rCsnTZdx4n6s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785427167; c=relaxed/simple; bh=tKebIHxqO+hJcJ3dfg/hq+dWeMyZyWx+IET1+ydXlo0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iCDssYzh5r4chsW8cdCiJWOQ0t5UZ0LfhyaSEWCtkC4tMmNl1YYxJcddqJVnJYRRgpsFFBhZAWueM/JJCdrJ+39JVxEl6rVo7oR0i/qMW2gH566XWToZO4gkxYuO5itdD2vbbbxlvKo5CI6M2vOu4j+jDDR+4vFx1jYwsw5+ssk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Xe3nosZq; 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="Xe3nosZq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B7BB1F000E9; Thu, 30 Jul 2026 15:59:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1785427166; bh=tCp1pCsMQJQpdfxzfVJ7ynW/AXcSwYJJ4ynJvBxHNqU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Xe3nosZqT4KzIkLq/EVmbPInH3xz+bzmy4QAzrn6qTzIwZyC8Lry1H5A/6qX2RvbV +gxblqmu9QqnMbSXN3X0m35xwJA9m+Djoq4CmjP4Oxd7j3Jt6Z4bhPsAno1RIjUqTU yQ4G7TWEJkV5BA3usgaEZLnelOFAXyc85PHQLFcU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Rosen Penev , Damien Le Moal , Sasha Levin Subject: [PATCH 6.6 074/484] ata: sata_dwc_460ex: enable SATA interrupts only after IRQ handler is registered Date: Thu, 30 Jul 2026 16:09:31 +0200 Message-ID: <20260730141425.045333660@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260730141423.392222816@linuxfoundation.org> References: <20260730141423.392222816@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.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rosen Penev [ Upstream commit 4bbc16a353a98023e5ddfca7c1fc0e49971cf4d0 ] sata_dwc_enable_interrupts() is called before platform_get_irq() and ata_host_activate(), leaving the SATA controller's interrupt mask enabled without a registered handler. If a later step fails (irq request, phy init, etc.) or if the controller asserts an interrupt during probe, the irq line may fire with no handler, causing a spurious interrupt storm. Move sata_dwc_enable_interrupts() after ata_host_activate() so that interrupts are only unmasked once the handler is registered and the core is fully initialized. Fixes: 62936009f35a ("[libata] Add 460EX on-chip SATA driver, sata_dwc_460ex") Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev Signed-off-by: Damien Le Moal Signed-off-by: Sasha Levin --- drivers/ata/sata_dwc_460ex.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index 52f5168e4db542..16c1deef389d10 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c @@ -1168,9 +1168,6 @@ static int sata_dwc_probe(struct platform_device *ofdev) /* Save dev for later use in dev_xxx() routines */ hsdev->dev = dev; - /* Enable SATA Interrupts */ - sata_dwc_enable_interrupts(hsdev); - /* Get SATA interrupt number */ irq = irq_of_parse_and_map(np, 0); if (!irq) { @@ -1203,6 +1200,8 @@ static int sata_dwc_probe(struct platform_device *ofdev) if (err) dev_err(dev, "failed to activate host"); + /* Enable SATA Interrupts */ + sata_dwc_enable_interrupts(hsdev); return 0; error_out: -- 2.53.0