Commit:     08cbc706acd2dd601b0663e28fa97ffb0564e105
Parent:     442258e2ff69276ff767f3703b30ce6a31fdd181
Author:     Nicolas Ferre <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 13 15:52:58 2007 -0800
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Mon Dec 17 10:47:15 2007 -0800

    USB: at91_udc: correct hanging while disconnecting usb cable
    Correct hanging while disconnecting the USB device cable.  Prevent a race
    between vbus and UDP interrupts.  This bug was tracked on at91sam9260ek
    A usb resume interrupt was firing after the vbus interrupt : the IP was
    then already stoped and not able to deal with it (no more clock).  A simple
    interrupt disabling is ok as the "end of bus reset" irq is non maskable and
    ok to resume the USB device IP.
    Signed-off-by: Nicolas Ferre <[EMAIL PROTECTED]>
    Acked-by: David Brownell <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
 drivers/usb/gadget/at91_udc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index a6adf7e..cd62b02 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -887,6 +887,7 @@ static void pullup(struct at91_udc *udc, int is_on)
        if (is_on) {
+               at91_udp_write(udc, AT91_UDP_ICR, AT91_UDP_RXRSM);
                at91_udp_write(udc, AT91_UDP_TXVC, 0);
                if (cpu_is_at91rm9200())
                        at91_set_gpio_value(udc->board.pullup_pin, 1);
@@ -904,6 +905,7 @@ static void pullup(struct at91_udc *udc, int is_on)
        } else {
+               at91_udp_write(udc, AT91_UDP_IDR, AT91_UDP_RXRSM);
                at91_udp_write(udc, AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS);
                if (cpu_is_at91rm9200())
                        at91_set_gpio_value(udc->board.pullup_pin, 0);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to