On Fri, Nov 15, 2019 at 08:40:41AM +0100, Strahinja Mitrovic wrote: > Hi, > I'm a new subscriber, and i have a question regarding the uart driver and > kernel. > How does uart driver reset the counter of input serial line interrupts? It does not. > I'm currently using ioct with TIOCGICOUNT on linux for retrieving counts of > input serial line interrupts. > > The counts are written to the serial_icounter_struct. > > Most data fields are 32-bit integers. > > What happens if a number of counts for a certain input line is greater then > 32-bit integer value? Then it will roll-over. > Does a system refresh counter on daily basis automatically? I do not understand the question. These values are tracked by the individual tty/serial driver for the chip being referenced. When userspace asks for the values, they are sent. You have to ask the driver for them in order to be able to see them, but they are kept up to date internally to the kernel while the port is active. > Is there a way to reset a counter so that starts again from 0? Why would you want to reset one of these values? They are to be read, not modified. What are you doing with them in userspace to have any of them actually cause you to do something different based on them? thanks, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies