Commit 25efe08e authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: octeon-ethernet: eliminate USE_10MBPS_PREAMBLE_WORKAROUND define

We have the workaround always enabled, so eliminate a redundant #define.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 280eb5b5
...@@ -67,11 +67,6 @@ ...@@ -67,11 +67,6 @@
#define USE_RED 1 #define USE_RED 1
#define USE_ASYNC_IOBDMA (CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE > 0) #define USE_ASYNC_IOBDMA (CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE > 0)
/*
* Allow SW based preamble removal at 10Mbps to workaround PHYs giving
* us bad preambles.
*/
#define USE_10MBPS_PREAMBLE_WORKAROUND 1
/* /*
* Use this to have all FPA frees also tell the L2 not to write data * Use this to have all FPA frees also tell the L2 not to write data
* to memory. * to memory.
......
...@@ -99,14 +99,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev) ...@@ -99,14 +99,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev)
link_info = cvmx_helper_link_get(priv->port); link_info = cvmx_helper_link_get(priv->port);
if (link_info.u64 == priv->link_info) { if (link_info.u64 == priv->link_info) {
if (link_info.s.speed == 10) {
/*
* If the 10Mbps preamble workaround is supported and we're
* at 10Mbps we may need to do some special checking.
*/
if (USE_10MBPS_PREAMBLE_WORKAROUND &&
(link_info.s.speed == 10)) {
/* /*
* Read the GMXX_RXX_INT_REG[PCTERR] bit and * Read the GMXX_RXX_INT_REG[PCTERR] bit and
* see if we are getting preamble errors. * see if we are getting preamble errors.
...@@ -140,12 +133,11 @@ static void cvm_oct_rgmii_poll(struct net_device *dev) ...@@ -140,12 +133,11 @@ static void cvm_oct_rgmii_poll(struct net_device *dev)
return; return;
} }
/* If the 10Mbps preamble workaround is allowed we need to on /* Since the 10Mbps preamble workaround is allowed we need to enable
preamble checking, FCS stripping, and clear error bits on preamble checking, FCS stripping, and clear error bits on
every speed change. If errors occur during 10Mbps operation every speed change. If errors occur during 10Mbps operation
the above code will change this stuff */ the above code will change this stuff */
if (USE_10MBPS_PREAMBLE_WORKAROUND) cvm_oct_set_hw_preamble(priv, true);
cvm_oct_set_hw_preamble(priv, true);
if (priv->phydev == NULL) { if (priv->phydev == NULL) {
link_info = cvmx_helper_link_autoconf(priv->port); link_info = cvmx_helper_link_autoconf(priv->port);
......
...@@ -93,11 +93,8 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work) ...@@ -93,11 +93,8 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work)
* instead of 60+4FCS. Note these packets still get * instead of 60+4FCS. Note these packets still get
* counted as frame errors. * counted as frame errors.
*/ */
} else } else if (work->word2.snoip.err_code == 5 ||
if (USE_10MBPS_PREAMBLE_WORKAROUND work->word2.snoip.err_code == 7) {
&& ((work->word2.snoip.err_code == 5)
|| (work->word2.snoip.err_code == 7))) {
/* /*
* We received a packet with either an alignment error * We received a packet with either an alignment error
* or a FCS error. This may be signalling that we are * or a FCS error. This may be signalling that we are
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment