aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen
diff options
context:
space:
mode:
authorTomasz Wroblewski <tomasz.wroblewski@citrix.com>2013-08-28 10:19:42 +0200
committerJan Beulich <jbeulich@suse.com>2013-08-28 10:19:42 +0200
commit37f36d894ef43dc2986d0936612ec967c5a89be8 (patch)
tree3294c6a581fce860ce455d0a48cf16e430c95888 /xen/include/xen
parent9e2c5938246546a5b3f698b7421640d85602b994 (diff)
downloadxen-37f36d894ef43dc2986d0936612ec967c5a89be8.tar.gz
xen-37f36d894ef43dc2986d0936612ec967c5a89be8.tar.bz2
xen-37f36d894ef43dc2986d0936612ec967c5a89be8.zip
PCI UART: better cope with UART being temporarily unavailable
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. Signed-off-by: Tomasz Wroblewski <tomasz.wroblewski@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xen')
-rw-r--r--xen/include/xen/serial.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/xen/include/xen/serial.h b/xen/include/xen/serial.h
index 403e193d96..f38c9b7f54 100644
--- a/xen/include/xen/serial.h
+++ b/xen/include/xen/serial.h
@@ -70,8 +70,9 @@ struct uart_driver {
/* Driver suspend/resume. */
void (*suspend)(struct serial_port *);
void (*resume)(struct serial_port *);
- /* Return number of characters the port can hold for transmit. */
- unsigned int (*tx_ready)(struct serial_port *);
+ /* Return number of characters the port can hold for transmit,
+ * or -EIO if port is inaccesible */
+ int (*tx_ready)(struct serial_port *);
/* Put a character onto the serial line. */
void (*putc)(struct serial_port *, char);
/* Flush accumulated characters. */