Received: from eggs.gnu.org ([2001:4830:134:3::10]:38654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOWME-00041o-Jn for qemu-devel@nongnu.org; Fri, 14 Mar 2014 13:57:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOWM8-00031k-5O for qemu-devel@nongnu.org; Fri, 14 Mar 2014 13:57:22 -0400 Date: Fri, 14 Mar 2014 18:57:14 +0100 (CET) From: BALATON Zoltan In-Reply-To: Message-ID: References: <20140227011300.8CD451983B@mono.eik.bme.hu> <53232C8C.3070403@msgid.tls.msk.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] serial-pci: Set prog interface field of pci config to 16550 compatible List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: qemu-trivial@nongnu.org, Gerd Hoffmann , qemu-devel@nongnu.org On Fri, 14 Mar 2014, BALATON Zoltan wrote: > On Fri, 14 Mar 2014, Michael Tokarev wrote: >> 10.03.2014 22:40, BALATON Zoltan wrote: >>> Ping! >>> http://patchwork.ozlabs.org/patch/324674/ >>> >>> On Thu, 27 Feb 2014, BALATON Zoltan wrote: >>>> Signed-off-by: BALATON Zoltan >>>> --- >>>> hw/char/serial-pci.c | 1 + >>>> 1 file changed, 1 insertion(+) >>>> >>>> diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c >>>> index 991c99f..e662b77 100644 >>>> --- a/hw/char/serial-pci.c >>>> +++ b/hw/char/serial-pci.c >>>> @@ -60,6 +60,7 @@ static int serial_pci_init(PCIDevice *dev) >>>> return -1; >>>> } >>>> >>>> + pci->dev.config[PCI_CLASS_PROG] = 0x02; /* 16550 compatible */ >>>> pci->dev.config[PCI_INTERRUPT_PIN] = 0x01; >>>> s->irq = pci_allocate_irq(&pci->dev); >> >> Hm. While this is an one-liner indeed, I'm not sure it's the right >> value. From my pci.ids: >> >> C 07 Communication controller >> 00 Serial controller >> 00 8250 >> 01 16450 >> 02 16550 >> 03 16650 >> 04 16750 >> 05 16850 >> 06 16950 >> >> so it seems correct thing to do. >> >> What about multi_serial_pci_init() -- should it too set prog-if >> like this? > > I'm not completely sure what the correct value should be for > multi_serial_pci_init so I've left that alone. There's also 07 02 00 that > means multiport serial controller that might apply for that case. For the > simple case I've sent the patch for I had a client expecting this value so I > think it is correct for that at least but I don't know about the multiport > case. Also Gerd Hoffmann said he has picked this patch up so I'm adding him to cc too. > Regards, > BALATON Zoltan