From patchwork Thu Sep 1 14:39:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 602723 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67EBFECAAD1 for ; Thu, 1 Sep 2022 14:39:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232082AbiIAOjs (ORCPT ); Thu, 1 Sep 2022 10:39:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232641AbiIAOjr (ORCPT ); Thu, 1 Sep 2022 10:39:47 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8411B50; Thu, 1 Sep 2022 07:39:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662043184; x=1693579184; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=neOt7Y5kaJ06TGwl5lHvIazrPvdcugvQz5cQxNTdQG4=; b=ccGlxTo2SmjdG+ZNZkMPz+68s5Nm4DIJO+Piwke0/SH3GpeIzBFHVzA4 a1arsXXNxPtsIFcbOHF8p7XRX5AcXToXUpZrRiLVw5aCh2rsvyI4T4UJM rbEkmd/bz+yK9bZYqMazHz39EIejKuqIDjhbz1kNptGm4Zqu9fDxSyVCN 76FOc9iomQlvWmjdBtsZJn/rIt43a3K0biPBxT7PZDYOGlyjH0tOCq5wd 521zofBtY0XavsWbrIJCqDxZOWfkX6Tz8a97DVPxIZnf7Be3r6JNlVPYS SkCQ9fpl2KbiU8Uc56Nzq4uDmp5Rt1IeGoX34CY5MdaK5ukooDHmsKpVT Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10457"; a="321880086" X-IronPort-AV: E=Sophos;i="5.93,281,1654585200"; d="scan'208";a="321880086" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2022 07:39:44 -0700 X-IronPort-AV: E=Sophos;i="5.93,281,1654585200"; d="scan'208";a="642356626" Received: from rmalliu-mobl.amr.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.249.44.65]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2022 07:39:41 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, Andy Shevchenko Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v2 RESEND 0/3] serial: Add uart_xmit_advance() + fixes part (of a larger patch series) Date: Thu, 1 Sep 2022 17:39:31 +0300 Message-Id: <20220901143934.8850-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Add uart_xmit_advance() helper to handle circular xmit buffer advancement + accounting of Tx'ed bytes. Use it to fix a few drivers that previously lacked to accounting for DMA Tx. v2: - Correct tags Ilpo Järvinen (3): serial: Create uart_xmit_advance() serial: tegra: Use uart_xmit_advance(), fixes icount.tx accounting serial: tegra-tcu: Use uart_xmit_advance(), fixes icount.tx accounting drivers/tty/serial/serial-tegra.c | 5 ++--- drivers/tty/serial/tegra-tcu.c | 2 +- include/linux/serial_core.h | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-)