From patchwork Wed Apr 3 14:46:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 785730 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C80B148844; Wed, 3 Apr 2024 14:47:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712155657; cv=none; b=C3NiWHt4TVcd1wnYynTNtUbF9T/r2Fzv+zCcG1xFBOy3WQLEV+lq5pHhjF0aGqgl69ecGQ76tnzfrguBMbhFK/NmK4pq0RJGAKx2iz2zSDu4xvB5xMFwKq8JiH3HXGx+VNKt0LODUu9OkgOJ+4QYT4oSjF0XvzpDmXL4lvLZAy8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712155657; c=relaxed/simple; bh=S9rwJ5DHZRi91bSNfJSQU+68qy20MCGdSgbhClo+h0U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RZNqoNj7nXlGtzzBSpU9xCGg+JQj/O3wL9dVP8qPX5cjZK8jvVwl/6WCKZQJ9B90i8h5CHlucgdZa0ZdYK/Fx5PauqRAujBgiHZG76S4k6PL0M3FW3j2+GV0h6aXM8UyB0FFaj3fnmU6MVNoNbBB4/fuJ15F8Iy/ewllGP7Qu78= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Y2uk5nOo; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Y2uk5nOo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712155654; x=1743691654; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=S9rwJ5DHZRi91bSNfJSQU+68qy20MCGdSgbhClo+h0U=; b=Y2uk5nOomGBUThPtTVrZR0SXM9Aodplo+iVZj0XZpoPJdG2e3mYuXtO/ ElY0lGCB15caeJOre6EvHblVmhyRerV7saypWNcoKtor4vV9565w/LG35 bQyptoHdsmPk8WzdtTBQ9rgSRN/AabkT+JE+eqA5oiWL/TslIw+x031G8 lXG1HWQpbWdy1iudUAqyKOTVxWaEA2DqQiPBZ9u7fSxyYEwXfHOd863VQ 3CO1ukmEPyQUlqOnvx69MIeEF8I886eLoQDvEpOAj5yuLTDVQXQu+8qej sxKmgd5CXs7vh/vAqdSIG07QNRL/2GMr41C+xesd2ya9TVoSqjplshMbh Q==; X-CSE-ConnectionGUID: bM0E4HkiSEmmEcDMxOQizQ== X-CSE-MsgGUID: N3atT5wjRX+q/5Jl7fJE2w== X-IronPort-AV: E=McAfee;i="6600,9927,11033"; a="17963785" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="17963785" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 07:47:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11033"; a="937085163" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="937085163" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 03 Apr 2024 07:47:29 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id E37E33E5; Wed, 3 Apr 2024 17:47:28 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Jiri Slaby , Orson Zhai , Baolin Wang , Chunyan Zhang , Andy Shevchenko Subject: [PATCH v1 1/3] serial: core: Don't count XON/XOFF in the statistics Date: Wed, 3 Apr 2024 17:46:15 +0300 Message-ID: <20240403144722.860258-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240403144722.860258-1-andriy.shevchenko@linux.intel.com> References: <20240403144722.860258-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Don't count XON/XOFF in the statistics in __uart_port_tx(). It will make it in align with other serial drivers. With this change we may use uart_xmit_advance() API instead of open coded analogue. Signed-off-by: Andy Shevchenko --- include/linux/serial_core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 0a0f6e21d40e..9579d70a367e 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -767,7 +767,7 @@ enum UART_TX_FLAGS { struct circ_buf *xmit = &__port->state->xmit; \ unsigned int pending; \ \ - for (; (for_test) && (tx_ready); (for_post), __port->icount.tx++) { \ + for (; (for_test) && (tx_ready); (for_post)) { \ if (__port->x_char) { \ (ch) = __port->x_char; \ (put_char); \ @@ -780,7 +780,7 @@ enum UART_TX_FLAGS { \ (ch) = xmit->buf[xmit->tail]; \ (put_char); \ - xmit->tail = (xmit->tail + 1) % UART_XMIT_SIZE; \ + uart_xmit_advance(__port, 1); \ } \ \ (tx_done); \ From patchwork Wed Apr 3 14:46:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 785731 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3C0B2F28; Wed, 3 Apr 2024 14:47:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712155655; cv=none; b=Sr82TxQvlPSZ1B1BoFp1Dbw6ZYie2vhbc+bCgXmVid/gkBUtSfynJ7wDQg180VjcVy91jhVZdzAd0juxXfiXsI7+wq93KEN8uPd6gvcr0HoSWR+l2Q+yNnGIZFhkRfsLR3+Ua5N+D3BSdyDz4FygLPd1m/Gf/QdXUnRg4D0K1pI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712155655; c=relaxed/simple; bh=gTksTsumFlenpsCVho1lUNgk04tJb4nLbosDVRyHfbM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bdOfseoT2uJmZF0ttXK9ZPDM7FFKyJzhhaMnW/ryz32QiA850ytY8x70my6mZSrXn3OogMmI7Ep6SUbqIJP5Q2GmxJasDJz63bkYxyHcN+OJkfjpeAp2prt/xP2xar/Pm6RJ9AfLdScmI/3O0oFE1hAZmdCA1CCy02gWfz/e65g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=e/kqoURk; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="e/kqoURk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712155652; x=1743691652; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gTksTsumFlenpsCVho1lUNgk04tJb4nLbosDVRyHfbM=; b=e/kqoURkQDZaCkvSUZFsTnRjc2RWK18iXjnGAUk1bO864PFMHJkXN5hJ PRELhXxw3SJy8BoOrIe7i5TH4djVrDMsN3b8GvsPk4OagLkWazR5ZXcvz 2nLDIt3CSYOqjjuRMItiqOUFmDd2KEE5YtSS7LdM9jHAScCc7Z70Lsfb1 1VVTQm+NAvUYmzzzlfVNS+fnGsid8t6y+xouY3W8wqR56HWY0+7oh3UY/ sntNB7V4Epf4FVDjvnCVFdVeHEDwCAMFfd+WS9eewS+6vaOdCqIBNtM+a dsicXyjNUgrqhfA3REvMbQ1EuF+T+7baw5X0PANoFh7meLxPhdov1JGkf w==; X-CSE-ConnectionGUID: 9JoAN9/tQFimWRZcF9KhQg== X-CSE-MsgGUID: MSKqmDOQRA+uyTdMuZGpEA== X-IronPort-AV: E=McAfee;i="6600,9927,11033"; a="17963772" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="17963772" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 07:47:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11033"; a="937085161" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="937085161" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 03 Apr 2024 07:47:29 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 06199812; Wed, 3 Apr 2024 17:47:28 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Jiri Slaby , Orson Zhai , Baolin Wang , Chunyan Zhang , Andy Shevchenko Subject: [PATCH v1 3/3] serial: sprd: Don't count XON/XOFF in the statistics Date: Wed, 3 Apr 2024 17:46:17 +0300 Message-ID: <20240403144722.860258-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240403144722.860258-1-andriy.shevchenko@linux.intel.com> References: <20240403144722.860258-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Don't count XON/XOFF in the statistics in sprd_start_tx_dma(). It will make it in align with other serial drivers. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/sprd_serial.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c index 15f14fa593da..3554b9e7678f 100644 --- a/drivers/tty/serial/sprd_serial.c +++ b/drivers/tty/serial/sprd_serial.c @@ -323,7 +323,6 @@ static void sprd_start_tx_dma(struct uart_port *port) if (port->x_char) { serial_out(port, SPRD_TXD, port->x_char); - port->icount.tx++; port->x_char = 0; return; }