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=-11.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 305AAC43613 for ; Fri, 21 Jun 2019 09:15:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0A57421530 for ; Fri, 21 Jun 2019 09:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561108516; bh=yNc+7w1/5A1rYpibCq5H1szXHP/ogGaFNZ9V8nw1IUY=; h=Subject:To:From:Date:List-ID:From; b=JqHjx4gQq1y6Cc5TlrmQRA1oN6mmca177IW5+FZiOyDcSgXfpsE+1jQKAQyp1tp45 UD8ZfGT/z47pJI10Q6B7dmoWEIvgvOnQ6codnGmUPjHeuIiDsFwt3zQv4yNcURI8Mf +dNX2yzdv2K5CdAoGNyxM0Tv7Fxf85mpvxwy+8UM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726250AbfFUJPP (ORCPT ); Fri, 21 Jun 2019 05:15:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:47912 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726232AbfFUJPP (ORCPT ); Fri, 21 Jun 2019 05:15:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0956D21530; Fri, 21 Jun 2019 09:15:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561108514; bh=yNc+7w1/5A1rYpibCq5H1szXHP/ogGaFNZ9V8nw1IUY=; h=Subject:To:From:Date:From; b=VzPFEUkG2xcneiLf7kKBHYdIXRLi2DJSmWJd2SeMh959N4IWObhS8zqm7RQ/Enl4y Zjgpag6ItHgb/9B46iuWGSdYS9oecMbIhf/mSNo12RWwVRoBeq18I+g896F/XNyB+Y FiqHL8ovPdlAnWT54q5LvAAWk5rFeNiGyeUlyDDQ= Subject: patch "Revert "serial: 8250: Don't service RX FIFO if interrupts are" added to tty-testing To: o.barta89@gmail.com, andriy.shevchenko@linux.intel.com, gregkh@linuxfoundation.org, stable@vger.kernel.org From: Date: Fri, 21 Jun 2019 11:15:12 +0200 Message-ID: <156110851224136@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This is a note to let you know that I've just added the patch titled Revert "serial: 8250: Don't service RX FIFO if interrupts are to my tty git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git in the tty-testing branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will be merged to the tty-next branch sometime soon, after it passes testing, and the merge window is open. If you have any questions about this process, please let me know. From 3f2640ed7be838c3f05c0d2b0f7c7508e7431e48 Mon Sep 17 00:00:00 2001 From: Oliver Barta Date: Wed, 19 Jun 2019 10:16:39 +0200 Subject: Revert "serial: 8250: Don't service RX FIFO if interrupts are disabled" This reverts commit 2e9fe539108320820016f78ca7704a7342788380. Reading LSR unconditionally but processing the error flags only if UART_IIR_RDI bit was set before in IIR may lead to a loss of transmission error information on UARTs where the transmission error flags are cleared by a read of LSR. Information are lost in case an error is detected right before the read of LSR while processing e.g. an UART_IIR_THRI interrupt. Signed-off-by: Oliver Barta Reviewed-by: Andy Shevchenko Fixes: 2e9fe5391083 ("serial: 8250: Don't service RX FIFO if interrupts are disabled") Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/8250/8250_port.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index a6fabc7e3b13..c1cec808571b 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -1867,8 +1867,7 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) status = serial_port_in(port, UART_LSR); - if (status & (UART_LSR_DR | UART_LSR_BI) && - iir & UART_IIR_RDI) { + if (status & (UART_LSR_DR | UART_LSR_BI)) { if (!up->dma || handle_rx_dma(up, iir)) status = serial8250_rx_chars(up, status); } -- 2.22.0