Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13476717ybl; Sun, 29 Dec 2019 12:50:22 -0800 (PST) X-Google-Smtp-Source: APXvYqy3lWmck/gJBxAVZ5CmbXN2pM3Tbo9A+GW4oAL4dzfWzacPWXXnZyizey0jhSnVqDOji+tr X-Received: by 2002:a9d:8cb:: with SMTP id 69mr53574173otf.221.1577652622343; Sun, 29 Dec 2019 12:50:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652622; cv=none; d=google.com; s=arc-20160816; b=G4+47gADPMSaLSeOfLvFBA75rN70vX4IKPnRUBk8kMjxRVWNy6f3r4e+JrqO8ReuXc b9Sh3XjZLFIQzdwiXCRt2VldhxUceOJ0T6wv1BxwmETJkXaeTCuxMpvmn4yKTpCI2zeU P4EFnoiB9LUStilkHYVr+CKyHTkEYU/GJvW8R4OnS8KVzZUH/hkevYI1CZWYBSwD8nz5 LCTYW7SLDHxbEt0DNuMGx++UVg01tpxxNsLM+hcGnrSJofzdWdPX8NzBjUgSFhX99y1Y eGcfxcCqDoKNZWsGP2FVxbyECysfQmLQI5/khBA/XdFPMeAAcqm+BJQySZyXxtfzZQ9H u3Sw== 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=sPt+9hwsXVERLakM/CvdRNS/Zq28ICdTwAXj0uLdwLM=; b=VXoDdK/Fq8Ywzp6b8Z4iplROP6V0jXqNMgJQ+4MWpr60XbzPXZR9WdN9Q+Qn42EYks zVkeLEmEbHb9ceIAvr7hBKyzTIqtIS/499eG3HnpNWQfWc03qYq3W5PtdwbuSXZFKuyz kSHuqiGKhuLxUXeoDRVFSnw2hBoZvwXxjMMhLv8qlDUBLU4faXtPSxdjtEVc0HY2jmGI /D1BFkIJ5Ojt1qavYu0a7HcdjjXdTjtCQzikXCzXJsJJUHypewQT+LQ8LaM25wSKIlhS A870qJhDnUT41E9//h3XiuOUj7yflyeyN4fdicoQC9aXQrcn8vX4jChv681hgByKtBzB P8sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="HOUE/8mK"; 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 77si20254259oie.10.2019.12.29.12.50.10; Sun, 29 Dec 2019 12:50:22 -0800 (PST) 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="HOUE/8mK"; 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 S1733290AbfL2R5i (ORCPT + 99 others); Sun, 29 Dec 2019 12:57:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:48250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733276AbfL2R5e (ORCPT ); Sun, 29 Dec 2019 12:57:34 -0500 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 A786F222C3; Sun, 29 Dec 2019 17:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642254; bh=eoYpF+gRt/ew8hg1pPdt98QdDGY0mMZbkOyBmpex5Cw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HOUE/8mKuKBVKxwcZLJXAS9WiHEZgL4aAhjsQWwp+EZdrn5MNQ3lwRRzJu8rhlV2E +b0bAZj56isUI+Whj3Lf2zk1ZUsTfIGGkRXr8dOflZ3qd6Cl+lchpUDkOHWESKMQ73 a+n9bnJHIsICbZjk+dds/TJNPkemUgCaqTs4UKu4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yonghan Ye , Baolin Wang Subject: [PATCH 5.4 405/434] serial: sprd: Add clearing break interrupt operation Date: Sun, 29 Dec 2019 18:27:38 +0100 Message-Id: <20191229172729.542673151@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@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: Yonghan Ye commit abeb2e9414d7e3a0d8417bc3b13d7172513ea8a0 upstream. A break interrupt will be generated if the RX line was pulled low, which means some abnomal behaviors occurred of the UART. In this case, we still need to clear this break interrupt status, otherwise it will cause irq storm to crash the whole system. Fixes: b7396a38fb28 ("tty/serial: Add Spreadtrum sc9836-uart driver support") Signed-off-by: Yonghan Ye Cc: stable Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/925e51b73099c90158e080b8f5bed9b3b38c4548.1575460601.git.baolin.wang7@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/sprd_serial.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/tty/serial/sprd_serial.c +++ b/drivers/tty/serial/sprd_serial.c @@ -679,6 +679,9 @@ static irqreturn_t sprd_handle_irq(int i if (ims & SPRD_IMSR_TIMEOUT) serial_out(port, SPRD_ICLR, SPRD_ICLR_TIMEOUT); + if (ims & SPRD_IMSR_BREAK_DETECT) + serial_out(port, SPRD_ICLR, SPRD_IMSR_BREAK_DETECT); + if (ims & (SPRD_IMSR_RX_FIFO_FULL | SPRD_IMSR_BREAK_DETECT | SPRD_IMSR_TIMEOUT)) sprd_rx(port);