aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2013-04-11 21:15:35 +0000
committerNavdeep Parhar <np@FreeBSD.org>2013-04-11 21:15:35 +0000
commit53e8e49dcff7e0613f0260b148188e989717651b (patch)
treee5dceed51d425ef96897955f7c3499dc67a26844
parentb4c19408e95090914f499a31b731a4b31ccb8a2d (diff)
downloadsrc-53e8e49dcff7e0613f0260b148188e989717651b.tar.gz
src-53e8e49dcff7e0613f0260b148188e989717651b.zip
There is no need for elaborate queries and error checking when trying to
set FW4MSG_ENCAP. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=249382
-rw-r--r--sys/dev/cxgbe/t4_main.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 58b2c451eb0b..74bfa51de53f 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -2480,27 +2480,13 @@ static int
set_params__post_init(struct adapter *sc)
{
uint32_t param, val;
- int rc;
+ /* ask for encapsulated CPLs */
param = FW_PARAM_PFVF(CPLFW4MSG_ENCAP);
- rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, &param, &val);
- if (rc == 0) {
- /* ask for encapsulated CPLs */
- param = FW_PARAM_PFVF(CPLFW4MSG_ENCAP);
- 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 parameter (post_init): %d.\n", rc);
- return (rc);
- }
- } else if (rc != FW_EINVAL) {
- device_printf(sc->dev,
- "failed to check for encapsulated CPLs: %d.\n", rc);
- } else
- rc = 0; /* the firmware doesn't support the param, no worries */
+ val = 1;
+ (void)t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &param, &val);
- return (rc);
+ return (0);
}
#undef FW_PARAM_PFVF