mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
ata: sata_dwc_460ex: enable SATA interrupts only after IRQ handler is registered
[ Upstream commit4bbc16a353] 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:62936009f3("[libata] Add 460EX on-chip SATA driver, sata_dwc_460ex") Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4dc0e63abf
commit
fbe7df5d3a
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user