git: b913bd160626 - stable/14 - cxgbev(4): Use the correct source pf for T6 in the VF driver.

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Tue, 02 Jul 2024 08:06:18 UTC
The branch stable/14 has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=b913bd160626d8837e9623665eaa53feaca0c0c2

commit b913bd160626d8837e9623665eaa53feaca0c0c2
Author:     Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2024-06-16 18:27:15 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2024-07-01 16:07:39 +0000

    cxgbev(4): Use the correct source pf for T6 in the VF driver.
    
    MFC after:      1 week
    Sponsored by:   Chelsio Communications
    
    (cherry picked from commit d0fdafdb0ef4ec9c5c66f39daf2eca926f14be0d)
---
 sys/dev/cxgbe/common/t4vf_hw.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys/dev/cxgbe/common/t4vf_hw.c b/sys/dev/cxgbe/common/t4vf_hw.c
index 25ab3db77c72..a0c2eb5f60b3 100644
--- a/sys/dev/cxgbe/common/t4vf_hw.c
+++ b/sys/dev/cxgbe/common/t4vf_hw.c
@@ -139,7 +139,10 @@ int t4vf_get_sge_params(struct adapter *adapter)
 	 * This is based on the PF from which we're instantiated.
 	 */
 	whoami = t4_read_reg(adapter, VF_PL_REG(A_PL_VF_WHOAMI));
-	pf = G_SOURCEPF(whoami);
+	if (chip_id(adapter) <= CHELSIO_T5)
+		pf = G_SOURCEPF(whoami);
+	else
+		pf = G_T6_SOURCEPF(whoami);
 
 	s_hps = (S_HOSTPAGESIZEPF0 +
 	    (S_HOSTPAGESIZEPF1 - S_HOSTPAGESIZEPF0) * pf);