Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp848773ybi; Fri, 12 Jul 2019 05:39:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVPA6r5lmsM1/6iou/x2Mtv8uO/GJ/ljh/SWoKBUmLSdPHDKIDrvgaghgkNb4m36iAbjd8 X-Received: by 2002:a63:2bd2:: with SMTP id r201mr10464820pgr.193.1562935197986; Fri, 12 Jul 2019 05:39:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562935197; cv=none; d=google.com; s=arc-20160816; b=AR+nueJGZH8shX8wy3w10dXtIqmmNL3Gqj9NScFRUB9YRy+AI75TJNQCyzCc0cofY0 DG6txm8Sr4LGkWnWTFD1UAZOP4j/iIb4cziWRGfmarxgCQMm/FUq/1IqFNEeAPUmlZ1Y oT4u+20KOZI+2tLX6u6dlAXgXOeMjAJ4/SExuDU93lCTpSw1ZnZ4wggZu8iRYuoozZau bYgkAq6NctqOYvWb2tonSUC/QVXGXD6AWIcrrtWZ5OA3skBxfPDQwHQMzzWTtr425ABq cOlaNwXl7fa3Iv7dIa1Xo/BY5wqYBDVj/I/YI4wePhz+gKyj3W7YnO1Wp8slote1lFZe x4eQ== 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=JRQFigeP+dQEU3KyZ2psq8Rnhkj7G0XvTRIjmWOYUBO+YyZMLlkElTFujud5WD4olH DvK5pOrIHdYFUD08iO3pl5/ZtAyuz3gwjeF7KHf+yvBZ1Bei33WH2htc6/T13LUt+PY+ iLuFZQ/82JvbJJI4Qldf68ljsZI19BoeymXl64udne7uL+jAAEPRixzElIPQQEkd1Q7/ 97+xNSER/dB0qtf6pZzA+2yhB8lrnO1mYcDAsXLQmY2n6BpztNjMaiGFFapz/V+qtodG JhDeCcsaVwX30YXm29HEjKOyLNT6sOc3e9OlOfeetsQRIyTF7bBdC9Xo3aszobezGKET B0Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bXGuPqGo; 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 g11si7974029plm.390.2019.07.12.05.39.42; Fri, 12 Jul 2019 05:39:57 -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=bXGuPqGo; 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 S1729311AbfGLMbI (ORCPT + 99 others); Fri, 12 Jul 2019 08:31:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:45610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729119AbfGLMaI (ORCPT ); Fri, 12 Jul 2019 08:30:08 -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 A4538208E4; Fri, 12 Jul 2019 12:30:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934608; bh=nkZ6Tz3khAsmsQ82x8OX7tgmPnhebC4vG3Vhlk1ApSY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bXGuPqGonQg3DEFhh+7fDppnA1UTKy6xvdDVyLjC+kTBEtlHOgpwPZXsWkM7DLo9Z dOUDhWC12upUN3oYIlpqKGaLyKDtsPDZCR1pvvGP8iIFPUzJp+pNMR0zrarh+tLUrU I/pK/UW/pTHRepEM7PAKKTLly/OTyHoQsTgVMOnM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oliver Barta , Andy Shevchenko Subject: [PATCH 5.1 110/138] Revert "serial: 8250: Dont service RX FIFO if interrupts are disabled" Date: Fri, 12 Jul 2019 14:19:34 +0200 Message-Id: <20190712121632.977789469@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121628.731888964@linuxfoundation.org> References: <20190712121628.731888964@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); }