Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Apr 2013 21:15:36 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r249382 - head/sys/dev/cxgbe
Message-ID:  <201304112115.r3BLFaSv017997@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Thu Apr 11 21:15:35 2013
New Revision: 249382
URL: http://svnweb.freebsd.org/changeset/base/249382

Log:
  There is no need for elaborate queries and error checking when trying to
  set FW4MSG_ENCAP.
  
  MFC after:	3 days

Modified:
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c	Thu Apr 11 20:15:37 2013	(r249381)
+++ head/sys/dev/cxgbe/t4_main.c	Thu Apr 11 21:15:35 2013	(r249382)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304112115.r3BLFaSv017997>