Re: [PATCH] serial: 8250_exar: Clear buffer before shutdown

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

 



On Fri, Jul 26, 2019 at 12:02:06PM -0400, Robert Middleton wrote:
> > What if the hardware is locked up?  Will this sit and spin forever?
> 
> I assume so; what is the correct way to do this?  The
> manufacturer-provided drivers do something similar but with a counter
> that will count up to 1000 before exiting the loop so as to not lock
> up.

1000 sounds good to me :)

> > Shouldn't you also have a timeout for the flush?
> 
> Flush from the system?  The problem that I have been seeing is that
> when you do something like "echo text > /dev/ttyS1", only the first
> character will be printed out.  This (should) be waiting for that to
> happen, since it checks the hardware to ensure that the hardware
> buffers are clear and that there are no more characters waiting to be
> written to the hardware buffer.
> 
> I'm also not sure if the above means that there is a problem with the
> serial_8250 driver in general, as I don't have another piece of
> hardware available that uses that driver.

If you time out after 1000 iterations of the loop, that should solve my
worries here, please fix it up that way and I'll be glad to take the
change.

thanks,

greg k-h



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux