17854f1c81
25833-32on64-bogus-pt_base-adjust.patch 25835-adjust-rcu-lock-domain.patch 25836-VT-d-S3-MSI-resume.patch 25850-tmem-xsa-15-1.patch 25851-tmem-xsa-15-2.patch 25852-tmem-xsa-15-3.patch 25853-tmem-xsa-15-4.patch 25854-tmem-xsa-15-5.patch 25855-tmem-xsa-15-6.patch 25856-tmem-xsa-15-7.patch 25857-tmem-xsa-15-8.patch 25858-tmem-xsa-15-9.patch 25859-tmem-missing-break.patch 25860-tmem-cleanup.patch 25861-x86-early-fixmap.patch 25862-sercon-non-com.patch 25863-sercon-ehci-dbgp.patch 25864-sercon-unused.patch 25866-sercon-ns16550-pci-irq.patch 25867-sercon-ns16550-parse.patch 25874-x86-EFI-chain-cfg.patch 25909-xenpm-consistent.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=201
101 lines
3.0 KiB
Diff
101 lines
3.0 KiB
Diff
# HG changeset patch
|
|
# User Jan Beulich <jbeulich@suse.com>
|
|
# Date 1347371805 -7200
|
|
# Node ID b22f184e1a3cac03abeed92ec4b74235fd0881f4
|
|
# Parent ee12dc357fbecbb0517798f395d14bf1764c6766
|
|
ns16550: command line parsing adjustments
|
|
|
|
Allow intermediate parts of the command line options to be absent
|
|
(expressed by two immediately succeeding commas).
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Acked-by: Keir Fraser <keir@xen.org>
|
|
|
|
--- a/docs/misc/xen-command-line.markdown
|
|
+++ b/docs/misc/xen-command-line.markdown
|
|
@@ -199,7 +199,7 @@ If set, override Xen's calculation of th
|
|
If set, override Xen's default choice for the platform timer.
|
|
|
|
### com1,com2
|
|
-> `= <baud>[/<clock_hz>][,DPS[,<io-base>[,<irq>[,<port-bdf>[,<bridge-bdf>]]]] | pci | amt ] `
|
|
+> `= <baud>[/<clock_hz>][,[DPS][,[<io-base>|pci|amt][,[<irq>][,[<port-bdf>][,[<bridge-bdf>]]]]]]`
|
|
|
|
Both option `com1` and `com2` follow the same format.
|
|
|
|
--- a/xen/drivers/char/ns16550.c
|
|
+++ b/xen/drivers/char/ns16550.c
|
|
@@ -536,26 +536,23 @@ static void __init ns16550_parse_port_co
|
|
else if ( (baud = simple_strtoul(conf, &conf, 10)) != 0 )
|
|
uart->baud = baud;
|
|
|
|
- if ( *conf == '/')
|
|
+ if ( *conf == '/' )
|
|
{
|
|
conf++;
|
|
uart->clock_hz = simple_strtoul(conf, &conf, 0) << 4;
|
|
}
|
|
|
|
- if ( *conf != ',' )
|
|
- goto config_parsed;
|
|
- conf++;
|
|
-
|
|
- uart->data_bits = simple_strtoul(conf, &conf, 10);
|
|
+ if ( *conf == ',' && *++conf != ',' )
|
|
+ {
|
|
+ uart->data_bits = simple_strtoul(conf, &conf, 10);
|
|
|
|
- uart->parity = parse_parity_char(*conf);
|
|
- conf++;
|
|
+ uart->parity = parse_parity_char(*conf);
|
|
|
|
- uart->stop_bits = simple_strtoul(conf, &conf, 10);
|
|
+ uart->stop_bits = simple_strtoul(conf + 1, &conf, 10);
|
|
+ }
|
|
|
|
- if ( *conf == ',' )
|
|
+ if ( *conf == ',' && *++conf != ',' )
|
|
{
|
|
- conf++;
|
|
if ( strncmp(conf, "pci", 3) == 0 )
|
|
{
|
|
if ( pci_uart_config(uart, 1/* skip AMT */, uart - ns16550_com) )
|
|
@@ -572,24 +569,21 @@ static void __init ns16550_parse_port_co
|
|
{
|
|
uart->io_base = simple_strtoul(conf, &conf, 0);
|
|
}
|
|
+ }
|
|
|
|
- if ( *conf == ',' )
|
|
- {
|
|
- conf++;
|
|
- uart->irq = simple_strtoul(conf, &conf, 10);
|
|
- if ( *conf == ',' )
|
|
- {
|
|
- conf++;
|
|
- uart->ps_bdf_enable = 1;
|
|
- parse_pci_bdf(&conf, &uart->ps_bdf[0]);
|
|
- if ( *conf == ',' )
|
|
- {
|
|
- conf++;
|
|
- uart->pb_bdf_enable = 1;
|
|
- parse_pci_bdf(&conf, &uart->pb_bdf[0]);
|
|
- }
|
|
- }
|
|
- }
|
|
+ if ( *conf == ',' && *++conf != ',' )
|
|
+ uart->irq = simple_strtol(conf, &conf, 10);
|
|
+
|
|
+ if ( *conf == ',' && *++conf != ',' )
|
|
+ {
|
|
+ uart->ps_bdf_enable = 1;
|
|
+ parse_pci_bdf(&conf, &uart->ps_bdf[0]);
|
|
+ }
|
|
+
|
|
+ if ( *conf == ',' && *++conf != ',' )
|
|
+ {
|
|
+ uart->pb_bdf_enable = 1;
|
|
+ parse_pci_bdf(&conf, &uart->pb_bdf[0]);
|
|
}
|
|
|
|
config_parsed:
|