Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Apr 2011 00:40:24 +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: r220232 - in head/sys/dev/cxgbe: . common
Message-ID:  <201104010040.p310ePWM027405@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Fri Apr  1 00:40:24 2011
New Revision: 220232
URL: http://svn.freebsd.org/changeset/base/220232

Log:
  Update header and related code for firmware 1.3.8
  
  MFC after:	3 days

Modified:
  head/sys/dev/cxgbe/common/common.h
  head/sys/dev/cxgbe/common/t4fw_interface.h
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/common/common.h
==============================================================================
--- head/sys/dev/cxgbe/common/common.h	Fri Apr  1 00:25:32 2011	(r220231)
+++ head/sys/dev/cxgbe/common/common.h	Fri Apr  1 00:40:24 2011	(r220232)
@@ -54,7 +54,7 @@ enum {
 
 #define FW_VERSION_MAJOR 1
 #define FW_VERSION_MINOR 3
-#define FW_VERSION_MICRO 0
+#define FW_VERSION_MICRO 8
 
 struct port_stats {
 	u64 tx_octets;            /* total # of octets in good frames */

Modified: head/sys/dev/cxgbe/common/t4fw_interface.h
==============================================================================
--- head/sys/dev/cxgbe/common/t4fw_interface.h	Fri Apr  1 00:25:32 2011	(r220231)
+++ head/sys/dev/cxgbe/common/t4fw_interface.h	Fri Apr  1 00:40:24 2011	(r220232)
@@ -47,7 +47,7 @@ enum fw_retval {
 	FW_ENOSYS		= 38,	/* functionality not implemented */
 	FW_EPROTO		= 71,	/* protocol error */
 	FW_ETIMEDOUT		= 110,	/* timeout */
-	FW_TIMEDOUT		= 110,	/* timeout */
+	FW_EINPROGRESS		= 115,	/* fw internal */
 	FW_SCSI_ABORT_REQUESTED	= 128,	/* */
 	FW_SCSI_ABORT_TIMEDOUT	= 129,	/* */
 	FW_SCSI_ABORTED		= 130,	/* */
@@ -3934,13 +3934,11 @@ enum fw_port_cap {
 	FW_PORT_CAP_FC_RX		= 0x0040,
 	FW_PORT_CAP_FC_TX		= 0x0080,
 	FW_PORT_CAP_ANEG		= 0x0100,
-	FW_PORT_CAP_MDI_0		= 0x0200,
-	FW_PORT_CAP_MDI_1		= 0x0400,
-	FW_PORT_CAP_BEAN		= 0x0800,
-	FW_PORT_CAP_PMA_LPBK		= 0x1000,
-	FW_PORT_CAP_PCS_LPBK		= 0x2000,
-	FW_PORT_CAP_PHYXS_LPBK		= 0x4000,
-	FW_PORT_CAP_FAR_END_LPBK	= 0x8000,
+	FW_PORT_CAP_MDIX		= 0x0200,
+	FW_PORT_CAP_MDIAUTO		= 0x0400,
+	FW_PORT_CAP_FEC			= 0x0800,
+	FW_PORT_CAP_TECHKR		= 0x1000,
+	FW_PORT_CAP_TECHKX4		= 0x2000,
 };
 
 #define S_FW_PORT_CAP_SPEED	0
@@ -3955,6 +3953,12 @@ enum fw_port_cap {
 #define G_FW_PORT_CAP_FC(x) \
     (((x) >> S_FW_PORT_CAP_FC) & M_FW_PORT_CAP_FC)
 
+#define S_FW_PORT_CAP_ANEG	8
+#define M_FW_PORT_CAP_ANEG	0x1
+#define V_FW_PORT_CAP_ANEG(x)	((x) << S_FW_PORT_CAP_ANEG)
+#define G_FW_PORT_CAP_ANEG(x) \
+    (((x) >> S_FW_PORT_CAP_ANEG) & M_FW_PORT_CAP_ANEG)
+
 enum fw_port_mdi {
 	FW_PORT_CAP_MDI_UNCHANGED,
 	FW_PORT_CAP_MDI_AUTO,
@@ -4253,16 +4257,16 @@ enum fw_port_type {
 /* These are read from module's EEPROM and determined once the
    module is inserted. */
 enum fw_port_module_type {
-	FW_PORT_MOD_TYPE_NA,
-	FW_PORT_MOD_TYPE_LR = 0x1,
-	FW_PORT_MOD_TYPE_SR = 0x2,
-	FW_PORT_MOD_TYPE_ER = 0x3,
-	FW_PORT_MOD_TYPE_TWINAX_PASSIVE = 0x4,
-	FW_PORT_MOD_TYPE_TWINAX_ACTIVE = 0x5,
-
-	FW_PORT_MOD_TYPE_LRM = 0x6,
-
-	FW_PORT_MOD_TYPE_NONE = M_FW_PORT_CMD_MODTYPE
+	FW_PORT_MOD_TYPE_NA		= 0x0,
+	FW_PORT_MOD_TYPE_LR		= 0x1,
+	FW_PORT_MOD_TYPE_SR		= 0x2,
+	FW_PORT_MOD_TYPE_ER		= 0x3,
+	FW_PORT_MOD_TYPE_TWINAX_PASSIVE	= 0x4,
+	FW_PORT_MOD_TYPE_TWINAX_ACTIVE	= 0x5,
+	FW_PORT_MOD_TYPE_LRM		= 0x6,
+	FW_PORT_MOD_TYPE_UNKNOWN	= M_FW_PORT_CMD_MODTYPE - 2,
+	FW_PORT_MOD_TYPE_NOTSUPPORTED	= M_FW_PORT_CMD_MODTYPE - 1,
+	FW_PORT_MOD_TYPE_NONE		= M_FW_PORT_CMD_MODTYPE
 };
 
 /* used by FW and tools may use this to generate VPD */

Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c	Fri Apr  1 00:25:32 2011	(r220231)
+++ head/sys/dev/cxgbe/t4_main.c	Fri Apr  1 00:40:24 2011	(r220232)
@@ -2748,11 +2748,15 @@ t4_os_portmod_changed(const struct adapt
 {
 	struct port_info *pi = sc->port[idx];
 	static const char *mod_str[] = {
-		NULL, "LR", "SR", "ER", "TWINAX", "active TWINAX"
+		NULL, "LR", "SR", "ER", "TWINAX", "active TWINAX", "LRM"
 	};
 
 	if (pi->mod_type == FW_PORT_MOD_TYPE_NONE)
 		if_printf(pi->ifp, "transceiver unplugged.\n");
+	else if (pi->mod_type == FW_PORT_MOD_TYPE_UNKNOWN)
+		if_printf(pi->ifp, "unknown transceiver inserted.\n");
+	else if (pi->mod_type == FW_PORT_MOD_TYPE_NOTSUPPORTED)
+		if_printf(pi->ifp, "unsupported transceiver inserted.\n");
 	else if (pi->mod_type > 0 && pi->mod_type < ARRAY_SIZE(mod_str)) {
 		if_printf(pi->ifp, "%s transceiver inserted.\n",
 		    mod_str[pi->mod_type]);



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