Re: [PATCH] PCI: Wrong register used to check pending traffic

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

 



On Mon, 2014-05-19 at 13:06 +1000, Gavin Shan wrote:
> The incorrect register offset is passed to pci_wait_for_pending(),
> which is caused by commit 157e876ffe ("PCI: Add pci_wait_for_pending()
> (refactor pci_wait_for_pending_transaction())").
> 
> Cc: Alex Williamson <alex.williamson@xxxxxxxxxx>
> Signed-off-by: Gavin Shan <gwshan@xxxxxxxxxxxxxxxxxx>
> ---
>  drivers/pci/pci.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 7325d43..759475e 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -3067,7 +3067,8 @@ int pci_wait_for_pending_transaction(struct pci_dev *dev)
>  	if (!pci_is_pcie(dev))
>  		return 1;
>  
> -	return pci_wait_for_pending(dev, PCI_EXP_DEVSTA, PCI_EXP_DEVSTA_TRPND);
> +	return pci_wait_for_pending(dev, pci_pcie_cap(dev) + PCI_EXP_DEVSTA,
> +				    PCI_EXP_DEVSTA_TRPND);
>  }
>  EXPORT_SYMBOL(pci_wait_for_pending_transaction);
>  
> @@ -3109,7 +3110,7 @@ static int pci_af_flr(struct pci_dev *dev, int probe)
>  		return 0;
>  
>  	/* Wait for Transaction Pending bit clean */
> -	if (pci_wait_for_pending(dev, PCI_AF_STATUS, PCI_AF_STATUS_TP))
> +	if (pci_wait_for_pending(dev, pos + PCI_AF_STATUS, PCI_AF_STATUS_TP))
>  		goto clear;
>  
>  	dev_err(&dev->dev, "transaction is not cleared; "

Acked-by: Alex Williamson <alex.williamson@xxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx> # v3.14+

--
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