From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aravind Gopalakrishnan Subject: Re: [PATCH] serial: Skip over PCIe device which have no quirks (fix AMT regression). Date: Wed, 5 Mar 2014 16:46:40 -0600 Message-ID: <5317A950.7040103@amd.com> References: <1394048739-3697-1-git-send-email-konrad.wilk@oracle.com> <20140305195657.GA11501@phenom.dumpdata.com> <20140305210950.GB11758@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WLKae-0006pl-Rt for xen-devel@lists.xenproject.org; Wed, 05 Mar 2014 22:47:05 +0000 In-Reply-To: <20140305210950.GB11758@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk , Konrad Rzeszutek Wilk Cc: "xen-devel@lists.xenproject.org" , Keir Fraser , Jan Beulich , "Suthikulpanit, Suravee" , "Lendacky, Thomas" List-Id: xen-devel@lists.xenproject.org On 3/5/2014 3:09 PM, Konrad Rzeszutek Wilk wrote: > 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. If you provide 'amt' on command line => 'skip_amt' = 0 Then we'd just return -1 without setting io_base to 0x3f8 due to this condition- if ( !skip_amt ) return -1; (or am I missing something?) > > diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c > index 487bf7d..9f87018 100644 > --- a/xen/drivers/char/ns16550.c > +++ b/xen/drivers/char/ns16550.c > @@ -829,6 +829,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; Why not set ns16550.io_base = 0; in arch/x86/setup.c ? AFAICT, ns16550.c is the only one that uses ns16550_defaults structure, so it should be safe.. Thanks, -Aravind.