Received: by 2002:a05:6a10:144:0:0:0:0 with SMTP id 4csp660600pxw; Fri, 8 Apr 2022 18:30:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5/EcxtxVeM7Vr6rDoTnfeMVWvPIf8CjEsKWpM3ugHSkTc1CBKDR3mXuDs37dVqlpTjhfI X-Received: by 2002:a17:907:9812:b0:6da:aaaf:7713 with SMTP id ji18-20020a170907981200b006daaaaf7713mr20699845ejc.163.1649467825205; Fri, 08 Apr 2022 18:30:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649467825; cv=none; d=google.com; s=arc-20160816; b=zCTYclv8d3V+sHnZohj0WUcrMeeAdNT3Q+y3VsoAUiXlOtX1HR1Ar0Qp7I1nGHFvzJ 27A8gV/ucAkrMY1T0yIRhtbWOhM2NsqZj8CHyAraXGvcHmG6gcVg3m6RlzawkGaRl1hV e2W9j+nETsuhtsXmYhPH9iTcbU97TbRE/NebiUyt+IgLzJWDpJAMQVaWhSj2nPY03//v VWJtCGe4Kq0VMz0IcMOrayAqKzy2DDhgEmYtLI9MS0QqEUNs0zd3cc3F+c1hoBa4J5Cg XxJ21wmEHkSevi94jC144aKgVVcfsePYuetCbfjVvzNfZHZPh6xkwYQsOF9GzEtXLwlb TV3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=PE93BArNOfspKWatWSSijWYxkhAMOPY4ZFX7FNX7uHQ=; b=dYwWdQT4O/BboRIb40W24rMo+jRql7AQuHUo7k2q531KgrSwzZX8Yg2rfm84vFvIrF JMv7LQWrbwD9/cFdga/5pb5iTloIAXQ3+gt5eZF1kkCb7/29WAxRNnVdUJRPFI+yMAeC 20AlUl7aA+nZyUa74jcEcTre8IRvX+gLa48qa3ro9s9HHNAMYfK1dF8Emz4w0Twa5lrd 9c+cFufDdC8ujSgKHhuVyHlGwKLxhwNRolSG1HkK6ARZcFmwcW/0QbrU4VlL4mZ8aduW bqZgmnE5w6uvX7HykF2TFMf+wpTuwYmhqEiatRiXE62SLvndFXSMgqHacXYhvhAlW7sH yPqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=DVOU7uZJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e19-20020a17090724d300b006e7ee0a9f54si1903883ejn.377.2022.04.08.18.30.00; Fri, 08 Apr 2022 18:30:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=DVOU7uZJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237611AbiDHXiO (ORCPT + 99 others); Fri, 8 Apr 2022 19:38:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230403AbiDHXiN (ORCPT ); Fri, 8 Apr 2022 19:38:13 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E53CAC6B4E; Fri, 8 Apr 2022 16:36:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1649460959; bh=PE93BArNOfspKWatWSSijWYxkhAMOPY4ZFX7FNX7uHQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=DVOU7uZJ0aWbIf5Fdt57sirk94Etp+kJguemPm2oQJnkiKn/VHl2zI/F9zSXe9/jX w/WXaVwglLyCAaA6DqNdoGLqN5YQLP65MqT/C5W1zkM6KIrDRUAzHliNRpVewyjY+7 L2mZVKdts8qS8If7E/6aLPczbwL18wbWLvt41o8w= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([46.223.2.213]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MdebB-1oCIxi15hB-00ZcVv; Sat, 09 Apr 2022 01:35:59 +0200 From: Lino Sanfilippo To: gregkh@linuxfoundation.org Cc: linux@armlinux.org.uk, jirislaby@kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, p.rosenberger@kunbus.com, lukas@wunner.de, Lino Sanfilippo , stable@vger.kernel.org Subject: [PATCH] serial: amba-pl011: do not time out prematurely when draining tx fifo Date: Sat, 9 Apr 2022 01:35:02 +0200 Message-Id: <20220408233503.7251-1-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:2Pi391PVpa6mz3HDqrEJVvoWX3RP/HWxrw14lQr48Wx7DltIAtf 8FWeQrDo3ShvEexNvnNKwtwOrEBi8gnsakCStv2bg1751YJF/pJRO+1WCdm1aIRMWYNAOcI 4MqcCvYZHrIKZWYP0tAyQnBDHwTPv0KwBOajHxojwOiBbNn1woVMA2Hz+RPvSBMBX53tzEY rUtDV0HYRY7e9zGN9mPYA== X-UI-Out-Filterresults: notjunk:1;V03:K0:1WIr7NdhmBo=:qrqZHMQgybDqyVMSBON3kN S0woaUywjvcNPEqa9b9/3SuSNqJgJku17bjnEdvGX2gFeyGshXwCzf2w3XjyKtdBuaJHVSPpw j9HTm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GNED, DKIM_VALID,FREEMAIL_FROM,MIME_BASE64_TEXT,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VGhlIGN1cnJlbnQgdGltZW91dCBmb3IgZHJhaW5pbmcgdGhlIHR4IGZpZm8gaW4gUlM0ODUgbW9k ZSBpcyBjYWxjdWxhdGVkIGJ5Cm11bHRpcGx5aW5nIHRoZSB0aW1lIGl0IHRha2VzIHRvIHRyYW5z bWl0IG9uZSBjaGFyYWN0ZXIgKHdpdGggdGhlIGdpdmVuCmJhdWQgcmF0ZSkgd2l0aCB0aGUgbWF4 aW1hbCBudW1iZXIgb2YgY2hhcmFjdGVycyBpbiB0aGUgdHggcXVldWUuCgpUaGlzIHRpbWVvdXQg aXMgdG9vIHNob3J0IGZvciB0d28gcmVhc29uczoKRmlyc3Qgd2hlbiBjYWxjdWxhdGluZyB0aGUg dGltZSB0byB0cmFuc21pdCBvbmUgY2hhcmFjdGVyIGludGVnZXIgZGl2aXNpb24KaXMgdXNlZCB3 aGljaCBtYXkgcm91bmQgZG93biB0aGUgcmVzdWx0IGluIGNhc2Ugb2YgYSByZW1haW5kZXIgb2Yg dGhlCmRpdmlzaW9uLgoKRml4IHRoaXMgYnkgcm91bmRpbmcgdXAgdGhlIGRpdmlzaW9uIHJlc3Vs dC4KClNlY29uZCB0aGUgaGFyZHdhcmUgbWF5IG5lZWQgYWRkaXRpb25hbCB0aW1lIChlLmcgZm9y IGZpcnN0IHB1dHRpbmcgdGhlCmNoYXJhY3RlcnMgZnJvbSB0aGUgZmlmbyBpbnRvIHRoZSBzaGlm dCByZWdpc3RlcikgYmVmb3JlIHRoZSBjaGFyYWN0ZXJzIGF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