[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] [QEMU-DM] Modem control line & msl/mcr register support


  • To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Trolle Selander" <trolle.selander@xxxxxxxxx>
  • Date: Wed, 28 Nov 2007 08:45:10 +0100
  • Delivery-date: Tue, 27 Nov 2007 23:45:49 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:mime-version:content-type; b=M2kmLCKfBPZFN4V8DpRavNRspRrHC1t5LIYaucGzWn0V5AXTlUVFQRXFLYY79Pd+sKhfopnSGQeKulgQgq3ckibv7YQKaNp2Ur5xrcwtVVUWPw0ndm/1TYn8H9Gr6qi+5NIatPdvs66T/H5ny74GUQJgDS8UfNZqB29qS2POosQ=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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.


Attachment: xen-qemudm-modemcontrol.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.