Skip to content

Commit 66c4e31

Browse files
nehebdamien-lemoal
authored andcommitted
ata: sata_dwc_460ex: fix clear_interrupt_bit() clearing all pending interrupts
clear_interrupt_bit() ignores the bit argument and performs a read-write-back of the entire INTPR register. If INTPR uses standard Write-1-to-Clear semantics, this clears every pending interrupt bit, not just the intended one. Coalesced interrupts (e.g. DMAT + NEWFP) would be cleared together, silently losing the second event. Write only the specific bit to clear so that other pending interrupts are preserved. Fixes: 6293600 ("[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>
1 parent a4af122 commit 66c4e31

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/ata/sata_dwc_460ex.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,7 @@ static void clear_serror(struct ata_port *ap)
394394

395395
static void clear_interrupt_bit(struct sata_dwc_device *hsdev, u32 bit)
396396
{
397-
sata_dwc_writel(&hsdev->sata_dwc_regs->intpr,
398-
sata_dwc_readl(&hsdev->sata_dwc_regs->intpr));
397+
sata_dwc_writel(&hsdev->sata_dwc_regs->intpr, bit);
399398
}
400399

401400
static u32 qcmd_tag_to_mask(u8 tag)

0 commit comments

Comments
 (0)