mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
ata: sata_dwc_460ex: enable SATA interrupts only after IRQ handler is registered
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>
This commit is contained in:
committed by
Damien Le Moal
parent
793bf193b1
commit
4bbc16a353
@@ -1169,9 +1169,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) {
|
||||
@@ -1204,6 +1201,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