[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH v4 4/6] pci: don't overwrite multi functio bit i
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] Re: [PATCH v4 4/6] pci: don't overwrite multi functio bit in pci header type. |
Date: |
Mon, 21 Jun 2010 16:15:58 +0300 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Mon, Jun 21, 2010 at 03:03:59PM +0900, Isaku Yamahata wrote:
> diff --git a/hw/piix4.c b/hw/piix4.c
> index f75951b..03926a7 100644
> --- a/hw/piix4.c
> +++ b/hw/piix4.c
> @@ -93,8 +93,7 @@ static int piix4_initfn(PCIDevice *d)
> pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL);
> pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82371AB_0); //
> 82371AB/EB/MB PIIX4 PCI-to-ISA bridge
> pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_ISA);
> - pci_conf[PCI_HEADER_TYPE] =
> - PCI_HEADER_TYPE_NORMAL | PCI_HEADER_TYPE_MULTI_FUNCTION; //
> header_type = PCI_multifunction, generic
> + pci_conf[PCI_HEADER_TYPE] |= PCI_HEADER_TYPE_MULTI_FUNCTION;
>
IMO it's cleaner not to change the same line twice.
Just move this bit to the next patch.
> piix4_dev = d;
> qemu_register_reset(piix4_reset, d);
> diff --git a/hw/piix_pci.c b/hw/piix_pci.c
> index 16645cd..0b0c92b 100644
> --- a/hw/piix_pci.c
> +++ b/hw/piix_pci.c
> @@ -208,7 +208,6 @@ static int i440fx_initfn(PCIDevice *dev)
> pci_config_set_device_id(d->dev.config, PCI_DEVICE_ID_INTEL_82441);
> d->dev.config[0x08] = 0x02; // revision
> pci_config_set_class(d->dev.config, PCI_CLASS_BRIDGE_HOST);
> - d->dev.config[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; // header_type
>
> d->dev.config[I440FX_SMRAM] = 0x02;
>
> @@ -337,8 +336,7 @@ static int piix3_initfn(PCIDevice *dev)
> pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL);
> pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82371SB_0); //
> 82371SB PIIX3 PCI-to-ISA bridge (Step A1)
> pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_ISA);
> - pci_conf[PCI_HEADER_TYPE] =
> - PCI_HEADER_TYPE_NORMAL | PCI_HEADER_TYPE_MULTI_FUNCTION; //
> header_type = PCI_multifunction, generic
> + pci_conf[PCI_HEADER_TYPE] |= PCI_HEADER_TYPE_MULTI_FUNCTION;
>
same here
- [Qemu-devel] [PATCH v4 0/6] pci: multi-function bit fixes, Isaku Yamahata, 2010/06/21
- [Qemu-devel] [PATCH v4 6/6] pci_bridge: make pci bridge aware of pci multi function bit., Isaku Yamahata, 2010/06/21
- [Qemu-devel] [PATCH v4 5/6] pci: use pci_create_simple_mf(), Isaku Yamahata, 2010/06/21
- [Qemu-devel] [PATCH v4 2/6] pci: remove PCIDeviceInfo::header_type, Isaku Yamahata, 2010/06/21
- [Qemu-devel] [PATCH v4 4/6] pci: don't overwrite multi functio bit in pci header type., Isaku Yamahata, 2010/06/21
- [Qemu-devel] Re: [PATCH v4 4/6] pci: don't overwrite multi functio bit in pci header type.,
Michael S. Tsirkin <=
- [Qemu-devel] [PATCH v4 3/6] pci: set PCI multi-function bit appropriately., Isaku Yamahata, 2010/06/21
- [Qemu-devel] Re: [PATCH v4 3/6] pci: set PCI multi-function bit appropriately., Juan Quintela, 2010/06/21
- [Qemu-devel] Re: [PATCH v4 3/6] pci: set PCI multi-function bit appropriately., Michael S. Tsirkin, 2010/06/21
- Re: [Qemu-devel] Re: [PATCH v4 3/6] pci: set PCI multi-function bit appropriately., Isaku Yamahata, 2010/06/23
- Re: [Qemu-devel] Re: [PATCH v4 3/6] pci: set PCI multi-function bit appropriately., Michael S. Tsirkin, 2010/06/23
- Re: [Qemu-devel] Re: [PATCH v4 3/6] pci: set PCI multi-function bit appropriately., Isaku Yamahata, 2010/06/23
- Re: [Qemu-devel] Re: [PATCH v4 3/6] pci: set PCI multi-function bit appropriately., Michael S. Tsirkin, 2010/06/23
- Re: [Qemu-devel] Re: [PATCH v4 3/6] pci: set PCI multi-function bit appropriately., Isaku Yamahata, 2010/06/23
- Re: [Qemu-devel] Re: [PATCH v4 3/6] pci: set PCI multi-function bit appropriately., Michael S. Tsirkin, 2010/06/24