Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp901269imm; Wed, 13 Jun 2018 10:02:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI0LDGsaLN0x70Iopn+27Vrj8nYlnN00roxLiqCvKQPd69ZugsldW1n9iWF0hfuf05sUAdj X-Received: by 2002:a63:715d:: with SMTP id b29-v6mr4824094pgn.325.1528909328043; Wed, 13 Jun 2018 10:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528909328; cv=none; d=google.com; s=arc-20160816; b=qJZsR9vjTaYtsfDBfLI8/dLI+rncauP4/qJm2142hoRmaVjd1igh2vet2txJnr+bA/ WUwfM9dpg15DnYftBhQMFKeesp5Mv+xux2UFPH3LjKXuGFwa4SjG3uum1e3s53kQpuqD VX8V9DIn1N8UGoCM693FNuXYxEbrpZw88E/HvGC9n2OS47RE2WnQtpCtL3UGt8Wxj19J hdxABwhsx3GkM3IiSvbGXaGJKMrX981ZsYZvgSE4d55XHPfId3K9fL4/km/nyEDmKn0z g/AKiF0k/CD5nQK3e7Lgo6+1unyZk+OBbSQpsmLuPJSrgadssjlhbFsPCzdyh6DVHp+j jGmQ== 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:message-id:subject:cc:to:from :date:arc-authentication-results; bh=rxyKkTqv3to5STcdnIqpX6v6IJcGgV7QcwlFJj5sCOk=; b=aOk1vA4goGGxAfqZr0HgMmHBlBRILshyD+bdWzKQbgLpUxqLgOw1LyUqmRoVRDLUki OcO4xtpvlvaBWB0eJJQxHWgdzPNtSyFRrSebDaeSw+GP7lA7hT4dtg9v377YG65eWh6J 0Gt+fhbkiTxkhC+vQqwUHkZxocVMisqgUjyp/9NyaPbL8FnwzhLnbEFoeW3QH+LUod1T Zn1QGRqqGW8rX/uJrm8cPfZxMbeWpk+iWx7D3KFOzGXXAZVm198gd+d7eTPMmAPzbkjJ dY7Hv8VDa1e71zQfHtMqedfx3CMYTZuA7AgUwF41T7+ot61jHBgBkrbG7k6ZAQ9iFwZk SpOg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17-v6si2683717pgf.352.2018.06.13.10.01.48; Wed, 13 Jun 2018 10:02:08 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935240AbeFMRBJ (ORCPT + 99 others); Wed, 13 Jun 2018 13:01:09 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:41406 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934802AbeFMRA5 (ORCPT ); Wed, 13 Jun 2018 13:00:57 -0400 Received: from alans-desktop (82-70-14-226.dsl.in-addr.zen.co.uk [82.70.14.226]) by fuzix.org (8.15.2/8.15.2) with ESMTP id w5DGxdfa025241; Wed, 13 Jun 2018 17:59:39 +0100 Date: Wed, 13 Jun 2018 17:59:38 +0100 From: Alan Cox To: Giulio Benetti Cc: matwey.kornilov@gmail.com, Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko , Stefan Potyra , Philipp Zabel , Ed Blake , Joshua Scott , Vignesh R , Rolf Evers-Fischer , Aaron Sierra , Phil Elwell , Rafael Gago , Joel Stanley , Sean Wang , linux-serial@vger.kernel.org (open list:SERIAL DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: Re: [PATCH 3/4] serial: 8250: Handle case port doesn't have TEMT interrupt using em485. Message-ID: <20180613175915.279d03e2@alans-desktop> In-Reply-To: <20180606095156.72628-2-giulio.benetti@micronovasrl.com> References: <20180606095156.72628-1-giulio.benetti@micronovasrl.com> <20180606095156.72628-2-giulio.benetti@micronovasrl.com> Organization: Intel Corporation X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + } else { > + while ((lsr & BOTH_EMPTY) != BOTH_EMPTY) { > + lsr = serial_in(p, UART_LSR); > + cpu_relax(); > + } > + } This still needs a timeout in case some kind of hardware flow control line is asserted and therefore the byte is staying put. Alan