From: Konrad Rzeszutek Wilk <konrad@kernel.org>
To: andrew.cooper3@citrix.com, aravind.gopalakrishnan@amd.com,
xen-devel@lists.xenproject.org, jbeulich@suse.com, keir@xen.org
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com>,
Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Subject: [PATCH v3 1/6] serial: Skip over PCIe device which have no quirks (fix AMT regression).
Date: Wed, 12 Mar 2014 11:27:47 -0400 [thread overview]
Message-ID: <1394638072-11331-2-git-send-email-konrad.wilk@oracle.com> (raw)
In-Reply-To: <1394638072-11331-1-git-send-email-konrad.wilk@oracle.com>
The "ns16550: Add support for UART present in Broadcom TruManage
capable NetXtreme chips" implies that only devices that are have
an MMIO BAR and are in the quirks table should be processed.
Even the comment at the end says so:
If we have an io_base, then we succeeded in the lookup
But the code was checking for the !io_base - which is to say if
the io_base was 0 then we would skip scanning. But io_base
always has a value - it is set by 'ns16550_init' to a default
value - so it would never hit the 'continue' path.
This means that if we have an communication device followed by
a serial AMT device we would pick the communication device instead
of the AMT device.
See:
00:16.0 Communication controller: Intel Corporation Cougar Point HECI Controller #1 (rev 04)
Subsystem: Intel Corporation Device 2008
Flags: bus master, fast devsel, latency 0, IRQ 11
Memory at fb12a000 (64-bit, non-prefetchable) [size=16]
00:16.3 Serial controller: Intel Corporation Cougar Point KT Controller (rev 04) (prog-if 02 [16550])
Subsystem: Intel Corporation Device 2008
Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 17
I/O ports at f0e0 [size=8]
Memory at fb129000 (32-bit, non-prefetchable) [size=4K]
pci 0000:00:16.0: [8086:1c3a] type 00 class 0x078000
pci 0000:00:16.3: [8086:1c3d] type 00 class 0x070002
And Xen picks 00:16.0 as its console when using 'com1=115200,8n1,amt'.
This patch fixes it and allows us to use AMT again by zeroing
out io_base to zero. If the scan did not work, the io_base is
set back to a default value (the 'pci_uart_config' does that
already at its end).
Tested-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
CC: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
CC: Thomas Lendacky <Thomas.Lendacky@amd.com>
CC: Keir Fraser <keir@xen.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
xen/drivers/char/ns16550.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 53e49a1..2fded08 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -616,6 +616,7 @@ pci_uart_config (struct ns16550 *uart, int skip_amt, int bar_idx)
unsigned int b, d, f, nextf, i;
u16 vendor, device;
+ uart->io_base = 0;
/* NB. Start at bus 1 to avoid AMT: a plug-in card cannot be on bus 0. */
for ( b = skip_amt ? 1 : 0; b < 0x100; b++ )
{
--
1.7.7.6
next prev parent reply other threads:[~2014-03-12 15:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 15:27 [PATCH v3]/[GIT PULL] Enable serial output for Oxford Semiconductor PCIe cards and fix bugs Konrad Rzeszutek Wilk
2014-03-12 15:27 ` Konrad Rzeszutek Wilk [this message]
2014-03-12 15:27 ` [PATCH v3 2/6] serial: Fix COM1 assumption if pci_uart_config did not find the AMT card Konrad Rzeszutek Wilk
2014-03-12 15:27 ` [PATCH v3 3/6] serial: Support OXPCIe952 aka Oxford Semiconductor Ltd Device c138 (1415:c138) Konrad Rzeszutek Wilk
2014-03-12 15:27 ` [PATCH v3 4/6] serial: Seperate the PCI device ids and parameters (v1) Konrad Rzeszutek Wilk
2014-03-12 15:27 ` [PATCH v3 5/6] pci: Use #defines for PCI vendors Konrad Rzeszutek Wilk
2014-03-12 15:27 ` [PATCH v3 6/6] serial: Expand the PCI serial quirks for OXPCIe200 and OXPCIe952 1 Native UART Konrad Rzeszutek Wilk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394638072-11331-2-git-send-email-konrad.wilk@oracle.com \
--to=konrad@kernel.org \
--cc=Suravee.Suthikulpanit@amd.com \
--cc=Thomas.Lendacky@amd.com \
--cc=andrew.cooper3@citrix.com \
--cc=aravind.gopalakrishnan@amd.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).