aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/freescale/gianfar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/freescale/gianfar.c')
-rw-r--r--drivers/net/ethernet/freescale/gianfar.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index d3233f59a82e..a1b52ec3b930 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -100,7 +100,6 @@
100#include <linux/of_net.h> 100#include <linux/of_net.h>
101 101
102#include "gianfar.h" 102#include "gianfar.h"
103#include "fsl_pq_mdio.h"
104 103
105#define TX_TIMEOUT (1*HZ) 104#define TX_TIMEOUT (1*HZ)
106 105
@@ -395,7 +394,13 @@ static void gfar_init_mac(struct net_device *ndev)
395 if (ndev->features & NETIF_F_IP_CSUM) 394 if (ndev->features & NETIF_F_IP_CSUM)
396 tctrl |= TCTRL_INIT_CSUM; 395 tctrl |= TCTRL_INIT_CSUM;
397 396
398 tctrl |= TCTRL_TXSCHED_PRIO; 397 if (priv->prio_sched_en)
398 tctrl |= TCTRL_TXSCHED_PRIO;
399 else {
400 tctrl |= TCTRL_TXSCHED_WRRS;
401 gfar_write(&regs->tr03wt, DEFAULT_WRRS_WEIGHT);
402 gfar_write(&regs->tr47wt, DEFAULT_WRRS_WEIGHT);
403 }
399 404
400 gfar_write(&regs->tctrl, tctrl); 405 gfar_write(&regs->tctrl, tctrl);
401 406
@@ -1161,6 +1166,9 @@ static int gfar_probe(struct platform_device *ofdev)
1161 priv->rx_filer_enable = 1; 1166 priv->rx_filer_enable = 1;
1162 /* Enable most messages by default */ 1167 /* Enable most messages by default */
1163 priv->msg_enable = (NETIF_MSG_IFUP << 1 ) - 1; 1168 priv->msg_enable = (NETIF_MSG_IFUP << 1 ) - 1;
1169 /* use pritority h/w tx queue scheduling for single queue devices */
1170 if (priv->num_tx_queues == 1)
1171 priv->prio_sched_en = 1;
1164 1172
1165 /* Carrier starts down, phylib will bring it up */ 1173 /* Carrier starts down, phylib will bring it up */
1166 netif_carrier_off(dev); 1174 netif_carrier_off(dev);