diff options
Diffstat (limited to 'drivers/net/stmmac/stmmac_main.c')
-rw-r--r-- | drivers/net/stmmac/stmmac_main.c | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/drivers/net/stmmac/stmmac_main.c b/drivers/net/stmmac/stmmac_main.c index 4111a85ec80..a31d580f306 100644 --- a/drivers/net/stmmac/stmmac_main.c +++ b/drivers/net/stmmac/stmmac_main.c @@ -169,8 +169,6 @@ static void stmmac_verify_args(void) flow_ctrl = FLOW_OFF; if (unlikely((pause < 0) || (pause > 0xffff))) pause = PAUSE_TIME; - - return; } #if defined(STMMAC_XMIT_DEBUG) || defined(STMMAC_RX_DEBUG) @@ -184,7 +182,6 @@ static void print_pkt(unsigned char *buf, int len) pr_info(" %02x", buf[j]); } pr_info("\n"); - return; } #endif @@ -514,7 +511,6 @@ static void init_dma_desc_rings(struct net_device *dev) pr_info("TX descriptor ring:\n"); display_ring(priv->dma_tx, txsize); } - return; } static void dma_free_rx_skbufs(struct stmmac_priv *priv) @@ -529,7 +525,6 @@ static void dma_free_rx_skbufs(struct stmmac_priv *priv) } priv->rx_skbuff[i] = NULL; } - return; } static void dma_free_tx_skbufs(struct stmmac_priv *priv) @@ -547,7 +542,6 @@ static void dma_free_tx_skbufs(struct stmmac_priv *priv) priv->tx_skbuff[i] = NULL; } } - return; } static void free_dma_desc_resources(struct stmmac_priv *priv) @@ -567,8 +561,6 @@ static void free_dma_desc_resources(struct stmmac_priv *priv) kfree(priv->rx_skbuff_dma); kfree(priv->rx_skbuff); kfree(priv->tx_skbuff); - - return; } /** @@ -598,8 +590,6 @@ static void stmmac_dma_operation_mode(struct stmmac_priv *priv) } } tx_coe = priv->tx_coe; - - return; } /** @@ -675,7 +665,6 @@ static void stmmac_tx(struct stmmac_priv *priv) } netif_tx_unlock(priv->dev); } - return; } static inline void stmmac_enable_irq(struct stmmac_priv *priv) @@ -731,8 +720,6 @@ void stmmac_schedule(struct net_device *dev) priv->xstats.sched_timer_n++; _stmmac_schedule(priv); - - return; } static void stmmac_no_timer_started(unsigned int x) @@ -763,8 +750,6 @@ static void stmmac_tx_err(struct stmmac_priv *priv) priv->dev->stats.tx_errors++; netif_wake_queue(priv->dev); - - return; } @@ -788,8 +773,6 @@ static void stmmac_dma_interrupt(struct stmmac_priv *priv) stmmac_tx_err(priv); } else if (unlikely(status == tx_hard_error)) stmmac_tx_err(priv); - - return; } /** @@ -837,7 +820,7 @@ static int stmmac_open(struct net_device *dev) #ifdef CONFIG_STMMAC_TIMER priv->tm = kzalloc(sizeof(struct stmmac_timer *), GFP_KERNEL); if (unlikely(priv->tm == NULL)) { - pr_err("%s: ERROR: timer memory alloc failed \n", __func__); + pr_err("%s: ERROR: timer memory alloc failed\n", __func__); return -ENOMEM; } priv->tm->freq = tmrate; @@ -1197,7 +1180,6 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv) } priv->hw->desc->set_rx_owner(p + entry); } - return; } static int stmmac_rx(struct stmmac_priv *priv, int limit) @@ -1280,7 +1262,6 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit) priv->dev->stats.rx_packets++; priv->dev->stats.rx_bytes += frame_len; - priv->dev->last_rx = jiffies; } entry = next_entry; p = p_next; /* use prefetched values */ @@ -1332,7 +1313,6 @@ static void stmmac_tx_timeout(struct net_device *dev) /* Clear Tx resources and restart transmitting again */ stmmac_tx_err(priv); - return; } /* Configuration changes (passed on by ifconfig) */ @@ -1374,7 +1354,6 @@ static void stmmac_multicast_list(struct net_device *dev) spin_lock(&priv->lock); priv->hw->mac->set_filter(dev); spin_unlock(&priv->lock); - return; } /** @@ -1490,8 +1469,6 @@ static void stmmac_vlan_rx_register(struct net_device *dev, spin_lock(&priv->lock); priv->vlgrp = grp; spin_unlock(&priv->lock); - - return; } #endif @@ -1587,6 +1564,12 @@ static int stmmac_mac_device_setup(struct net_device *dev) else device = dwmac100_setup(ioaddr); + if (priv->enh_desc) { + device->desc = &enh_desc_ops; + pr_info("\tEnhanced descriptor structure\n"); + } else + device->desc = &ndesc_ops; + if (!device) return -ENOMEM; @@ -1727,6 +1710,7 @@ static int stmmac_dvr_probe(struct platform_device *pdev) priv->bus_id = plat_dat->bus_id; priv->pbl = plat_dat->pbl; /* TLI */ priv->is_gmac = plat_dat->has_gmac; /* GMAC is on board */ + priv->enh_desc = plat_dat->enh_desc; platform_set_drvdata(pdev, ndev); |