qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 2/2] pci: don't overwrite pci header type.


From: Isaku Yamahata
Subject: [Qemu-devel] Re: [PATCH 2/2] pci: don't overwrite pci header type.
Date: Wed, 16 Jun 2010 20:38:18 +0900
User-agent: Mutt/1.5.19 (2009-01-05)

On Wed, Jun 16, 2010 at 02:19:44PM +0300, Michael S. Tsirkin wrote:
> > > > Apb host bridge specifies PCI_HEADER_TYPE_BRIDGE in PCIDeviceInfo,
> > > > on the other hand pbc_pci_host_init() sets the register
> > > > to PCI_HEADER_TYPE_NORMAL.
> > > > To be honest I don't know why it does so, but that is what Blue wants.
> > > 
> > > BTW I think it would be prettier to have is_bridge instead of header_type
> > > as a qdev property. Agree?
> > 
> > The spec version 3.0 defines three header types.
> > 0:normal device, 1:pci-to-pci bridge, 2:card bus bridge
> > So I'd like the name a bit more generic than is_bridge.
> > Any suggestion?
> 
> Could we just have functions that set up header for
> each type, such as
> pci_init_normal_header()
> pci_init_p2p_bridge_header()
> pci_init_cardbus_header()

I see. You mean device specific initialization function should
call one of them. Then header_type property will be dropped.

I'll split pci p2p bridge related functions into a file
at first. Then introduce helper functions.
-- 
yamahata



reply via email to

[Prev in Thread] Current Thread [Next in Thread]