From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Wroblewski Subject: Re: [PATCH] V4 pci uart - better cope with UART being temporarily unavailable Date: Tue, 27 Aug 2013 16:15:36 +0200 Message-ID: <521CB488.8040906@citrix.com> References: <1377612358-13249-1-git-send-email-tomasz.wroblewski@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" 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 Cc: keir@xen.org, JBeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 08/27/2013 04:05 PM, 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 readding Reviewed-by: Jan Beulich since he said: "(and you may retain the tag if you decide to undo the first of the two mentioned changes since V2 - I'm fine with it either way)" V4 undoes that mentioned change, it was wrong.