archive mirror
 help / color / mirror / Atom feed
* Chipidea USB device goes infinite loop due to interrupt while hw_ep_prime
@ 2021-08-02  8:38 Jeaho Hwang
  0 siblings, 0 replies; 8+ messages in thread
From: Jeaho Hwang @ 2021-08-02  8:38 UTC (permalink / raw)
  To: peter.chen, linux-usb
  Cc: Linux team,
	변무광(Byeon Moo


We found an infinite loop inside the function hw_ep_set_halt
(drivers/usb/chipidea/udc.c) if a cablle is repeatedly
connnected/disconnected while ping through RNDIS with chipidea USB

Using ftrace tracing, we found that hw_ep_set_halt is called due to
error return of hw_ep_prime(drivers/usb/chipidea/udc.c:202) which is
called from isr_tr_complete_handler -> isr_setup_status_phase ->

The comment of function hw_ep_prime says (execute without
interruption) but timer interrupt is occurred while hw_ep_prime is
executing. We believe that the interrupt causes an error return of
hw_ep_prime. We tried to protect hw_ep_prime from irqs and then no
case of the infinite loop is occurred.

I want ask if it is appropriate way that turning off irq inside
(threaded) irq handlers. And should we explicitly turn off irqs before
calling hw_ep_prime?


황재호, Jay Hwang, linux team manager of RTst

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <>]

end of thread, other threads:[~2021-08-09  6:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02  8:38 Chipidea USB device goes infinite loop due to interrupt while hw_ep_prime Jeaho Hwang
     [not found] <>
2021-08-04  1:32 ` Peter Chen
2021-08-04  2:03   ` Jeaho Hwang
2021-08-09  1:27     ` Peter Chen
2021-08-09  1:45       ` Jeaho Hwang
2021-08-09  6:31         ` Peter Chen
2021-08-04  3:11   ` Jeaho Hwang
2021-08-09  1:40     ` Peter Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).