All of lore.kernel.org
 help / color / mirror / Atom feed
* acm_port_shutdown hangs for 30 seconds
@ 2022-03-12 13:58 Jookia
  2022-06-27 12:57 ` Greg KH
  2022-06-29 12:01 ` Oliver Neukum
  0 siblings, 2 replies; 7+ messages in thread
From: Jookia @ 2022-03-12 13:58 UTC (permalink / raw)
  To: linux-usb

Hello there,

I've been banging my head against this issue over the years but sat down
and started to debug it today.

When I try to quit GNU screen, minicom or another serial program it
sometimes hangs for around 30 seconds.

To reproduce I do this:

1. Connect an Arduino Micro with stock LED blink firmware
2. Run 'screen /dev/ttyACM1 9600'
3. Type some letters (no response from the board is given)
4. Quit in some way

If I skip step 3 (typing letters), the hang does not happen.

In userspace the hang happens at a call to close() on the TTY, and using
perf and ftrace it looks to be spending a lot of time poisoning urbs in
acm_port_shutdown.
This kind of makes sense to me as there is some in flight data to be
sent and there's no acknowledgement coming from the chip.

I've had this issue with embedded Linux boards too that for some reason
or another have stopped functioning.
The current solution I have is to forcefully unplug the board, but
that's not ideal.

My questions are:

- Is this a bug?
- Can I reduce the timeout somehow?

Thanks for your time,
Jookia.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-30 12:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-12 13:58 acm_port_shutdown hangs for 30 seconds Jookia
2022-06-27 12:57 ` Greg KH
2022-06-28  9:21   ` Jookia
2022-06-29  8:37     ` Greg KH
2022-06-29 10:20       ` Jookia
2022-06-29 12:01 ` Oliver Neukum
2022-06-30 12:31   ` Jookia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.