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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A5CEC433FE for ; Sun, 16 Oct 2022 11:17:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229655AbiJPLRI (ORCPT ); Sun, 16 Oct 2022 07:17:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229622AbiJPLRH (ORCPT ); Sun, 16 Oct 2022 07:17:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 566F73685D for ; Sun, 16 Oct 2022 04:17:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 00F5DB80C82 for ; Sun, 16 Oct 2022 11:17:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E2ACC433C1; Sun, 16 Oct 2022 11:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1665919023; bh=TEq2spATq3jMCIp+VEJJ74D/iJStm0389Lk/O6OEEg8=; h=Subject:To:Cc:From:Date:From; b=nbLuQ3nzvPCNHeku9cxLgSIPiIucUl17iVxHM+OiYDCho0Zq/UR6uHWNN+INCeBEn GxTyvx1uSV7OgcBXdQIikVxPcFEEjkXHukRHzs3dxIz4Ep7ys4Oqd3uZtWUS4SRSnc gRvzU2XTA6fPkbPnKKa3vITThSE1yscTgBMaooRY= Subject: FAILED: patch "[PATCH] serial: ar933x: Deassert Transmit Enable on ->rs485_config()" failed to apply to 5.19-stable tree To: lukas@wunner.de, daniel@makrotopia.org, gregkh@linuxfoundation.org, ilpo.jarvinen@linux.intel.com Cc: From: Date: Sun, 16 Oct 2022 13:17:48 +0200 Message-ID: <1665919068129166@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.19-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . Possible dependencies: 3a939433ddc1 ("serial: ar933x: Deassert Transmit Enable on ->rs485_config()") 184842622c97 ("serial: ar933x: Remove superfluous code in ar933x_config_rs485()") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 3a939433ddc1bab98be028903aaa286e5e7461d7 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sun, 11 Sep 2022 11:12:15 +0200 Subject: [PATCH] serial: ar933x: Deassert Transmit Enable on ->rs485_config() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ar933x_uart driver neglects to deassert Transmit Enable when ->rs485_config() is invoked. Fix it. Fixes: 9be1064fe524 ("serial: ar933x_uart: add RS485 support") Cc: stable@vger.kernel.org # v5.7+ Cc: Daniel Golle Reviewed-by: Ilpo Järvinen Signed-off-by: Lukas Wunner Link: https://lore.kernel.org/r/5b36af26e57553f084334666e7d24c7fd131a01e.1662887231.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c index 0a4020dba165..925484a42c82 100644 --- a/drivers/tty/serial/ar933x_uart.c +++ b/drivers/tty/serial/ar933x_uart.c @@ -583,6 +583,13 @@ static const struct uart_ops ar933x_uart_ops = { static int ar933x_config_rs485(struct uart_port *port, struct ktermios *termios, struct serial_rs485 *rs485conf) { + struct ar933x_uart_port *up = + container_of(port, struct ar933x_uart_port, port); + + if (port->rs485.flags & SER_RS485_ENABLED) + gpiod_set_value(up->rts_gpiod, + !!(rs485conf->flags & SER_RS485_RTS_AFTER_SEND)); + return 0; }