summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2012-11-19 05:24:33 +0000
committerjmallett <jmallett@FreeBSD.org>2012-11-19 05:24:33 +0000
commit05b63755364750535dad838ddfce8b9e2bb7fb80 (patch)
tree3df4d49bfafe30cab7a37d946484c0f25f9aafe7 /sys/contrib
parent9ab97a4251cace310ac6f80023b5aa98014ed7cb (diff)
downloadFreeBSD-src-05b63755364750535dad838ddfce8b9e2bb7fb80.zip
FreeBSD-src-05b63755364750535dad838ddfce8b9e2bb7fb80.tar.gz
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.
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/octeon-sdk/cvmx-helper-spi.c7
-rw-r--r--sys/contrib/octeon-sdk/cvmx-spi.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/sys/contrib/octeon-sdk/cvmx-helper-spi.c b/sys/contrib/octeon-sdk/cvmx-helper-spi.c
index c5916a1..960da0e 100644
--- a/sys/contrib/octeon-sdk/cvmx-helper-spi.c
+++ b/sys/contrib/octeon-sdk/cvmx-helper-spi.c
@@ -164,6 +164,13 @@ int __cvmx_helper_spi_enable(int interface)
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);
}
diff --git a/sys/contrib/octeon-sdk/cvmx-spi.c b/sys/contrib/octeon-sdk/cvmx-spi.c
index 6f44382..f901f890 100644
--- a/sys/contrib/octeon-sdk/cvmx-spi.c
+++ b/sys/contrib/octeon-sdk/cvmx-spi.c
@@ -652,6 +652,13 @@ int cvmx_spi_interface_up_cb(int interface, cvmx_spi_mode_t mode)
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;
OpenPOWER on IntegriCloud