Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp194257imw; Fri, 15 Jul 2022 00:51:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v8WpxIGNrP9aG4IP6+LERHN4f2PW0u39Ee2jvmY/laig+Q5PSb2nYzPXfyMBKXW3sWc08F X-Received: by 2002:a17:906:8a4d:b0:72b:6b8d:3779 with SMTP id gx13-20020a1709068a4d00b0072b6b8d3779mr12534894ejc.759.1657871509099; Fri, 15 Jul 2022 00:51:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657871509; cv=pass; d=google.com; s=arc-20160816; b=z1Ie7Icp+bYRKklk2o+ffzRsX51CiCmY2qBmsIG12iDyxixS4w0aHcf2n9rnyKk5MI 6WqSBW0KrWkKW9ydpZ8h1vc+M+f+S8NoiWfMaOGodtSBY5A1KJ/n2io5akMBQxGn4mxM 1g36yvcZIDpTLplj27clIgvGT+pv2dMwuAn0hzPbTvQpmRGzpcy/wYP+LAUNnWnIrEXH BlkVyS6mQRYgH0XGiA4aKNc7+c4WR+hn9A3yF/VwQJgY/MfzIAeFbB8EJCBBt7G4GQ0T qqhNxFrG8nQvdFwxvky/Cd44qDgvfwgkJNhOCTaWHnxxGPFU4aI8Fscyx71p1p012OR7 v02A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=iQAOxlSgpG0hgY+GjtY76WtBHkrhssgoxqZaIHidnhA=; b=DPlY4hoQRfG2Jkhu7WKf8Jsl9pLGwmhJh/cbAL3vgEIQasvPApMQJ/PKyLY1CJQ4Kk pUqrtI4I3+2YVf43lLhevfDOAY0OHSl4nFmp9nRYmubDvsI5yNGIBuOTJZgcEy2AZxph r9oPuOJ5U5YHMFE3mPPDSedRtydlYASxG2r/Om31B9xbvMuRbOgm/xeklM8cTrmD2zLJ EzcySns4j3yFz9nFa3f2M/h/AbYHMmEpLMMrUNiTwH+Ve/VEyMWXgZp5Zrcd8GZ+y4wR GHmhBfIKaA0lXfXxBG4QJ9AMxwNzy2mX6eC4auDC3y77s/E8UblKDJEAQ2T9uUrAjVBl l63Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=PCJA1vD1; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gz25-20020a170906f2d900b00722f396c33esi4571975ejb.415.2022.07.15.00.51.21; Fri, 15 Jul 2022 00:51:49 -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=@nxp.com header.s=selector2 header.b=PCJA1vD1; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229468AbiGOHW3 (ORCPT + 99 others); Fri, 15 Jul 2022 03:22:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbiGOHWY (ORCPT ); Fri, 15 Jul 2022 03:22:24 -0400 Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50067.outbound.protection.outlook.com [40.107.5.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A66FB7437B; Fri, 15 Jul 2022 00:22:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cDQAcGjRZ3tvJgvoVXOk2kjWbGcepco4C1PXChcxrVVUr40k6Qdc4c1DZl7vW1rzNu+R7P76U+PPrE6N9Bz035W1I+SsqZBOWFo/hx2JEb83ajZnuhLg7APmlD6sJviWCrskYKFWCVVdLBU/M3UKyc9kBi0Fy6hn0vA9jQfQO2dnN+WQ0GM7M/KxJHbjOZDrbsLWhAWq7Rod3ZnOpePHE3lt+mbQupabxtouRRfbBAKgk/+4dyVE/tFLubKcY1GXdvxAqwlAhLcYCT63NED4gDCmruJBofmPZVr8rYUv1F9xCCSCuPKdpw1XP6jkbJegBzSWPw5SkP1li4gXX8Xmaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iQAOxlSgpG0hgY+GjtY76WtBHkrhssgoxqZaIHidnhA=; b=Q8OqK1qFNdQIGSDGyHtBvRNt9u/RA+MDNO5MyrRrwYEoQW4R2F11kaF5YD200vEv0s2h0xVYAsG8ZpgE6JTOv7f5vf6m5I2o6BZsQXZvYjU3EBD7PF/SDocBAsw1Rcl4xmb3m3gJpu1uqe6+Op3IqDkUXq1RlZ73yQptM7qcxJIwr3FWMBGeZN13zTorvKCcdhud08jEcCZGwLa/PNnDKactRyS+2JUk0geewfxOF9aFzMh6uP1Mc3o0Jvq47y3Of3XWPOAynknFXRnhXo2/fpNT4iHNxqaM7tiSy1S1LciUhNqFu4gwRTIJD9YqVa/5xXSAUiXnARN/7z8dB7lrBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iQAOxlSgpG0hgY+GjtY76WtBHkrhssgoxqZaIHidnhA=; b=PCJA1vD18R7iOS0mmnkrjNtMNaCzUANQqiGfSVhVg0ToBh51swYYxFRJarGBWS7TAhNcBia8x9rgFfwHpio2i3liNHASkxVKyxIufGj5v9qrTj2N+GdN1UN3FYLnzJqrVmOG75qv5Mx+sMFvhMuFreruSch4RRvAXAYUSL2kBMM= Received: from AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) by AM0PR04MB4930.eurprd04.prod.outlook.com (2603:10a6:208:c7::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.15; Fri, 15 Jul 2022 07:22:19 +0000 Received: from AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::3cec:d61:3836:2826]) by AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::3cec:d61:3836:2826%5]) with mapi id 15.20.5438.017; Fri, 15 Jul 2022 07:22:19 +0000 From: Sherry Sun To: Michael Walle CC: "gregkh@linuxfoundation.org" , "jirislaby@kernel.org" , "linux-serial@vger.kernel.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx Subject: RE: [PATCH 1/2] tty: serial: fsl_lpuart: correct the count of break characters Thread-Topic: [PATCH 1/2] tty: serial: fsl_lpuart: correct the count of break characters Thread-Index: AQHYl/co04hpCZj99kO2L0tD4LHyy61/AMiAgAAGGnA= Date: Fri, 15 Jul 2022 07:22:18 +0000 Message-ID: References: <20220715025944.11076-1-sherry.sun@nxp.com> <20220715025944.11076-2-sherry.sun@nxp.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ba5e99a0-6091-45f9-924d-08da6632c07f x-ms-traffictypediagnostic: AM0PR04MB4930:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Td+vx0kDJyTXv0DVtJfyFodjRKJL0f3dSqL4Xv5Z7jAwETrgCO61U4p4tBX88m8yP10wIe9MJUdk6f6YmQjdhOZ/ByzpbVhVnWy44sdYgWioFCsDADCN6VlMnAKaTD12XlVStzo+jGU/P+bLxZAfLUJHr7NrKgrDCT/Yb6TRtSsVlNpSk9WMpTc9C5k7P6sAaT4GuIBbU7ZCJSHKvWRQEOQLdZ2ruvwUcP/FWSWDcmC3bwWz9ifmYIuucZWLJjU88pTI19lK2dx2THA5B/m51yrf4AAEXlJ6up/mDtP/fL9OGWrA7tx4t3Rm+teVmTJZlf+ZzQ9B4MaCBgv6G32/on0sAXEVAbORRRXsEC/qPouSBc8msnlNPkVF5Ss+XkIghFMzth0EuWIhKU3qHgyZ0Rz16pv++DwALpSiDRbcTt0ElgpKbzHRIm+O62ZacEqbA7AeUyWwTuffotJTEQxDbwdHYA2xYUk3t4Iy9U5jp/MpdRV7mRphOpJY0ecAG65LaCC2hxI8eez4KP8MujKkPJmUTU83iXq+xawaM8ZxtKwwDJLJRtNX/CX77V1qVtNdajYVHbNNF74qBXfjQXmiRuW48fvprT9ucnhtL7U14ulttMjewWhFjMAODfu8tzgi4s9KBj8EzPT2yc8jQGau3qwoliH5Ecd7kFvdNM6tio0OfpAH1x6P8usUn2pF6JSWb4BCLvqKhfSFckfD5pb6pJuEt8FHtLUiNtEY/dVOJK0BWwbRC3EbRlPmaKo2s3E0GH/6p28P/De7D2UymHs35thjaZW6VUTXNh6dDpFxySw6K3UE4JONzckkhMOtrfbl x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8404.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(376002)(136003)(346002)(396003)(366004)(39860400002)(478600001)(8936002)(38100700002)(26005)(9686003)(52536014)(83380400001)(55016003)(66556008)(86362001)(54906003)(33656002)(66476007)(66446008)(64756008)(76116006)(71200400001)(316002)(6916009)(38070700005)(122000001)(5660300002)(7696005)(6506007)(41300700001)(2906002)(66946007)(186003)(8676002)(4326008)(44832011);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ZkoKFRwisUQ90YVhsrXnliB3myfvvoQvaXtCN7Qh0WW1GFnnllF7HlTTU6Dn?= =?us-ascii?Q?ltPYThHsGOMQ7/gVcvKVe6cUMz7BWEeUZUgqfTU6FY/OZ3iBP56fa7g7RAO2?= =?us-ascii?Q?WzbhW62CLLjuZYsehq4Pc1ibNMHtNZ/SlZzi7lzqBdKI34OZrbF/2XtYOMwu?= =?us-ascii?Q?FvzeAtcNoNOj/pC7c9OXulS+I6ag+4lX9Yzbeb0xp597XXH5/yVwxxtlN+3S?= =?us-ascii?Q?HtxHhkyGUrKojxX9EaHHYv56y2ss8hNzT+tqzO6RaG2ZXiaiQfmv6ftPq0p6?= =?us-ascii?Q?TLHhjtZ0kOxowaMdBfWa6CX0CwQVm7cLUJ4aJK0cpEffJr8MZZWefR5syzFf?= =?us-ascii?Q?vwUwpS6HYacSRaYYQMVyAQF7rxOjuIITa8LtdzN54T38u1VEThpPmvS38Ed6?= =?us-ascii?Q?jDsBUWLmjG8RtKXPLLjaHk7Nn/DI+1vopanuB1sVtUHi9lSCDtkuUSQmEeTy?= =?us-ascii?Q?WStiND7BmJ5uLbqhedsW2EXRNcyXaOCLUtEB431jBUUbpk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JpSDkUnpid3b8rmGDAPeSGzxWH0/dQaOxGgLZWDEMQ4b9dmKDn?= =?us-ascii?Q?JQY2L1ZJfDKv0SER2InJSaCV2plxP3z2lp9ISwJl/6nXqcx8IOE9dfKx91Pf?= =?us-ascii?Q?lW/9mMNLpjftnpSl0Fk2kstNY2lozNBE453Zh3Jo29ulrBZ/6bMJNCY35rlY?= =?us-ascii?Q?UWkKwUY/1s8Ul4y0RlwqwZF5untpxF3w7RYVEcFc?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8404.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba5e99a0-6091-45f9-924d-08da6632c07f X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jul 2022 07:22:18.9705 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: n3hrWGG2xPIOCBIngYbpPh29uc5NDDt/85J5HFY1G8t5nG8Pi/RiRwGc8pDWrF1CEXmBnXiF1lidRtdcoUu9uA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4930 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 > Subject: Re: [PATCH 1/2] tty: serial: fsl_lpuart: correct the count of br= eak > characters >=20 > Am 2022-07-15 04:59, schrieb Sherry Sun: > > The LPUART can't distinguish between a break signal and a framing > > error, so need to count the break characters if there is a framing > > error and received data is zero instead of the parity error. >=20 > Ah, it seems I mixed up the framing and the partiy error. Did you test th= e > break in the receive path, though? >=20 Hi Michael, yes, I have tested this, with this fix patch, the sport->port.i= count.brk is correctly now. Best regards Sherry > -michael >=20 > > > > Fixes: 5541a9bacfe5 ("serial: fsl_lpuart: handle break and make sysrq > > work") > > Signed-off-by: Sherry Sun > > --- > > drivers/tty/serial/fsl_lpuart.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/tty/serial/fsl_lpuart.c > > b/drivers/tty/serial/fsl_lpuart.c index fc7d235a1e27..b6365566a460 > > 100644 > > --- a/drivers/tty/serial/fsl_lpuart.c > > +++ b/drivers/tty/serial/fsl_lpuart.c > > @@ -990,12 +990,12 @@ static void lpuart32_rxint(struct lpuart_port > > *sport) > > > > if (sr & (UARTSTAT_PE | UARTSTAT_OR | UARTSTAT_FE)) { > > if (sr & UARTSTAT_PE) { > > + sport->port.icount.parity++; > > + } else if (sr & UARTSTAT_FE) { > > if (is_break) > > sport->port.icount.brk++; > > else > > - sport->port.icount.parity++; > > - } else if (sr & UARTSTAT_FE) { > > - sport->port.icount.frame++; > > + sport->port.icount.frame++; > > } > > > > if (sr & UARTSTAT_OR) > > @@ -1010,12 +1010,12 @@ static void lpuart32_rxint(struct lpuart_port > > *sport) > > sr &=3D sport->port.read_status_mask; > > > > if (sr & UARTSTAT_PE) { > > + flg =3D TTY_PARITY; > > + } else if (sr & UARTSTAT_FE) { > > if (is_break) > > flg =3D TTY_BREAK; > > else > > - flg =3D TTY_PARITY; > > - } else if (sr & UARTSTAT_FE) { > > - flg =3D TTY_FRAME; > > + flg =3D TTY_FRAME; > > } > > > > if (sr & UARTSTAT_OR) >=20 > -- > -michael