Skip to content

Commit 5332ff1

Browse files
Peter Chengregkh
authored andcommitted
usb: chipidea: need to mask INT_STATUS when write otgsc
For otgsc, both enable bits and status bits are in it. So we need to make sure the status bits are not be cleared when write enable bits. It can fix one bug that we plug in/out Micro AB cable fast, and sometimes, the IDIS will be cleared wrongly when handle last ID interrupt (ID 0->1), so the current interrupt will not occur. For stable tree: 3.12+ Cc: stable@vger.kernel.org Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent cd0b42c commit 5332ff1

File tree

1 file changed

+3
-3
lines changed
  • drivers/usb/chipidea

1 file changed

+3
-3
lines changed

drivers/usb/chipidea/otg.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2013 Freescale Semiconductor, Inc.
2+
* Copyright (C) 2013-2014 Freescale Semiconductor, Inc.
33
*
44
* Author: Peter Chen
55
*
@@ -19,12 +19,12 @@ static inline void ci_clear_otg_interrupt(struct ci_hdrc *ci, u32 bits)
1919

2020
static inline void ci_enable_otg_interrupt(struct ci_hdrc *ci, u32 bits)
2121
{
22-
hw_write(ci, OP_OTGSC, bits, bits);
22+
hw_write(ci, OP_OTGSC, bits | OTGSC_INT_STATUS_BITS, bits);
2323
}
2424

2525
static inline void ci_disable_otg_interrupt(struct ci_hdrc *ci, u32 bits)
2626
{
27-
hw_write(ci, OP_OTGSC, bits, 0);
27+
hw_write(ci, OP_OTGSC, bits | OTGSC_INT_STATUS_BITS, 0);
2828
}
2929

3030
int ci_hdrc_otg_init(struct ci_hdrc *ci);

0 commit comments

Comments
 (0)