Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp717133imm; Wed, 6 Jun 2018 05:03:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJUSJ8ceOgdFFwjfvf/MzuBNYWZXcWvU591YQ6jXWtzS8rv18oGWc6pbOSsy861OqaojZE/ X-Received: by 2002:a17:902:5a1:: with SMTP id f30-v6mr2880420plf.167.1528286606678; Wed, 06 Jun 2018 05:03:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528286606; cv=none; d=google.com; s=arc-20160816; b=BAJpotDEfozfiC7uWDR4MPbBhZk3nX8tUFNDGOeIQmGvFk9N5sRB5L1LYeIo7SymuV x8+LgCtrzaZlcGdcoP0EJg6cHVck0EqUa71ZxQggqk4Ax5MCl80W6WHOzrAnCwN6x7x/ eX0XPFXjTOteHyzCSUoSamh3SsdNF1lGTsm9hbQanPViorPHr/SbsL7ZHwB+SOIxiS6S gk3tXq+b2Q7ca8m3Jib8XAMiovIUhJr9DKF8K1bbRVTc6LWSjeFMwIAhjwD9n3QyQ9J2 UuPEUNeC3zRLp4t2pGLjMG8sNegnuKMpuA74iCVHqfaKVb4Oppe7DcQFAdQRSHbJdsn5 Eo6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=Ie/wiq4rDKseovE6TzszMc29mTkYdGNrpqA4hFIudvs=; b=g9XGnHEHryRTWNfZPCfTNFzk73dbSW3WQCKwGpjOZAbbPvjRXEHI0K+z4HY4+mLx1b nZjyT59AWECye+lpiCXu4K5fS6PUlY05iLQ44fjOzu69tJQmqPPWbLIY+DH3rnbisgLb O3+HBN3Y4AEvSfKrHQ4gHjuXJOv5bQDDpVvZyCSOOzvcgRhyvn70DiV+pkiY+Pvkg4Ms D7l+lP6HGMemyTe2yeRMzT/axUM6M6cSsEMvZelZ7ZuofnrjJDTEjjbVNaE8b3mJkiHM legjTrcGPfhKOJYuPD3NlTIYvWFcPa9Gt47QndEWvorydIAIq5mj8CRjW6VLmK9znMiI pc5w== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si52591914plu.564.2018.06.06.05.03.07; Wed, 06 Jun 2018 05:03:26 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751972AbeFFMBM (ORCPT + 99 others); Wed, 6 Jun 2018 08:01:12 -0400 Received: from mga07.intel.com ([134.134.136.100]:25822 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750864AbeFFMBK (ORCPT ); Wed, 6 Jun 2018 08:01:10 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jun 2018 05:01:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,483,1520924400"; d="scan'208";a="61740375" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by fmsmga001.fm.intel.com with ESMTP; 06 Jun 2018 05:01:06 -0700 Message-ID: Subject: Re: [PATCH 2/4] serial: 8250: Copy mctrl when register port. From: Andy Shevchenko To: Giulio Benetti Cc: matwey.kornilov@gmail.com, Greg Kroah-Hartman , Jiri Slaby , Matthias Brugger , Kees Cook , Allen Pais , Sean Young , "open list:SERIAL DRIVERS" , open list Date: Wed, 06 Jun 2018 15:01:05 +0300 In-Reply-To: <20180606094942.71190-1-giulio.benetti@micronovasrl.com> References: <20180606094942.71190-1-giulio.benetti@micronovasrl.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-06-06 at 11:49 +0200, Giulio Benetti wrote: > 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. > Not sure if it would be useful. Seems the only em485 user, i.e. OMAP, does survive without that. Moreover, often individual drivers override ->set_mctrl() callback. So, real example is needed to explain why. > 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; > -- Andy Shevchenko Intel Finland Oy