Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp546400imm; Fri, 1 Jun 2018 05:42:54 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKp8QMJ21aOupl6rG5GJDWvC+ESGuNEGdvPcrHKuORZzTfGT0bxNz6F/WTZqNIh83Flp/mX X-Received: by 2002:a17:902:26:: with SMTP id 35-v6mr11185699pla.276.1527856974730; Fri, 01 Jun 2018 05:42:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527856974; cv=none; d=google.com; s=arc-20160816; b=WKHML3+wW2UWRfmH/l7vqNAkOKlCrVlAWGdo6BuK339w0Lx2ychHPKyHip+Rd66Exo DTmuCR1dn2j0RweC6mf/Ss1sYSptfau160tFK703NfNEhhU8fhtQvEGzeIz7WUXB65y3 ndDXrf7Fs+UN1Fzcpy1IGJWDf+aiLi/rNLPpCUV1wHIS0yvt1R+Es8Sk1SMS7dwnrOYQ c3Ke4XcnaKBLBQVs+mxkSsKEoZSVHAPTHKXnGH4Iw0GvwlUDqbTjjT2ftxiHdim8GM6f Rs4bLberrAOT2+XiXkvAaMh5GENf9EXqIJip3CgOw9+Z2oYHaDV6pahOYYa940bflwkl RNDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=GlZStfjGfyun9KlqbwZ60kd3DZbq1fAx4zdMkocfUiY=; b=A6lqOknQVw9MY86dzZAaH8AeT7Ef2ikkxV/Dqh4Ai/pcY8+UVus0VZQMBTL87SCB1a ex7DWEcQm0TGvScTfUvz/6Lw5VMSby6jNaT2UGTTdnfI16wX0XcxBMPsmPAOXEdtxVh/ vJfqzdTvfzBkAt0Zjjleq1L8qTN4M1aMcz0rRxNbZuSfPx0+bWw1i5NkEMOHOSuHtLxv +rBxz7P9PMXGG42oq0fhipbHycyVkvVk+cRiDWtAe58lNofXLDoSh3iuuvMKPuQZ1O0e c9HipKSQcHvQy2REoLIMRGEHQAXBBjegQwJBDLLi4Qq7Qbvkpf8Nf/yn2hTE9NVtcdUn uGcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=ffpR2vqv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9-v6si31894880pgn.665.2018.06.01.05.42.40; Fri, 01 Jun 2018 05:42:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=ffpR2vqv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752548AbeFAMlh (ORCPT + 99 others); Fri, 1 Jun 2018 08:41:37 -0400 Received: from mail.micronovasrl.com ([212.103.203.10]:39250 "EHLO mail.micronovasrl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752266AbeFAMks (ORCPT ); Fri, 1 Jun 2018 08:40:48 -0400 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id D2683B00917 for ; Fri, 1 Jun 2018 14:40:46 +0200 (CEST) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=references:in-reply-to:x-mailer:message-id:date:date:subject :subject:to:from:from; s=dkim; t=1527856846; x=1528720847; bh=jC TphYmXceu4kUz4MSRvor4BlSF4TRPUftZr/n49Ohw=; b=ffpR2vqvRcGnwgkkgq +WokUJoa4l+IGJeadqCvOx90AaAd/NdJvqFOnBX0S2ORTKkmCuBCyNL2rSpKXXmk yOil9NJpeQJaNxyE97fF/eAi2/PZafrcxQpxbdP/luDG91/g0xV+zxb/QLRSSSH4 6h0AuhohaWn8txEiGNU6kRkeM= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-10 required=4.5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=unavailable autolearn_force=no Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 24d0nHyh9zYN for ; Fri, 1 Jun 2018 14:40:46 +0200 (CEST) Received: from localhost.localdomain (unknown [87.18.119.93]) by mail.micronovasrl.com (Postfix) with ESMTPSA id D8404B00816; Fri, 1 Jun 2018 14:40:35 +0200 (CEST) From: Giulio Benetti To: Greg Kroah-Hartman Cc: Jiri Slaby , Andy Shevchenko , Kees Cook , Matthias Brugger , Allen Pais , Sean Young , Ed Blake , Stefan Potyra , Philipp Zabel , Joshua Scott , Vignesh R , Rolf Evers-Fischer , Aaron Sierra , Rafael Gago , Joel Stanley , Sean Wang , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Giulio Benetti Subject: [PATCH 6/8] serial: 8250: Copy mctrl when register port. Date: Fri, 1 Jun 2018 14:40:19 +0200 Message-Id: <20180601124021.102970-7-giulio.benetti@micronovasrl.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180601124021.102970-1-giulio.benetti@micronovasrl.com> References: <20180601124021.102970-1-giulio.benetti@micronovasrl.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RS485 can modify mctrl on startup, especially when RTS_AFTER_SEND is on TIOCM_RTS is set, then need to keep it set when registering port. Copy mctrl to new port too. Signed-off-by: Giulio Benetti --- drivers/tty/serial/8250/8250_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index c8c2b260c681..c8e62fbd6570 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -993,6 +993,7 @@ int serial8250_register_8250_port(struct uart_8250_port *up) uart->port.unthrottle = up->port.unthrottle; uart->port.rs485_config = up->port.rs485_config; uart->port.rs485 = up->port.rs485; + uart->port.mctrl = up->port.mctrl; uart->dma = up->dma; uart->em485 = up->em485; -- 2.17.0