From owner-svn-src-stable-8@FreeBSD.ORG Mon Apr 4 18:47:18 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28E261065672; Mon, 4 Apr 2011 18:47:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1773F8FC1B; Mon, 4 Apr 2011 18:47:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p34IlHkT092381; Mon, 4 Apr 2011 18:47:17 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p34IlHdP092376; Mon, 4 Apr 2011 18:47:17 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201104041847.p34IlHdP092376@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 4 Apr 2011 18:47:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220339 - in stable/8/sys: dev/cxgbe dev/cxgbe/common modules/cxgbe modules/cxgbe/if_cxgbe X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2011 18:47:18 -0000 Author: np Date: Mon Apr 4 18:47:17 2011 New Revision: 220339 URL: http://svn.freebsd.org/changeset/base/220339 Log: MFC r220231, r220232 r220231: Allow multiple modules within sys/modules/cxgbe. The first one is if_cxgbe. r220232: Update header and related code for firmware 1.3.8 Added: stable/8/sys/modules/cxgbe/if_cxgbe/ - copied from r220231, head/sys/modules/cxgbe/if_cxgbe/ Replaced: stable/8/sys/modules/cxgbe/Makefile - copied unchanged from r220231, head/sys/modules/cxgbe/Makefile Modified: stable/8/sys/dev/cxgbe/common/common.h stable/8/sys/dev/cxgbe/common/t4fw_interface.h stable/8/sys/dev/cxgbe/t4_main.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/8/sys/dev/cxgbe/common/common.h Mon Apr 4 18:39:04 2011 (r220338) +++ stable/8/sys/dev/cxgbe/common/common.h Mon Apr 4 18:47:17 2011 (r220339) @@ -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: stable/8/sys/dev/cxgbe/common/t4fw_interface.h ============================================================================== --- stable/8/sys/dev/cxgbe/common/t4fw_interface.h Mon Apr 4 18:39:04 2011 (r220338) +++ stable/8/sys/dev/cxgbe/common/t4fw_interface.h Mon Apr 4 18:47:17 2011 (r220339) @@ -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: stable/8/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/8/sys/dev/cxgbe/t4_main.c Mon Apr 4 18:39:04 2011 (r220338) +++ stable/8/sys/dev/cxgbe/t4_main.c Mon Apr 4 18:47:17 2011 (r220339) @@ -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]); Copied: stable/8/sys/modules/cxgbe/Makefile (from r220231, head/sys/modules/cxgbe/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/modules/cxgbe/Makefile Mon Apr 4 18:47:17 2011 (r220339, copy of r220231, head/sys/modules/cxgbe/Makefile) @@ -0,0 +1,7 @@ +# +# $FreeBSD$ +# + +SUBDIR = if_cxgbe + +.include