Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3416396imm; Mon, 4 Jun 2018 03:18:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIMhusm8Q2uvrmUq7ahJUdG3roQsfmdjvv5ok7bP12EEIsfkMbzxRgcMXuv9u3z1l6v8Drg X-Received: by 2002:a62:cd45:: with SMTP id o66-v6mr20765715pfg.250.1528107511851; Mon, 04 Jun 2018 03:18:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528107511; cv=none; d=google.com; s=arc-20160816; b=QbUAFzsj3xz2/e2AYmT9JF8aLCCT6bo90gZ2MXi/NBudgBiYcY+x50YTBIhc3NX3G2 2cEtndH2w7S9MgTWYpRGwAioj6oM40Q/gHgekgrrxxkHPf7bPB6XHQ+SFZbIuG87vBl+ iru/n42FlIQ002aMRXOoIej77qxWzvhpDXoQCPldXWCsAdljyfK1MqnH5IG8jjW9pZDr L9xd+mBAhuM9ZR9GrX+a8p2rec/8kvUbt2PpkdhI/wd0nkk2pyuXO85f/rtaAacqxyfS rYogwRwhAVJptB6etRoLoLsWcEp1KWGypWTqtjgvKvuvHlhBQjNQB28Ns7Yt7XPwEctp vu1w== 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=awgdWA6njgkYAs62yGc8xCRLSgGbB8XtGUW9KRIlIfg=; b=mLvBt2zQvPvm6fzRqu7swTb/r9OMntafQ6Q/owrFg1zOChSqL+i2KpoZRRwsrPJf6I EQGN8ve/ljhLk61q2z/BiMdNGvr0uVkkZsrF/1JpP6HGAPDOjQ/BHRNQHhSnmeTrNS2R n7x36U22uj4LjcaaUtwSZTZ0ih4jV6Cnw5IDLAjEVPiQcc6VjaGYtv01fzB6myQqttee uhJe/SraUA9jMotgO6k78J+nONzRYvp2Z/Vsi1B2uYTDchpbApgPUShhsZGuMXgzEqM8 4aCin/xrKJEIRhHJAt6DVKvAHA/ALQ1P7bmfhYHhM+OKL8uvMFgMVMRM/59PjTDUfqAo Pkyw== 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 p2-v6si32673761pgn.187.2018.06.04.03.18.17; Mon, 04 Jun 2018 03:18:31 -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 S1752345AbeFDKRu (ORCPT + 99 others); Mon, 4 Jun 2018 06:17:50 -0400 Received: from mga11.intel.com ([192.55.52.93]:10332 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752222AbeFDKRr (ORCPT ); Mon, 4 Jun 2018 06:17:47 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2018 03:17:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,476,1520924400"; d="scan'208";a="54559516" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by FMSMGA003.fm.intel.com with ESMTP; 04 Jun 2018 03:17:42 -0700 Message-ID: <3a66327727d9bf2ce5adf8ef0f1fcc1fffeaa4ec.camel@linux.intel.com> Subject: Re: [PATCH 4/8] serial: 8250: Handle case port doesn't have TEMT interrupt using em485. From: Andy Shevchenko To: Giulio Benetti , Greg Kroah-Hartman Cc: Jiri Slaby , 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 Date: Mon, 04 Jun 2018 13:17:41 +0300 In-Reply-To: <20180601124021.102970-5-giulio.benetti@micronovasrl.com> References: <20180601124021.102970-1-giulio.benetti@micronovasrl.com> <20180601124021.102970-5-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 Fri, 2018-06-01 at 14:40 +0200, Giulio Benetti wrote: > Some 8250 ports only have TEMT interrupt, so current implementation > can't work for ports without it. The only chance to make it work is to > loop-read on LSR register. > > With NO TEMT interrupt check if both TEMT and THRE are set looping on > LSR register. > --- a/drivers/tty/serial/8250/8250_dw.c > +++ b/drivers/tty/serial/8250/8250_dw.c > - int ret = serial8250_em485_init(up); > + int ret = serial8250_em485_init(up, false); Is true for all possible DW configured types? Or it's your particular case? -- Andy Shevchenko Intel Finland Oy