kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Strahinja Mitrovic <smitrovic.work@gmail.com>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: Question regarding kernel?
Date: Sat, 16 Nov 2019 10:35:31 +0100	[thread overview]
Message-ID: <20191116093531.GA408484@kroah.com> (raw)
In-Reply-To: <CACKXqjy=xAjTgNbKOPru7SHX9dfGinJz-pLYie0S+vHtWxj9Sg@mail.gmail.com>

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

      reply	other threads:[~2019-11-16  9:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15  7:40 Question regarding kernel? Strahinja Mitrovic
2019-11-16  9:35 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191116093531.GA408484@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=smitrovic.work@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).