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 1380EC43334 for ; Wed, 8 Jun 2022 10:10:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236366AbiFHKKb (ORCPT ); Wed, 8 Jun 2022 06:10:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235957AbiFHKJn (ORCPT ); Wed, 8 Jun 2022 06:09:43 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 540DF1D30D1 for ; Wed, 8 Jun 2022 02:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654682096; x=1686218096; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=HaN30WmjFXq77C7E5SYx2o/YQmDl/1sd14eIJVTbEGw=; b=e0JjFl6RqivjDNVUaUbBuguiKUxWpRpuXm2OqC27TZ0WtIL9Mv6F1dAA fpL1mw7aySSGQdG4N9oOwuuTTFhVS4Ur6vhIGScjv09pM52EiSJ1+FsA4 dp02oJLcCaBLG3oxqdmJCRan5orsY9bW041+BKvEaDL3bRnaX9Qnzn8Io g/3lnvaD8OQnqgnM50kHoy7hEKXTO74N5+m3rEkW/UPUPRGK5fB9baxAX 4L0cM2CeyTtmCtH0pw6fJyzxU6eMFG+/BMD5WZr9KO1dVGH6FA0gS4dX9 oPchldXcVixRFYw/EhqRj8bqiggNvqrT4kEMAWY0MAuTSUGCh3DSx6o2s A==; X-IronPort-AV: E=McAfee;i="6400,9594,10371"; a="278019503" X-IronPort-AV: E=Sophos;i="5.91,286,1647327600"; d="scan'208";a="278019503" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 02:54:42 -0700 X-IronPort-AV: E=Sophos;i="5.91,286,1647327600"; d="scan'208";a="584783415" Received: from bmichals-mobl.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.57.131]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 02:54:39 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Andy Shevchenko , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH v4 0/6] LSR flag preservation improvements Date: Wed, 8 Jun 2022 12:54:25 +0300 Message-Id: <20220608095431.18376-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Improve LSR flag preservation. Not all devices preserve all LSR flags on read. Therefore, the non-permanent flags must be stored until consumed. 8250_port has handled this for some of the reads (but not all). Drivers not so much but it's unclear to me which of the devices actually clear flags on read so this series only does per driver fixes for DW. I've just put Uwe as Co-dev-by and SoB according to Andy's suggestion in order to allow forward progress (Uwe indicated he's OK with any sensible combination of tags anyway). I agree with Uwe's position though that it would be nice to be able to record Acked-by in some (probably quite rare) cases even if the person is already SoB but I don't want to keep dragging this issue on and on over a single line patch :-). v2: - Added more patches v3: - Fix Uwe's email and convert it to Co-developed-by v4: - Tweak comments - Fix URL link to earlier discussion & improve changelog Ilpo Järvinen (6): serial: 8250: Store to lsr_save_flags after lsr read serial: 8250: Create serial_lsr_in() serial: 8250: Get preserved flags using serial_lsr_in() serial: 8250: Adjust misleading LSR related comment serial: 8250_dw: Use serial_lsr_in() in dw8250_handle_irq() serial: 8250_dw: Store LSR into lsr_saved_flags in dw8250_tx_wait_empty() drivers/tty/serial/8250/8250.h | 20 ++++++++++++++++++++ drivers/tty/serial/8250/8250_core.c | 3 +-- drivers/tty/serial/8250/8250_dw.c | 7 +++++-- drivers/tty/serial/8250/8250_port.c | 23 ++++++++++------------- 4 files changed, 36 insertions(+), 17 deletions(-) -- 2.30.2