Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B425DC4360F for ; Wed, 3 Apr 2019 15:07:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 074F92075E for ; Wed, 3 Apr 2019 15:07:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="Rx1HQvHa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726376AbfDCPHW (ORCPT ); Wed, 3 Apr 2019 11:07:22 -0400 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:47706 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726337AbfDCPHW (ORCPT ); Wed, 3 Apr 2019 11:07:22 -0400 X-IronPort-AV: E=Sophos;i="5.60,304,1549954800"; d="scan'208";a="30741568" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 Apr 2019 08:07:20 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.105) with Microsoft SMTP Server (TLS) id 14.3.352.0; Wed, 3 Apr 2019 08:07:20 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MCXM+eH7UZMWV+FT2mXBI9D9CAherB/fg+bJaXmWFMs=; b=Rx1HQvHa6V023cLo5yI/0/mu2d7Cec8Hf0rVO3jaskQJfgAQ0nvoO7YwxXM54aOi1CS0zPeKHbbKIgANU+BFgtxu5DUNMeGW59i7PRR+Sz9EQaOD30s1Oxt3RoqThBIFvtCMU0rtHvH7O2jOZ1X+Zxg9t6dkrV/cP8mNIL/+W9c= Received: from SN6PR11MB3069.namprd11.prod.outlook.com (52.135.126.81) by SN6PR11MB3117.namprd11.prod.outlook.com (52.135.126.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.20; Wed, 3 Apr 2019 15:07:18 +0000 Received: from SN6PR11MB3069.namprd11.prod.outlook.com ([fe80::d41a:3d85:f08a:96b5]) by SN6PR11MB3069.namprd11.prod.outlook.com ([fe80::d41a:3d85:f08a:96b5%2]) with mapi id 15.20.1750.017; Wed, 3 Apr 2019 15:07:18 +0000 From: To: CC: , Subject: Re: [PATCH for-4.19 2/2] tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped Thread-Topic: [PATCH for-4.19 2/2] tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped Thread-Index: AQHU6TnfuLp6Qlc44kq3GVl6bD4EbqYqeVeAgAASEwA= Date: Wed, 3 Apr 2019 15:07:18 +0000 Message-ID: References: <20190402095250.11334-1-razvan.stefanescu@microchip.com> <20190402095250.11334-2-razvan.stefanescu@microchip.com> <20190403140239.GC8633@kroah.com> In-Reply-To: <20190403140239.GC8633@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LO2P265CA0443.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:e::23) To SN6PR11MB3069.namprd11.prod.outlook.com (2603:10b6:805:d5::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Razvan.Stefanescu@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-tagtoolbar-keys: D20190403180720350 x-originating-ip: [94.177.32.154] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cda2dbf1-c840-40f3-204b-08d6b8461090 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:SN6PR11MB3117; x-ms-traffictypediagnostic: SN6PR11MB3117: x-microsoft-antispam-prvs: x-forefront-prvs: 0996D1900D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(136003)(376002)(366004)(346002)(39860400002)(199004)(189003)(8676002)(52116002)(26005)(4326008)(53546011)(7736002)(386003)(6246003)(305945005)(3846002)(72206003)(6506007)(5660300002)(478600001)(31696002)(446003)(2616005)(2906002)(6512007)(106356001)(11346002)(105586002)(6116002)(76176011)(476003)(486006)(86362001)(99286004)(71200400001)(71190400001)(53936002)(66066001)(102836004)(186003)(25786009)(81166006)(107886003)(6436002)(14454004)(6486002)(54906003)(14444005)(81156014)(68736007)(97736004)(229853002)(31686004)(36756003)(6916009)(8936002)(256004)(316002);DIR:OUT;SFP:1101;SCL:1;SRVR:SN6PR11MB3117;H:SN6PR11MB3069.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: vJm8Ot14s5u8+Bg54O8uSKR3j/9Wj+x7Y6PbU9lOxHNjXn8qm1jLElr8qOV5FC9OMRoF10/pcsMYFftA1rUTIu/ff82Q8lUAEQSvERMV6WCJ7a9HtrCkwqd0rU3DBI3fGN5x1m5ALmcw1Hzc8nn8GjUDY6IjU5hrVYxvXuuBwqTCQzwWXKpWebSHroTgpWgZRlo03uyfOsSmd4rkLUecV8AQqxYVvKa+7JGnBgo4OotPbpiSmaQUz8roy8NmzS6q/jSWiSZ70DGKiV2lKNN7pRF3UDAHiI+MGIL4SbPcLGQlD62O50rVJZFolIcSUPYojDnp6/76JOnYF8UtfJ+JLrREXjthQMB/Dq1WXYMqlLCMv6Q5QkY1cWJ2zdkP3ISs1dzJZpD+++C7oblLgULDiEJUjo9XQsQkPNPlZqInDy4= Content-Type: text/plain; charset="Windows-1252" Content-ID: <5D79023AC97B2642886E4954EF419B9D@namprd11.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: cda2dbf1-c840-40f3-204b-08d6b8461090 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Apr 2019 15:07:18.6847 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3117 X-OriginatorOrg: microchip.com Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On 03/04/2019 17:02, Greg Kroah-Hartman wrote: > On Tue, Apr 02, 2019 at 12:52:50PM +0300, Razvan Stefanescu wrote: >> commit 69646d7a3689 ("tty/serial: atmel: RS485 HD w/DMA: enable RX after= TX is stopped") upstream. >> >> In half-duplex operation, RX should be started after TX completes. >> >> If DMA is used, there is a case when the DMA transfer completes but the >> TX FIFO is not emptied, so the RX cannot be restarted just yet. >> >> Use a boolean variable to store this state and rearm TX interrupt mask >> to be signaled again that the transfer finished. In interrupt transmit >> handler this variable is used to start RX. A warning message is generate= d >> if RX is activated before TX fifo is cleared. >> >> Fixes: b389f173aaa1 ("tty/serial: atmel: RS485 half duplex w/DMA: enable >> RX after TX is done") >> Signed-off-by: Razvan Stefanescu >> Acked-by: Richard Genoud >> Cc: stable >> Signed-off-by: Greg Kroah-Hartman >> --- >> drivers/tty/serial/atmel_serial.c | 24 +++++++++++++++++++++--- >> 1 file changed, 21 insertions(+), 3 deletions(-) >> >=20 > Happen to have a version of this for 4.4.y and 4.9.y? >=20 > I've queued both of these patches up now, thanks. >=20 Thank you for picking them. I've sent the patches for 4.4.y and 4.9.y. Best regards, Razvan Stefanescu