From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CB91C432C3 for ; Sat, 16 Nov 2019 09:36:16 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7A8220723 for ; Sat, 16 Nov 2019 09:36:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="jAkKLIag"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="wm9sTf16" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7A8220723 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.3) (envelope-from ) id 1iVuUW-0000SY-E2; Sat, 16 Nov 2019 04:35:40 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1iVuUT-0000SC-DU for kernelnewbies@kernelnewbies.org; Sat, 16 Nov 2019 04:35:37 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 3BCB221C7A; Sat, 16 Nov 2019 04:35:34 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sat, 16 Nov 2019 04:35:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=baMJOjMu+UYOleRP0E/ZLu5R3tb mek+eDl/3hlgu2gg=; b=jAkKLIagqab2M06ONxmhaZ35uR3eCbq7p70t8K/YcIm dmUicjWFOi42XajFa6Nz9nvKmdXKVarU++AOIke/pQTPExKajYh10gUV87E+b4kB HQGobPHE3DUmJWHHyhRHaMoj9nf5n6rGaVVA9HKTWYnF0JQ+Si5g2qEMNRjoRUGI HwL9dUZrS1H2wI3y788pVOz8+PdPuSxxnIeQyazYrMwhXjfv1zoWqZtTTEfDmwE7 zchGb8OHLbb12j3/332YXFRv+I7AWwaoiICfD1XtKv9YsthxMaZqFhfMrki92Xj7 EuI6PnlEv8LSQY6iiyPfE/LVCYuwSKC7VGiz55E74Xg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=baMJOj Mu+UYOleRP0E/ZLu5R3tbmek+eDl/3hlgu2gg=; b=wm9sTf16vpHJG/dlE7X+R8 GW6sX+A3zeE62Csi863Z4SVaykh7OQ6dDJAw7pxdCrBHTFOeazpfg+YggH+BSrQL FajuLmwSEcDKoq+qhYP1P5S67AHJsFlar86cPjl8kfJ0vP4z9LM5GDfCLa029K7F 3OdPaocjIbqkJfO3+pBNgUMxvwZlLhKmqGNAFBmUhj/RftXOsDCxvzJQKswvmtPW 5ZQNqsOxN9wzyeS+O4/FAtrR7qX2DcRYy0SIbsnM/f5cJKjiYZqPaWIeSprLw5Nv ma7OC4jr1Ww7qN3I5eFSXg5lxTZIQ1MTVeZqp0Q5o7g3MXvaiSmzbuac128gBfVg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudefkedguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjfgesth dtredttdervdenucfhrhhomhepifhrvghgucfmjfcuoehgrhgvgheskhhrohgrhhdrtgho mheqnecukfhppeekfedrkeeirdekledruddtjeenucfrrghrrghmpehmrghilhhfrhhomh epghhrvghgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 782AF306005E; Sat, 16 Nov 2019 04:35:33 -0500 (EST) Date: Sat, 16 Nov 2019 10:35:31 +0100 From: Greg KH To: Strahinja Mitrovic Subject: Re: Question regarding kernel? Message-ID: <20191116093531.GA408484@kroah.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org 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