[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] ns16550: misc minor adjustments
>>> On 12.11.15 at 12:07, <ian.campbell@xxxxxxxxxx> wrote: > On Thu, 2015-11-12 at 03:31 -0700, Jan Beulich wrote: >> --- a/docs/misc/xen-command-line.markdown >> +++ b/docs/misc/xen-command-line.markdown >> @@ -277,13 +277,13 @@ Flag to indicate whether to probe for a >> ACPI indicating none to be there. >> >> ### com1,com2 >> -> `= <baud>[/<clock_hz>][,[DPS][,[<io-base>|pci|amt][,[<irq>][,[<port- >> bdf>][,[<bridge-bdf>]]]]]]` >> +> `= <baud>[/<base_baud>][,[DPS][,[<io-base>|pci|amt][,[<irq>][,[<port- >> bdf>][,[<bridge-bdf>]]]]]]` >> >> Both option `com1` and `com2` follow the same format. >> >> * `<baud>` may be either an integer baud rate, or the string `auto` if >> the bootloader or other earlier firmware has already set it up. >> -* Optionally, a clock speed measured in hz can be specified. >> +* Optionally, the base baud rate can be specified. > > I do wonder if everyone trying to use this (which will include less-savy > users who are trying to produce a useful bug report by our request) will > know what this means? > > On the other hand I'm not exactly sure how to better describe it other than > as the "basic baud rate, i.e. the one you get with divisor == 1", which is > no more likely to enlighten anyone who didn't already know that. > > Is it true (enough) to say something like "typically the fastest baud rate > supported by the device"? Yes, I think so. >> @@ -530,7 +531,8 @@ static void ns16550_setup_preirq(struct >> /* Baud rate already set: read it out from the divisor latch. */ >> divisor = ns_read_reg(uart, UART_DLL); >> divisor |= ns_read_reg(uart, UART_DLM) << 8; >> - uart->baud = uart->clock_hz / (divisor << 4); >> + if ( divisor ) >> + uart->baud = uart->clock_hz / (divisor << 4); > > Will following code cope with uart->baud == BAUD_AUTO? Or should we pick a > static fallback rate (115200?) and set the divisor appropriately? The device won't work with it left as BAUD_AUTO. Setting a guessed baud rate alone won't help, as we'd then also have to write it into the respective registers. And I don't think anyway we should do any guessing here - if the command line option was wrong (regardless of whether due to using auto or just a wrong baud rate), communication won't work. All I think we should really care about is to not crash, the more in a way not diagnosable over serial console. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |