Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp595583imm; Wed, 6 Jun 2018 02:51:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJD+xye2CQxM0rt5RuoovnLi5kqu5n7b88Xz+3N3cyGQmgA/itnCsIf4MV1GsPTSS7j0koX X-Received: by 2002:a17:902:ba8a:: with SMTP id k10-v6mr2553127pls.338.1528278715245; Wed, 06 Jun 2018 02:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528278715; cv=none; d=google.com; s=arc-20160816; b=e5wKr0COjBnG0BoHDvKJ/J5zJcQMGWQMZYSeItjhrHYtOsUjrkapw4aJdrGIqlTIQi nj4LkMzlRRLijlhjdgX6q3qeRB2mKS9wcgnzW4czlsMdXjd/hRnw/xwgM6lcLxEpqpZL 2+rK6utiRmRVYZWKXyeoy6kLGQdJNDTyGeM/hYK1yFVrdIv5S3ruRdAUyt1xRRpIzUpl +J5OK6HREqsUEsUVxeKQoetJ0p5g1heCKVpw5po+nOhlLtViRhAA9D0qyvkKXsohb40m mS1Khlf7bW/y960vWlgn1YXK6Vigh/3L2OJYw/ZFLG8diQa3mSAZS7x7o/Bf88bsSzo2 kW9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=qiwpNPfTj3vhWqXTd2JZYBEaVGpawQAPHxSZ2rOEVCI=; b=StPFZyIiDdZu61zUbK3Nhqkj5TDvq6EEvAbGOY7R4kFKxBKvj9wpVOTVxxAj/5YfSo Hm+EwE+TOquQwG2+Glq1bnwQjBehhfUFgZthslDgSdt1pM2jIx3KlAJX+8dbQYDVobWK wJecP88eiWwtDGxEW66YBQc4VD2qWqCY9pbDavZ8OrYkYCQILctPpQptnTA8AdvrZXZ7 nN7qFkY5MykF5WL4ry/+X6L0jKMLNfII20YhfxMJALZCrSDYE1Vwfn+XDbLJMmr8RoeR OodiEsEX2tTNaVjak7M9atlcFzycK8v3qspjvPSm5hbFz86jw0vpjxU2npzsZXWjamlQ FdYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=d/9Z37iz; 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 b14-v6si9017169pls.292.2018.06.06.02.51.40; Wed, 06 Jun 2018 02:51:55 -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=d/9Z37iz; 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 S932460AbeFFJuE (ORCPT + 99 others); Wed, 6 Jun 2018 05:50:04 -0400 Received: from mail.micronovasrl.com ([212.103.203.10]:55514 "EHLO mail.micronovasrl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932378AbeFFJuC (ORCPT ); Wed, 6 Jun 2018 05:50:02 -0400 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 2DF84B0079D for ; Wed, 6 Jun 2018 11:50:01 +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=1528278600; x=1529142601; bh=eB z1LpxiulAtwLv/ANgyb2PwgeUmqsfJjfnNPVzVoyM=; b=d/9Z37izFxF80W5ieh p3nR19PV6F3QByKSea+Et6kvsg99UZ2fiEqmNwG0h6RoM8H8TnLq3AeFRu2Ak/ga rNB+XYvCG2NStgg51NzeTbOtIzCPKQd2KLHJ426h03qIg+3+iiV8hkCQ1g80yhSL EpUKgpVi5Jm9/wh05FQYzJwn4= 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 r022eoXI3QVV for ; Wed, 6 Jun 2018 11:50:00 +0200 (CEST) Received: from localhost.localdomain (unknown [87.18.119.93]) by mail.micronovasrl.com (Postfix) with ESMTPSA id 4E445B002BC; Wed, 6 Jun 2018 11:49:59 +0200 (CEST) From: Giulio Benetti Cc: matwey.kornilov@gmail.com, Giulio Benetti , Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko , Matthias Brugger , Kees Cook , Allen Pais , Sean Young , linux-serial@vger.kernel.org (open list:SERIAL DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/4] serial: 8250: Copy mctrl when register port. Date: Wed, 6 Jun 2018 11:49:37 +0200 Message-Id: <20180606094942.71190-1-giulio.benetti@micronovasrl.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: To: unlisted-recipients:; (no To-header on input) 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.1