All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Le Tan <tamlokveer@gmail.com>
Cc: aik@ozlabs.ru, jan.kiszka@web.de, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pci: assign devfn to pci_dev before calling pci_device_iommu_address_space()
Date: Wed, 2 Jul 2014 09:29:54 +0300	[thread overview]
Message-ID: <20140702062954.GI3773@redhat.com> (raw)
In-Reply-To: <1404259595-21680-1-git-send-email-tamlokveer@gmail.com>

On Wed, Jul 02, 2014 at 08:06:35AM +0800, Le Tan wrote:
> In function do_pci_register_device() in file hw/pci/pci.c, move the assignment
> of pci_dev->devfn to the position before the call to
> pci_device_iommu_address_space(pci_dev) which will use the value of
> pci_dev->devfn.

Thanks, applied

Fixes: 9eda7d373e9c691c070eddcbe3467b991f67f6bd
    pci: Introduce helper to retrieve a PCI device's DMA address space

Cc: qemu-stable@nongnu.org

> Signed-off-by: Le Tan <tamlokveer@gmail.com>
> ---
>  hw/pci/pci.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index 17ed510..351d320 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -827,6 +827,7 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
>      }
>  
>      pci_dev->bus = bus;
> +    pci_dev->devfn = devfn;
>      dma_as = pci_device_iommu_address_space(pci_dev);
>  
>      memory_region_init_alias(&pci_dev->bus_master_enable_region,
> @@ -836,7 +837,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
>      address_space_init(&pci_dev->bus_master_as, &pci_dev->bus_master_enable_region,
>                         name);
>  
> -    pci_dev->devfn = devfn;
>      pstrcpy(pci_dev->name, sizeof(pci_dev->name), name);
>      pci_dev->irq_state = 0;
>      pci_config_alloc(pci_dev);
> -- 
> 1.7.9.5

      reply	other threads:[~2014-07-02  7:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02  0:06 [Qemu-devel] [PATCH] pci: assign devfn to pci_dev before calling pci_device_iommu_address_space() Le Tan
2014-07-02  6:29 ` Michael S. Tsirkin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140702062954.GI3773@redhat.com \
    --to=mst@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=jan.kiszka@web.de \
    --cc=qemu-devel@nongnu.org \
    --cc=tamlokveer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.