git: 169e94c41e23 - main - cxgbe(4): Add support for PPOD_EDRAM feature.

From: Navdeep Parhar <np_at_FreeBSD.org>
Date: Thu, 14 Apr 2022 22:45:42 UTC
The branch main has been updated by np:

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

commit 169e94c41e235191014503de06915b0c1b60db91
Author:     Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2022-04-14 22:43:32 +0000
Commit:     Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2022-04-14 22:43:32 +0000

    cxgbe(4): Add support for PPOD_EDRAM feature.
    
    The driver queries the firmware to find out if it supports this feature
    and enables it if it does. The firmware moves the iSCSI page pod region
    to a lower address so that some of it is located in the faster on-chip
    memory instead of external DDR.
    
    Reviewed by:    jhb@
    MFC after:      3 weeks
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D34895
---
 sys/dev/cxgbe/t4_main.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index b4069119c167..fa9576308ee5 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -5097,6 +5097,17 @@ set_params__pre_init(struct adapter *sc)
 			    "failed to enable high priority filters :%d.\n",
 			    rc);
 		}
+
+		param = FW_PARAM_DEV(PPOD_EDRAM);
+		rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, &param, &val);
+		if (rc == 0 && val == 1) {
+			rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &param,
+			    &val);
+			if (rc != 0) {
+				device_printf(sc->dev,
+				    "failed to set PPOD_EDRAM: %d.\n", rc);
+			}
+		}
 	}
 
 	/* Enable opaque VIIDs with firmwares that support it. */