mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
Merge 93a56dbe12 ("drivers/card_reader/rtsx_usb: Restore interrupt based detection") into android14-6.1-lts
Steps on the way to 6.1.129 Resolves merge conflicts in: drivers/usb/host/xhci-ring.c Change-Id: Ie123285eab89802392003b95ec495b21820ad41b Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -286,6 +286,7 @@ static int rtsx_usb_get_status_with_bulk(struct rtsx_ucr *ucr, u16 *status)
|
|||||||
int rtsx_usb_get_card_status(struct rtsx_ucr *ucr, u16 *status)
|
int rtsx_usb_get_card_status(struct rtsx_ucr *ucr, u16 *status)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
u8 interrupt_val = 0;
|
||||||
u16 *buf;
|
u16 *buf;
|
||||||
|
|
||||||
if (!status)
|
if (!status)
|
||||||
@@ -308,6 +309,20 @@ int rtsx_usb_get_card_status(struct rtsx_ucr *ucr, u16 *status)
|
|||||||
ret = rtsx_usb_get_status_with_bulk(ucr, status);
|
ret = rtsx_usb_get_status_with_bulk(ucr, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rtsx_usb_read_register(ucr, CARD_INT_PEND, &interrupt_val);
|
||||||
|
/* Cross check presence with interrupts */
|
||||||
|
if (*status & XD_CD)
|
||||||
|
if (!(interrupt_val & XD_INT))
|
||||||
|
*status &= ~XD_CD;
|
||||||
|
|
||||||
|
if (*status & SD_CD)
|
||||||
|
if (!(interrupt_val & SD_INT))
|
||||||
|
*status &= ~SD_CD;
|
||||||
|
|
||||||
|
if (*status & MS_CD)
|
||||||
|
if (!(interrupt_val & MS_INT))
|
||||||
|
*status &= ~MS_CD;
|
||||||
|
|
||||||
/* usb_control_msg may return positive when success */
|
/* usb_control_msg may return positive when success */
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user