summaryrefslogtreecommitdiffstats
path: root/drivers/net/stmmac/stmmac_main.c
diff options
context:
space:
mode:
authorSrinivas Kandagatla2011-07-17 22:54:09 +0200
committerDavid S. Miller2011-07-18 19:47:24 +0200
commit61b8013a114cb041db2c56f747953cac69637f26 (patch)
treeadc39f580015301e9be3e74bef360de8145512fd /drivers/net/stmmac/stmmac_main.c
parentstmmac: add memory barriers at appropriate places (diff)
downloadkernel-qcow2-linux-61b8013a114cb041db2c56f747953cac69637f26.tar.gz
kernel-qcow2-linux-61b8013a114cb041db2c56f747953cac69637f26.tar.xz
kernel-qcow2-linux-61b8013a114cb041db2c56f747953cac69637f26.zip
stmmac: Allow SOCs to use Store forward mode eventhough tx_coe is 0. (V2)
This patch adds new field 'force_sf_dma_mode' to plat_stmmacenet_data struct to allow users to specify if they want to use force store forward eventhough tx_coe is not available in hw. without this flag stmmac driver will use cut-thru mode not use store-forward mode. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/stmmac/stmmac_main.c')
-rw-r--r--drivers/net/stmmac/stmmac_main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/stmmac/stmmac_main.c b/drivers/net/stmmac/stmmac_main.c
index c8c9e5bc6608..d37ebc80623a 100644
--- a/drivers/net/stmmac/stmmac_main.c
+++ b/drivers/net/stmmac/stmmac_main.c
@@ -557,9 +557,11 @@ static void free_dma_desc_resources(struct stmmac_priv *priv)
*/
static void stmmac_dma_operation_mode(struct stmmac_priv *priv)
{
- if (likely((priv->plat->tx_coe) && (!priv->no_csum_insertion))) {
- /* In case of GMAC, SF mode has to be enabled
- * to perform the TX COE. This depends on:
+ if (likely(priv->plat->force_sf_dma_mode ||
+ ((priv->plat->tx_coe) && (!priv->no_csum_insertion)))) {
+ /*
+ * In case of GMAC, SF mode can be enabled
+ * to perform the TX COE in HW. This depends on:
* 1) TX COE if actually supported
* 2) There is no bugged Jumbo frame support
* that needs to not insert csum in the TDES.