tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Closing a serial device takes one second

Am 06.02.14 20:16, schrieb Matthias Drochner:
> On Thu, 6 Feb 2014 19:50:04 +0100
> Marc Balmer <> wrote:
>> If I find the spot, I will probably remove it.
> It is line 784 in dev/ic/com.c. It depends on the HUPCL
> flag unset which is done around line 1344, depending
> The comment in com_shutdown() makes some sense, but
> it could be done more elegantly, eg set a timer and
> do the delay on next open if it is done immediately.

I found similar code in usb/ucom.c.  It makes no sense to hardcode a 1
sec delay in the driver.  If you open/close a device frequently, it
totally slows down your application.

If, at all, the application using the driver should sleep for one second
after closing the device before reopening it.

That said, I think we should remove this delay. (other ports, e.g.
sparc64, don't have such delays in their serial drivers, btw).

Home | Main Index | Thread Index | Old Index