Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp834404ybi; Fri, 12 Jul 2019 05:25:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvTCKNau5Z99qXvZ+7pkYolR81VQYWgYLMNVa4GBkSWvoAuymzmNVxR2GZqQmFNXHJeNNY X-Received: by 2002:a17:90a:25c8:: with SMTP id k66mr11506397pje.129.1562934352046; Fri, 12 Jul 2019 05:25:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562934352; cv=none; d=google.com; s=arc-20160816; b=0umGF9AasBaXMr8AMa5MVER3gNAJ2I0A3UnsztLgvvHZg3EajJ3n+gvxS5XMepQ7Rk YRgXS1XpMfSPcxx+R2CfJYIeoisTetj0+Ap69j2TxguntYmBPLqyuSPfL6WnvygPsBcu N1sMo5zsI6+C8KOAynaVJ3MyHNsA3Yu5UOB/0BVeh248lvV8FYY2Lb6ImyM2A7W3bbgo MSBJAa2Xj7Jze9JT3sG+viVXiC00HlNRWAxQceJPwliIyrj+0h6Th6lWahvq4mxeMoeX 8+zapudGXnkXyeacPa/K7TjC8AUHe2PBaDK/pHcPIXCujAoKSTwQbWqgfNFkU9gOkAIG 1Omw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1o44mD8YhPZfw3m8uJdNUbwp8s5mNw5sYw4eOU8OcUk=; b=mMP0dGs/RUT0xafR1fraItBO7VA+dkGqhOefTjYN+uDL1ZlP76WmstaUqpQmnKzDTJ vYdvn0c9EQjKD7tdEUTAYs+0CKdGgT9GIVb6bPnPqrIoGkAJXYT0CswASxMUv/pH5ARz DAhjHKuhN9v9lbGXaLFJee2qGqSJIqw4HXfXf+VFPPb6pQMZCeks/ifXbQxFhSPRcpd7 zbd5mFeDBGv9VJ0aFSqUhgOu2eDLkUiK3DnrcH0TOboWLl/17z6rvMMPhkaq3isk+4Ai zFJvlahoykSdbM4/grNCm1MjF7s1tMjNwDHmrUA+8Cq226sCMmEm9bb+E/Ewd+rVLDWQ 21PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="0vxn/Gch"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10si7632087plg.71.2019.07.12.05.25.36; Fri, 12 Jul 2019 05:25:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="0vxn/Gch"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727952AbfGLMXc (ORCPT + 99 others); Fri, 12 Jul 2019 08:23:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:59134 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727947AbfGLMXa (ORCPT ); Fri, 12 Jul 2019 08:23:30 -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 A4361208E4; Fri, 12 Jul 2019 12:23:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934209; bh=nkZ6Tz3khAsmsQ82x8OX7tgmPnhebC4vG3Vhlk1ApSY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0vxn/GchkZ4OYdhfDFgOx5Q2QehyE18dvOeoYsrtoOtU/sOaojLxFITLJrAo1Jr9w cgAuIHAPVaCxvYgur7qY79W/vjpREtkR9FfUbkyDGpCH1TGdwcamyl46kKLtIgbbDc PEenImo8omkYsyoJvUd8aOXy3d4xexpw0+FDkaIc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oliver Barta , Andy Shevchenko Subject: [PATCH 4.19 71/91] Revert "serial: 8250: Dont service RX FIFO if interrupts are disabled" Date: Fri, 12 Jul 2019 14:19:14 +0200 Message-Id: <20190712121625.646079100@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121621.422224300@linuxfoundation.org> References: <20190712121621.422224300@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oliver Barta commit 3f2640ed7be838c3f05c0d2b0f7c7508e7431e48 upstream. 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(-) --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -1869,8 +1869,7 @@ int serial8250_handle_irq(struct uart_po 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); }