Skip to content

Commit 82fecaf

Browse files
Ricky Wugregkh
authored andcommitted
misc: rtsx: do clear express reg every SD_INT
orginal only do clear EXPRESS_LINK_FAIL reg when card removed, this patch moved the flow to SD_INT statement, make sure the reg status is correct when inserted/removed card every time. Signed-off-by: Ricky Wu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent bd86030 commit 82fecaf

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

drivers/misc/cardreader/rtsx_pcr.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,12 +1002,14 @@ static irqreturn_t rtsx_pci_isr(int irq, void *dev_id)
10021002
} else {
10031003
pcr->card_removed |= SD_EXIST;
10041004
pcr->card_inserted &= ~SD_EXIST;
1005-
if ((PCI_PID(pcr) == PID_5261) || (PCI_PID(pcr) == PID_5264)) {
1006-
rtsx_pci_write_register(pcr, RTS5261_FW_STATUS,
1007-
RTS5261_EXPRESS_LINK_FAIL_MASK, 0);
1008-
pcr->extra_caps |= EXTRA_CAPS_SD_EXPRESS;
1009-
}
10101005
}
1006+
1007+
if ((PCI_PID(pcr) == PID_5261) || (PCI_PID(pcr) == PID_5264)) {
1008+
rtsx_pci_write_register(pcr, RTS5261_FW_STATUS,
1009+
RTS5261_EXPRESS_LINK_FAIL_MASK, 0);
1010+
pcr->extra_caps |= EXTRA_CAPS_SD_EXPRESS;
1011+
}
1012+
10111013
pcr->dma_error_count = 0;
10121014
}
10131015

0 commit comments

Comments
 (0)