From: Keir Fraser Subject: Re: [PATCH] V4 pci uart - better cope with UART being temporarily unavailable Date: Tue, 27 Aug 2013 19:06:43 +0100 Message-ID: References: <1377612358-13249-1-git-send-email-tomasz.wroblewski@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1377612358-13249-1-git-send-email-tomasz.wroblewski@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tomasz Wroblewski , xen-devel@lists.xen.org Cc: JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org On 27/08/2013 15:05, "Tomasz Wroblewski" wrote: > This happens for example when dom0 disables ioport responses during PCI > subsystem initialisation. If a __ns16550_poll() happens to be scheduled during > that time, Xen hangs. Detect and exit that condition. > > Amended ns16550_ioport_invalid function to only check IER register, which > contins 3 reserved (always 0) bits, therefore it's sufficient for that test. > > Changes since V3: > * readded invalid port test in the loop in __ns16550, moved it before > serial_rx_interrupt call > > Changes since V2: > * pulled out invalid port test before the loop in __ns16550_poll > * coding style/patch size fixes > > Changes since V1: > * added invalid port test in getc() > * changed ns16550_tx_ready to return -EIO and code in serial.[ch] to cope with > that error condition. If port is temporarily unavailable tx_ready will return > -EIO and serial driver code will attempt to buffer the character instead of > dropping it. > > Signed-off-by: Tomasz Wroblewski > --- Acked-by: Keir Fraser