[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 00/25] pci: various pci clean up and pci express
From: |
Isaku Yamahata |
Subject: |
Re: [Qemu-devel] [PATCH 00/25] pci: various pci clean up and pci express support. V2 |
Date: |
Sat, 3 Oct 2009 04:30:57 +0900 |
User-agent: |
Mutt/1.5.6i |
Thank you for testing.
Does the following patch helps?
diff --git a/hw/pci.c b/hw/pci.c
index 24aaba0..d562410 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -812,10 +812,15 @@ static uint32_t pci_data_read_common(PCIDevice *pci_dev,
static inline PCIDevice *pci_addr_to_dev(PCIBus *bus, uint32_t addr)
{
- int bus_num = (addr >> 16) & 0xff;
- unsigned int devfn = (addr >> 8) & 0xff;
+ uint8_t bus_num = (addr >> 16) & 0xff;
+ uint8_t devfn = (addr >> 8) & 0xff;
+ PCIBus *s = pci_find_bus(bus, bus_num);
- return pci_find_device(bus, bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn));
+ if (!s) {
+ return NULL;
+ }
+
+ return pci_find_device(s, bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn));
}
static inline uint32_t pci_addr_to_config(uint32_t addr)
--
1.6.0.2
On Fri, Oct 02, 2009 at 03:42:09PM +0200, Gerd Hoffmann wrote:
> >sparc64 segfaults with this series applied (it is the only system
> >emulation using pci bridges right now).
>
> ppc is broken too. I get this on the serial line:
>
> >> Cannot manage 'ethernet controller' PCI device type 'network':
> >> 10ec 8139 (2 0 0)
>
> and the system hangs somewhere in the prom code.
>
> For the record: x86_64 works fine.
>
> cheers,
> Gerd
>
>
--
yamahata
- [Qemu-devel] [PATCH 01/25] pci: fix PCI_DPRINTF() wrt variadic macro., (continued)
- [Qemu-devel] [PATCH 01/25] pci: fix PCI_DPRINTF() wrt variadic macro., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 09/25] pci: introduce pcibus_t to represent pci bus address/size instead of uint32_t, Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 06/25] pci: define a constant to represent a unmapped bar and use it., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 17/25] pci: fix pci_default_write_config(), Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 05/25] pci: use PCI_SLOT() and PCI_FUNC()., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 04/25] pci: use the symbolic constant, PCI_ROM_ADDRESS_ENABLE instead of 1., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 16/25] pci: pcie host and mmcfg support., Isaku Yamahata, 2009/10/02
- Re: [Qemu-devel] [PATCH 00/25] pci: various pci clean up and pci express support. V2, Gerd Hoffmann, 2009/10/02