Re: [PATCH] PCI: fix SR-IOV function dependency link problem

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

 



On Wed, 20 May 2009 17:11:57 +0800
Yu Zhao <yu.zhao@xxxxxxxxx> wrote:

> PCIe root complex integrated endpoint does not implement ARI, so this
> kind of endpoint uses 3-bit function number. The function dependency
> link of the integrated endpoint should be calculated using the device
> number plus the value from function dependency link register.
> 
> Normal endpoint always implements ARI and the function dependency link
> register contains 8-bit function number (i.e. `devfn' from software's
> perspective).
> 
> Signed-off-by: Yu Zhao <yu.zhao@xxxxxxxxx>
> ---
>  drivers/pci/iov.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
> index b497daa..e87fe95 100644
> --- a/drivers/pci/iov.c
> +++ b/drivers/pci/iov.c
> @@ -487,6 +487,8 @@ found:
>  	iov->self = dev;
>  	pci_read_config_dword(dev, pos + PCI_SRIOV_CAP, &iov->cap);
>  	pci_read_config_byte(dev, pos + PCI_SRIOV_FUNC_LINK,
> &iov->link);
> +	if (dev->pcie_type == PCI_EXP_TYPE_RC_END)
> +		iov->link = PCI_DEVFN(PCI_SLOT(dev->devfn),
> iov->link); 
>  	if (pdev)
>  		iov->dev = pci_dev_get(pdev);

Applied to my linux-next branch, thanks Yu.

-- 
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux