From owner-svn-src-head@FreeBSD.ORG Mon Nov 19 05:24:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9012AEA0; Mon, 19 Nov 2012 05:24:34 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5AE7E8FC16; Mon, 19 Nov 2012 05:24:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAJ5OYA7090305; Mon, 19 Nov 2012 05:24:34 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAJ5OYOm090302; Mon, 19 Nov 2012 05:24:34 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201211190524.qAJ5OYOm090302@svn.freebsd.org> From: Juli Mallett Date: Mon, 19 Nov 2012 05:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243260 - head/sys/contrib/octeon-sdk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Nov 2012 05:24:34 -0000 Author: jmallett Date: Mon Nov 19 05:24:33 2012 New Revision: 243260 URL: http://svnweb.freebsd.org/changeset/base/243260 Log: Fix packet receive on the ATCA-7220 by disabling FCS-related checks, since the FCS is stripped by the underlying hardware before it reaches the Octeon. Modified: head/sys/contrib/octeon-sdk/cvmx-helper-spi.c head/sys/contrib/octeon-sdk/cvmx-spi.c Modified: head/sys/contrib/octeon-sdk/cvmx-helper-spi.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-spi.c Mon Nov 19 04:10:23 2012 (r243259) +++ head/sys/contrib/octeon-sdk/cvmx-helper-spi.c Mon Nov 19 05:24:33 2012 (r243260) @@ -164,6 +164,13 @@ int __cvmx_helper_spi_enable(int interfa cvmx_pip_prt_cfgx_t port_config; port_config.u64 = cvmx_read_csr(CVMX_PIP_PRT_CFGX(ipd_port)); port_config.s.crc_en = 1; +#ifdef OCTEON_VENDOR_RADISYS + /* + * Incoming packets on the RSYS4GBE have the FCS stripped. + */ + if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE) + port_config.s.crc_en = 0; +#endif cvmx_write_csr(CVMX_PIP_PRT_CFGX(ipd_port), port_config.u64); } Modified: head/sys/contrib/octeon-sdk/cvmx-spi.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-spi.c Mon Nov 19 04:10:23 2012 (r243259) +++ head/sys/contrib/octeon-sdk/cvmx-spi.c Mon Nov 19 05:24:33 2012 (r243260) @@ -652,6 +652,13 @@ int cvmx_spi_interface_up_cb(int interfa gmxx_rxx_frm_min.u64 = 0; gmxx_rxx_frm_min.s.len = 64; +#ifdef OCTEON_VENDOR_RADISYS + /* + * Incoming packets on the RSYS4GBE have the FCS stripped. + */ + if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE) + gmxx_rxx_frm_min.s.len -= 4; +#endif cvmx_write_csr(CVMX_GMXX_RXX_FRM_MIN(0,interface), gmxx_rxx_frm_min.u64); gmxx_rxx_frm_max.u64 = 0; gmxx_rxx_frm_max.s.len = 64*1024 - 4;