Trolle Selander
2007-Nov-28 07:45 UTC
[Xen-devel] [PATCH] [QEMU-DM] Modem control line & msl/mcr register support
This patch enables handling of the modem/flow control lines of a serial port when the backend for the virtual port is a physical serial port. During initialization, it tries to load the msr with the detected status from the real port (this is consistent with physical uart, which starts with its msr values set according to the status of the modem status lines). If the ioctl returns -ENOTSUP, then the code assumes the backend is not a real serial port and will disable any further attempts to manipulate or read the physical port''s line status. It''s tries to be as "correct" as possible in its msr/msl handling, with the exception of modem line status change interrupts. A real 16550 uart apparently have a delay time of 250ns between when a modem status line changes and the IRQ line goes high. In this patch, an "idle" port is polled for line status changes only if the guest has enabled UART_IER_MSI is enabled, and only polled every 10 ms. There''s some small "artifacts" in this patch due to me finishing it after I''d also added 16550 emulation ( that patch is coming Really Soon Now - i still have something strange occurring at 115200 baud when backed by a physical serial port that i want to look into) and then separating the finished msl/mcr patch out afterwards. Some of the changes in serial_update_irq only make sense in context of that. Nothing harmful, though, and the 16550 patch will hopefully be ready to post very shortly. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel