aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/stmmac/stmmac.h1
-rw-r--r--drivers/net/stmmac/stmmac_main.c12
2 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/stmmac/stmmac.h b/drivers/net/stmmac/stmmac.h
index 55b9acae82a1..0d776bc23143 100644
--- a/drivers/net/stmmac/stmmac.h
+++ b/drivers/net/stmmac/stmmac.h
@@ -93,6 +93,7 @@ struct stmmac_priv {
93#ifdef STMMAC_VLAN_TAG_USED 93#ifdef STMMAC_VLAN_TAG_USED
94 struct vlan_group *vlgrp; 94 struct vlan_group *vlgrp;
95#endif 95#endif
96 int enh_desc;
96}; 97};
97 98
98#ifdef CONFIG_STM_DRIVERS 99#ifdef CONFIG_STM_DRIVERS
diff --git a/drivers/net/stmmac/stmmac_main.c b/drivers/net/stmmac/stmmac_main.c
index dfeea96f681a..7ac6ddea989e 100644
--- a/drivers/net/stmmac/stmmac_main.c
+++ b/drivers/net/stmmac/stmmac_main.c
@@ -1581,13 +1581,16 @@ static int stmmac_mac_device_setup(struct net_device *dev)
1581 1581
1582 struct mac_device_info *device; 1582 struct mac_device_info *device;
1583 1583
1584 if (priv->is_gmac) { 1584 if (priv->is_gmac)
1585 device = dwmac1000_setup(ioaddr); 1585 device = dwmac1000_setup(ioaddr);
1586 device->desc = &enh_desc_ops; 1586 else
1587 } else {
1588 device = dwmac100_setup(ioaddr); 1587 device = dwmac100_setup(ioaddr);
1588
1589 if (priv->enh_desc) {
1590 device->desc = &enh_desc_ops;
1591 pr_info("\tEnhanced descriptor structure\n");
1592 } else
1589 device->desc = &ndesc_ops; 1593 device->desc = &ndesc_ops;
1590 }
1591 1594
1592 if (!device) 1595 if (!device)
1593 return -ENOMEM; 1596 return -ENOMEM;
@@ -1729,6 +1732,7 @@ static int stmmac_dvr_probe(struct platform_device *pdev)
1729 priv->bus_id = plat_dat->bus_id; 1732 priv->bus_id = plat_dat->bus_id;
1730 priv->pbl = plat_dat->pbl; /* TLI */ 1733 priv->pbl = plat_dat->pbl; /* TLI */
1731 priv->is_gmac = plat_dat->has_gmac; /* GMAC is on board */ 1734 priv->is_gmac = plat_dat->has_gmac; /* GMAC is on board */
1735 priv->enh_desc = plat_dat->enh_desc;
1732 1736
1733 platform_set_drvdata(pdev, ndev); 1737 platform_set_drvdata(pdev, ndev);
1734 1738