From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 CF9F6C4360F for ; Wed, 3 Apr 2019 15:25:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0804206B7 for ; Wed, 3 Apr 2019 15:25:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554305114; bh=kk62bWLzTs0PRn1Xy2+dLXbkaWQMmxWZF8OSwxJITQI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=vx+OucXFzMNFTPVDJwA6iqUsjY/w/x2812xJ7hq9kAEWzw35ePdaiJ/d3z/zC1Qex s/HUuCK7+k6v2Cb5/SVBCpgZA8SiN+YzdYxGDmZCTA70EceQlZhARSiaCAel+t79g3 ww3YxAPvn4P7O0WgKR0/4ukaIG9cnGZUpOVAWec8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726352AbfDCPZO (ORCPT ); Wed, 3 Apr 2019 11:25:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:47348 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726099AbfDCPZN (ORCPT ); Wed, 3 Apr 2019 11:25:13 -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 C92E0206B7; Wed, 3 Apr 2019 15:25:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554305113; bh=kk62bWLzTs0PRn1Xy2+dLXbkaWQMmxWZF8OSwxJITQI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OIik6/l4EtvPG2lHFAWVbGPQZ8tnVMr8bbK71hO/Yukay6b0Holqsx9odoQyBraNv TdpDoPQ5l7GF1tPa/p1Kp6/CbUx72Yv7vBXS9nSd35lCR4MrTWWpYQ21k4O50SbBeY /8VOh/aAhfV1thHKASqg+Cq4g0Oo7OUZD/3LvugU= Date: Wed, 3 Apr 2019 17:25:11 +0200 From: Greg KH To: Razvan.Stefanescu@microchip.com Cc: stable@vger.kernel.org, Nicolas.Ferre@microchip.com Subject: Re: [PATCH for-4.19 2/2] tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped Message-ID: <20190403152511.GA18088@kroah.com> References: <20190402095250.11334-1-razvan.stefanescu@microchip.com> <20190402095250.11334-2-razvan.stefanescu@microchip.com> <20190403140239.GC8633@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, Apr 03, 2019 at 03:07:18PM +0000, Razvan.Stefanescu@microchip.com wrote: > > > 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 generated > >> 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(-) > >> > > > > Happen to have a version of this for 4.4.y and 4.9.y? > > > > I've queued both of these patches up now, thanks. > > > > Thank you for picking them. I've sent the patches for 4.4.y and 4.9.y. Thanks for those, now queued up. greg k-h