diff mbox series

PCI/TPH: Restore TPH Requester Enable correctly

Message ID 13118098116d7bce07aa20b8c52e28c7d1847246.1738759933.git.robin.murphy@arm.com (mailing list archive)
State Accepted
Commit 9e2211c9425fc8f987b36f0d6505e9af1bce9c74
Headers show
Series PCI/TPH: Restore TPH Requester Enable correctly | expand

Commit Message

Robin Murphy Feb. 5, 2025, 12:52 p.m. UTC
When we reenable TPH after changing a Steering Tag value, we need the
actual TPH Requester Enable value, not the ST Mode (which only happens
to work out by chance for non-extended TPH in interrupt vector mode).

Fixes: d2e8a34876ce ("PCI/TPH: Add Steering Tag support")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
Spotted by inspection.
---
 drivers/pci/tph.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Wei Huang Feb. 6, 2025, 4:05 p.m. UTC | #1
On 2/5/25 6:52 AM, Robin Murphy wrote:
> When we reenable TPH after changing a Steering Tag value, we need the
> actual TPH Requester Enable value, not the ST Mode (which only happens
> to work out by chance for non-extended TPH in interrupt vector mode).
> 
> Fixes: d2e8a34876ce ("PCI/TPH: Add Steering Tag support")
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>

Reviewed-by: Wei Huang <wei.huang2@amd.com>

> ---
> Spotted by inspection.
> ---
>   drivers/pci/tph.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/tph.c b/drivers/pci/tph.c
> index 1e604fbbda65..07de59ca2ebf 100644
> --- a/drivers/pci/tph.c
> +++ b/drivers/pci/tph.c
> @@ -360,7 +360,7 @@ int pcie_tph_set_st_entry(struct pci_dev *pdev, unsigned int index, u16 tag)
>   		return err;
>   	}
>   
> -	set_ctrl_reg_req_en(pdev, pdev->tph_mode);
> +	set_ctrl_reg_req_en(pdev, pdev->tph_req_type);

Per prior discussion, this register needs to be set with tph_req_type.

>   
>   	pci_dbg(pdev, "set steering tag: %s table, index=%d, tag=%#04x\n",
>   		(loc == PCI_TPH_LOC_MSIX) ? "MSI-X" : "ST", index, tag);
diff mbox series

Patch

diff --git a/drivers/pci/tph.c b/drivers/pci/tph.c
index 1e604fbbda65..07de59ca2ebf 100644
--- a/drivers/pci/tph.c
+++ b/drivers/pci/tph.c
@@ -360,7 +360,7 @@  int pcie_tph_set_st_entry(struct pci_dev *pdev, unsigned int index, u16 tag)
 		return err;
 	}
 
-	set_ctrl_reg_req_en(pdev, pdev->tph_mode);
+	set_ctrl_reg_req_en(pdev, pdev->tph_req_type);
 
 	pci_dbg(pdev, "set steering tag: %s table, index=%d, tag=%#04x\n",
 		(loc == PCI_TPH_LOC_MSIX) ? "MSI-X" : "ST", index, tag);