All of lore.kernel.org
 help / color / mirror / Atom feed
* Question regarding kernel?
@ 2019-11-15  7:40 Strahinja Mitrovic
  2019-11-16  9:35 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Strahinja Mitrovic @ 2019-11-15  7:40 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 616 bytes --]

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?

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?

Does a system refresh counter on daily basis automatically?

Is there a way to reset a counter so that starts again from 0?
Best Regards,
Strahinja Mitrovic

[-- Attachment #1.2: Type: text/html, Size: 3670 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* Re: Question regarding kernel?
  2019-11-15  7:40 Question regarding kernel? Strahinja Mitrovic
@ 2019-11-16  9:35 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2019-11-16  9:35 UTC (permalink / raw)
  To: Strahinja Mitrovic; +Cc: kernelnewbies

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@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

end of thread, other threads:[~2019-11-16  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15  7:40 Question regarding kernel? Strahinja Mitrovic
2019-11-16  9:35 ` Greg KH

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.