}
static int
-@@ -156,8 +224,10 @@ ltq_etop_poll_rx(struct napi_struct *nap
+@@ -156,7 +224,9 @@ ltq_etop_poll_rx(struct napi_struct *nap
{
struct ltq_etop_chan *ch = container_of(napi,
struct ltq_etop_chan, napi);
+ struct ltq_etop_priv *priv = netdev_priv(ch->netdev);
- int rx = 0;
- int complete = 0;
+ int work_done = 0;
+ unsigned long flags;
- while ((rx < budget) && !complete) {
+ while (work_done < budget) {
struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc];
-@@ -171,7 +241,9 @@ ltq_etop_poll_rx(struct napi_struct *nap
+@@ -168,7 +238,9 @@ ltq_etop_poll_rx(struct napi_struct *nap
}
- if (complete || !rx) {
- napi_complete(&ch->napi);
+ if (work_done < budget) {
+ napi_complete_done(&ch->napi, work_done);
+ spin_lock_irqsave(&priv->lock, flags);
ltq_dma_ack_irq(&ch->dma);
+ spin_unlock_irqrestore(&priv->lock, flags);
}
- return rx;
+ return work_done;
}
-@@ -183,12 +255,14 @@ ltq_etop_poll_tx(struct napi_struct *nap
+@@ -180,12 +252,14 @@ ltq_etop_poll_tx(struct napi_struct *nap
container_of(napi, struct ltq_etop_chan, napi);
struct ltq_etop_priv *priv = netdev_priv(ch->netdev);
struct netdev_queue *txq =
dev_kfree_skb_any(ch->skb[ch->tx_free]);
ch->skb[ch->tx_free] = NULL;
memset(&ch->dma.desc_base[ch->tx_free], 0,
-@@ -201,7 +275,9 @@ ltq_etop_poll_tx(struct napi_struct *nap
+@@ -198,7 +272,9 @@ ltq_etop_poll_tx(struct napi_struct *nap
if (netif_tx_queue_stopped(txq))
netif_tx_start_queue(txq);
napi_complete(&ch->napi);
return 1;
}
-@@ -209,9 +285,10 @@ static irqreturn_t
+@@ -206,9 +282,10 @@ static irqreturn_t
ltq_etop_dma_irq(int irq, void *_priv)
{
struct ltq_etop_priv *priv = _priv;
return IRQ_HANDLED;
}
-@@ -223,7 +300,7 @@ ltq_etop_free_channel(struct net_device
+@@ -220,7 +297,7 @@ ltq_etop_free_channel(struct net_device
ltq_dma_free(&ch->dma);
if (ch->dma.irq)
free_irq(ch->dma.irq, priv);
int desc;
for (desc = 0; desc < LTQ_DESC_NUM; desc++)
dev_kfree_skb_any(ch->skb[ch->dma.desc]);
-@@ -234,65 +311,133 @@ static void
+@@ -231,65 +308,133 @@ static void
ltq_etop_hw_exit(struct net_device *dev)
{
struct ltq_etop_priv *priv = netdev_priv(dev);
struct ltq_etop_priv *priv = netdev_priv(dev);
- int i;
+ int mii_mode = priv->mii_mode;
-
-- ltq_pmu_enable(PMU_PPE);
++
+ clk_enable(priv->clk_ppe);
-- switch (priv->pldata->mii_mode) {
+- ltq_pmu_enable(PMU_PPE);
+ if (of_machine_is_compatible("lantiq,ar9")) {
+ ltq_etop_gbit_init(dev);
+ /* force the etops link to the gbit to MII */
+ ltq_etop_w32_mask(MDIO_CFG_MASK, 0, LTQ_ETOP_MDIO_CFG);
+ ltq_etop_w32_mask(MAC_CFG_MASK, MAC_CFG_CGEN | MAC_CFG_DUPLEX |
+ MAC_CFG_SPEED | MAC_CFG_LINK, LTQ_ETOP_MAC_CFG);
-+
+
+- switch (priv->pldata->mii_mode) {
+ switch (mii_mode) {
case PHY_INTERFACE_MODE_RMII:
- ltq_etop_w32_mask(ETOP_MII_MASK,
}
static void
-@@ -306,7 +451,10 @@ ltq_etop_get_drvinfo(struct net_device *
+@@ -303,7 +448,10 @@ ltq_etop_get_drvinfo(struct net_device *
static int
ltq_etop_nway_reset(struct net_device *dev)
{
}
static const struct ethtool_ops ltq_etop_ethtool_ops = {
-@@ -317,6 +465,39 @@ static const struct ethtool_ops ltq_etop
+@@ -314,6 +462,39 @@ static const struct ethtool_ops ltq_etop
};
static int
ltq_etop_mdio_wr(struct mii_bus *bus, int phy_addr, int phy_reg, u16 phy_data)
{
u32 val = MDIO_REQUEST |
-@@ -324,9 +505,9 @@ ltq_etop_mdio_wr(struct mii_bus *bus, in
+@@ -321,9 +502,9 @@ ltq_etop_mdio_wr(struct mii_bus *bus, in
((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET) |
phy_data;
return 0;
}
-@@ -337,12 +518,12 @@ ltq_etop_mdio_rd(struct mii_bus *bus, in
+@@ -334,12 +515,12 @@ ltq_etop_mdio_rd(struct mii_bus *bus, in
((phy_addr & MDIO_ADDR_MASK) << MDIO_ADDR_OFFSET) |
((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET);
return val;
}
-@@ -357,8 +538,18 @@ ltq_etop_mdio_probe(struct net_device *d
+@@ -354,8 +535,18 @@ ltq_etop_mdio_probe(struct net_device *d
{
struct ltq_etop_priv *priv = netdev_priv(dev);
struct phy_device *phydev;
if (!phydev) {
netdev_err(dev, "no PHY found\n");
-@@ -366,21 +557,18 @@ ltq_etop_mdio_probe(struct net_device *d
+@@ -363,21 +554,18 @@ ltq_etop_mdio_probe(struct net_device *d
}
phydev = phy_connect(dev, phydev_name(phydev),
phydev->advertising = phydev->supported;
phy_attached_info(phydev);
-@@ -401,8 +589,13 @@ ltq_etop_mdio_init(struct net_device *de
+@@ -398,8 +586,13 @@ ltq_etop_mdio_init(struct net_device *de
}
priv->mii_bus->priv = dev;
priv->mii_bus->name = "ltq_mii";
snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
priv->pdev->name, priv->pdev->id);
-@@ -439,17 +632,19 @@ static int
+@@ -436,17 +629,19 @@ static int
ltq_etop_open(struct net_device *dev)
{
struct ltq_etop_priv *priv = netdev_priv(dev);
netif_tx_start_all_queues(dev);
return 0;
}
-@@ -458,18 +653,19 @@ static int
+@@ -455,18 +650,19 @@ static int
ltq_etop_stop(struct net_device *dev)
{
struct ltq_etop_priv *priv = netdev_priv(dev);
return 0;
}
-@@ -479,16 +675,16 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -476,16 +672,16 @@ ltq_etop_tx(struct sk_buff *skb, struct
int queue = skb_get_queue_mapping(skb);
struct netdev_queue *txq = netdev_get_tx_queue(dev, queue);
struct ltq_etop_priv *priv = netdev_priv(dev);
netdev_err(dev, "tx ring full\n");
netif_tx_stop_queue(txq);
return NETDEV_TX_BUSY;
-@@ -496,7 +692,7 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -493,7 +689,7 @@ ltq_etop_tx(struct sk_buff *skb, struct
/* dma needs to start on a 16 byte aligned address */
byte_offset = CPHYSADDR(skb->data) % 16;
netif_trans_update(dev);
-@@ -506,11 +702,11 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -503,11 +699,11 @@ ltq_etop_tx(struct sk_buff *skb, struct
wmb();
desc->ctl = LTQ_DMA_OWN | LTQ_DMA_SOP | LTQ_DMA_EOP |
LTQ_DMA_TX_OFFSET(byte_offset) | (len & LTQ_DMA_SIZE_MASK);
netif_tx_stop_queue(txq);
return NETDEV_TX_OK;
-@@ -525,8 +721,10 @@ ltq_etop_change_mtu(struct net_device *d
+@@ -522,8 +718,10 @@ ltq_etop_change_mtu(struct net_device *d
struct ltq_etop_priv *priv = netdev_priv(dev);
unsigned long flags;
LTQ_ETOP_IGPLEN);
spin_unlock_irqrestore(&priv->lock, flags);
}
-@@ -595,6 +793,9 @@ ltq_etop_init(struct net_device *dev)
+@@ -592,6 +790,9 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_hw;
ltq_etop_change_mtu(dev, 1500);
memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr));
if (!is_valid_ether_addr(mac.sa_data)) {
-@@ -612,9 +813,10 @@ ltq_etop_init(struct net_device *dev)
+@@ -609,9 +810,10 @@ ltq_etop_init(struct net_device *dev)
dev->addr_assign_type = NET_ADDR_RANDOM;
ltq_etop_set_multicast_list(dev);
return 0;
err_netdev:
-@@ -634,6 +836,9 @@ ltq_etop_tx_timeout(struct net_device *d
+@@ -631,6 +833,9 @@ ltq_etop_tx_timeout(struct net_device *d
err = ltq_etop_hw_init(dev);
if (err)
goto err_hw;
netif_trans_update(dev);
netif_wake_queue(dev);
return;
-@@ -657,14 +862,19 @@ static const struct net_device_ops ltq_e
+@@ -654,14 +859,19 @@ static const struct net_device_ops ltq_e
.ndo_tx_timeout = ltq_etop_tx_timeout,
};
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
-@@ -690,31 +900,62 @@ ltq_etop_probe(struct platform_device *p
+@@ -687,31 +897,62 @@ ltq_etop_probe(struct platform_device *p
goto err_out;
}
err = register_netdev(dev);
if (err)
-@@ -743,31 +984,22 @@ ltq_etop_remove(struct platform_device *
+@@ -740,31 +981,22 @@ ltq_etop_remove(struct platform_device *
return 0;
}
+early_param("ethaddr", setup_ethaddr);
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
-@@ -797,7 +797,11 @@ ltq_etop_init(struct net_device *dev)
+@@ -794,7 +794,11 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_hw;
/* reset txq */
txq->count = 0;
-@@ -2882,6 +2894,8 @@ static int mvneta_txq_init(struct mvneta
+@@ -2880,6 +2892,8 @@ static int mvneta_txq_init(struct mvneta
static void mvneta_txq_deinit(struct mvneta_port *pp,
struct mvneta_tx_queue *txq)
{
kfree(txq->tx_skb);
if (txq->tso_hdrs)
-@@ -2893,6 +2907,8 @@ static void mvneta_txq_deinit(struct mvn
+@@ -2891,6 +2905,8 @@ static void mvneta_txq_deinit(struct mvn
txq->size * MVNETA_DESC_ALIGNED_SIZE,
txq->descs, txq->descs_phys);
---
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3835,6 +3835,16 @@ static int mvneta_ethtool_get_rxfh(struc
+@@ -3833,6 +3833,16 @@ static int mvneta_ethtool_get_rxfh(struc
return 0;
}
static const struct net_device_ops mvneta_netdev_ops = {
.ndo_open = mvneta_open,
.ndo_stop = mvneta_stop,
-@@ -3845,6 +3855,7 @@ static const struct net_device_ops mvnet
+@@ -3843,6 +3853,7 @@ static const struct net_device_ops mvnet
.ndo_fix_features = mvneta_fix_features,
.ndo_get_stats64 = mvneta_get_stats64,
.ndo_do_ioctl = mvneta_ioctl,
}
/* Release Tx descriptors */
-@@ -2982,7 +2929,6 @@ static int mvneta_setup_txqs(struct mvne
+@@ -2980,7 +2927,6 @@ static int mvneta_setup_txqs(struct mvne
static void mvneta_start_dev(struct mvneta_port *pp)
{
int cpu;
mvneta_max_rx_size_set(pp, pp->pkt_size);
mvneta_txq_max_tx_size_set(pp, pp->pkt_size);
-@@ -3005,16 +2951,15 @@ static void mvneta_start_dev(struct mvne
+@@ -3003,16 +2949,15 @@ static void mvneta_start_dev(struct mvne
MVNETA_CAUSE_LINK_CHANGE |
MVNETA_CAUSE_PSC_SYNC_CHANGE);
for_each_online_cpu(cpu) {
struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu);
-@@ -3184,99 +3129,210 @@ static int mvneta_set_mac_addr(struct ne
+@@ -3182,99 +3127,210 @@ static int mvneta_set_mac_addr(struct ne
return 0;
}
}
/* Electing a CPU must be done in an atomic way: it should be done
-@@ -3534,10 +3590,9 @@ static int mvneta_stop(struct net_device
+@@ -3532,10 +3588,9 @@ static int mvneta_stop(struct net_device
static int mvneta_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
}
/* Ethtool methods */
-@@ -3548,44 +3603,18 @@ mvneta_ethtool_set_link_ksettings(struct
+@@ -3546,44 +3601,18 @@ mvneta_ethtool_set_link_ksettings(struct
const struct ethtool_link_ksettings *cmd)
{
struct mvneta_port *pp = netdev_priv(ndev);
}
/* Set interrupt coalescing for ethtools */
-@@ -3693,26 +3722,28 @@ static void mvneta_ethtool_update_stats(
+@@ -3691,26 +3720,28 @@ static void mvneta_ethtool_update_stats(
{
const struct mvneta_statistic *s;
void __iomem *base = pp->base;
}
}
-@@ -3872,7 +3903,7 @@ const struct ethtool_ops mvneta_eth_tool
+@@ -3870,7 +3901,7 @@ const struct ethtool_ops mvneta_eth_tool
.get_rxnfc = mvneta_ethtool_get_rxnfc,
.get_rxfh = mvneta_ethtool_get_rxfh,
.set_rxfh = mvneta_ethtool_set_rxfh,
.set_link_ksettings = mvneta_ethtool_set_link_ksettings,
};
-@@ -3999,14 +4030,13 @@ static int mvneta_probe(struct platform_
+@@ -3997,14 +4028,13 @@ static int mvneta_probe(struct platform_
const struct mbus_dram_target_info *dram_target_info;
struct resource *res;
struct device_node *dn = pdev->dev.of_node;
int tx_csum_limit;
int phy_mode;
int err;
-@@ -4022,31 +4052,11 @@ static int mvneta_probe(struct platform_
+@@ -4020,31 +4050,11 @@ static int mvneta_probe(struct platform_
goto err_free_netdev;
}
}
dev->tx_queue_len = MVNETA_MAX_TXD;
-@@ -4057,12 +4067,7 @@ static int mvneta_probe(struct platform_
+@@ -4055,12 +4065,7 @@ static int mvneta_probe(struct platform_
pp = netdev_priv(dev);
spin_lock_init(&pp->lock);
pp->rxq_def = rxq_def;
-@@ -4073,7 +4078,7 @@ static int mvneta_probe(struct platform_
+@@ -4071,7 +4076,7 @@ static int mvneta_probe(struct platform_
pp->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(pp->clk)) {
err = PTR_ERR(pp->clk);
}
clk_prepare_enable(pp->clk);
-@@ -4181,6 +4186,14 @@ static int mvneta_probe(struct platform_
+@@ -4179,6 +4184,14 @@ static int mvneta_probe(struct platform_
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
dev->gso_max_segs = MVNETA_MAX_TSO_SEGS;
err = register_netdev(dev);
if (err < 0) {
dev_err(&pdev->dev, "failed to register\n");
-@@ -4192,14 +4205,6 @@ static int mvneta_probe(struct platform_
+@@ -4190,14 +4203,6 @@ static int mvneta_probe(struct platform_
platform_set_drvdata(pdev, pp->dev);
return 0;
err_netdev:
-@@ -4210,16 +4215,14 @@ err_netdev:
+@@ -4208,16 +4213,14 @@ err_netdev:
1 << pp->id);
}
err_free_stats:
err_free_irq:
irq_dispose_mapping(dev->irq);
err_free_netdev:
-@@ -4231,7 +4234,6 @@ err_free_netdev:
+@@ -4229,7 +4232,6 @@ err_free_netdev:
static int mvneta_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct mvneta_port *pp = netdev_priv(dev);
unregister_netdev(dev);
-@@ -4239,10 +4241,8 @@ static int mvneta_remove(struct platform
+@@ -4237,10 +4239,8 @@ static int mvneta_remove(struct platform
clk_disable_unprepare(pp->clk);
free_percpu(pp->ports);
free_percpu(pp->stats);
}
/* Release Tx descriptors */
-@@ -2948,8 +2950,7 @@ static void mvneta_start_dev(struct mvne
+@@ -2946,8 +2948,7 @@ static void mvneta_start_dev(struct mvne
mvreg_write(pp, MVNETA_INTR_MISC_MASK,
MVNETA_CAUSE_PHY_STATUS_CHANGE |
phylink_start(pp->phylink);
netif_tx_start_all_queues(pp->dev);
-@@ -3440,8 +3441,7 @@ static int mvneta_cpu_online(unsigned in
+@@ -3438,8 +3439,7 @@ static int mvneta_cpu_online(unsigned in
on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true);
mvreg_write(pp, MVNETA_INTR_MISC_MASK,
MVNETA_CAUSE_PHY_STATUS_CHANGE |
netif_tx_start_all_queues(pp->dev);
spin_unlock(&pp->lock);
return 0;
-@@ -3482,8 +3482,7 @@ static int mvneta_cpu_dead(unsigned int
+@@ -3480,8 +3480,7 @@ static int mvneta_cpu_dead(unsigned int
on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true);
mvreg_write(pp, MVNETA_INTR_MISC_MASK,
MVNETA_CAUSE_PHY_STATUS_CHANGE |
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3616,6 +3616,13 @@ mvneta_ethtool_get_link_ksettings(struct
+@@ -3614,6 +3614,13 @@ mvneta_ethtool_get_link_ksettings(struct
return phylink_ethtool_ksettings_get(pp->phylink, cmd);
}
/* Set interrupt coalescing for ethtools */
static int mvneta_ethtool_set_coalesce(struct net_device *dev,
struct ethtool_coalesce *c)
-@@ -3889,6 +3896,7 @@ static const struct net_device_ops mvnet
+@@ -3887,6 +3894,7 @@ static const struct net_device_ops mvnet
};
const struct ethtool_ops mvneta_eth_tool_ops = {
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3180,6 +3180,12 @@ static int mvneta_mac_link_state(struct
+@@ -3178,6 +3178,12 @@ static int mvneta_mac_link_state(struct
state->link = !!(gmac_stat & MVNETA_GMAC_LINK_UP);
state->duplex = !!(gmac_stat & MVNETA_GMAC_FULL_DUPLEX);
return 1;
}
-@@ -3222,6 +3228,8 @@ static void mvneta_mac_config(struct net
+@@ -3220,6 +3226,8 @@ static void mvneta_mac_config(struct net
if (phylink_test(state->advertising, Pause))
new_an |= MVNETA_GMAC_ADVERT_SYM_FLOW_CTRL;
switch (mode) {
case MLO_AN_SGMII:
-@@ -3246,7 +3254,7 @@ static void mvneta_mac_config(struct net
+@@ -3244,7 +3252,7 @@ static void mvneta_mac_config(struct net
/* The MAC only supports FD mode */
MVNETA_GMAC_CONFIG_FULL_DUPLEX;
new_an |= MVNETA_GMAC_AN_FLOW_CTRL_EN;
break;
-@@ -3712,6 +3720,22 @@ static int mvneta_ethtool_set_ringparam(
+@@ -3710,6 +3718,22 @@ static int mvneta_ethtool_set_ringparam(
return 0;
}
static void mvneta_ethtool_get_strings(struct net_device *netdev, u32 sset,
u8 *data)
{
-@@ -3903,6 +3927,8 @@ const struct ethtool_ops mvneta_eth_tool
+@@ -3901,6 +3925,8 @@ const struct ethtool_ops mvneta_eth_tool
.get_drvinfo = mvneta_ethtool_get_drvinfo,
.get_ringparam = mvneta_ethtool_get_ringparam,
.set_ringparam = mvneta_ethtool_set_ringparam,
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3154,10 +3154,11 @@ static void mvneta_validate_support(stru
+@@ -3152,10 +3152,11 @@ static void mvneta_validate_support(stru
phylink_set(mask, 10baseT_Full);
phylink_set(mask, 100baseT_Half);
phylink_set(mask, 100baseT_Full);
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3144,6 +3144,8 @@ static void mvneta_validate_support(stru
+@@ -3142,6 +3142,8 @@ static void mvneta_validate_support(stru
phylink_set(mask, BNC);
phylink_set(mask, Backplane);
/* Half-duplex at speeds higher than 100Mbit is unsupported */
phylink_set(mask, 1000baseT_Full);
phylink_set(mask, 1000baseX_Full);
-@@ -3156,9 +3158,6 @@ static void mvneta_validate_support(stru
+@@ -3154,9 +3156,6 @@ static void mvneta_validate_support(stru
phylink_set(mask, 100baseT_Full);
}
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3306,7 +3306,8 @@ static void mvneta_mac_link_down(struct
+@@ -3304,7 +3304,8 @@ static void mvneta_mac_link_down(struct
}
}
u64 ethtool_stats[ARRAY_SIZE(mvneta_statistics)];
u32 indir[MVNETA_RSS_LU_TABLE_SIZE];
-@@ -3291,6 +3308,18 @@ static void mvneta_mac_config(struct net
+@@ -3289,6 +3306,18 @@ static void mvneta_mac_config(struct net
mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, new_an);
}
static void mvneta_mac_link_down(struct net_device *ndev, unsigned int mode)
{
struct mvneta_port *pp = netdev_priv(ndev);
-@@ -3304,6 +3333,9 @@ static void mvneta_mac_link_down(struct
+@@ -3302,6 +3331,9 @@ static void mvneta_mac_link_down(struct
val |= MVNETA_GMAC_FORCE_LINK_DOWN;
mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val);
}
}
static void mvneta_mac_link_up(struct net_device *ndev, unsigned int mode,
-@@ -3320,6 +3352,11 @@ static void mvneta_mac_link_up(struct ne
+@@ -3318,6 +3350,11 @@ static void mvneta_mac_link_up(struct ne
}
mvneta_port_up(pp);
}
static const struct phylink_mac_ops mvneta_phylink_ops = {
-@@ -3772,6 +3809,13 @@ static void mvneta_ethtool_update_stats(
+@@ -3770,6 +3807,13 @@ static void mvneta_ethtool_update_stats(
high = readl_relaxed(base + s->offset + 4);
val = (u64)high << 32 | low;
break;
}
pp->ethtool_stats[i] += val;
-@@ -3907,6 +3951,47 @@ static u16 mvneta_select_queue(struct ne
+@@ -3905,6 +3949,47 @@ static u16 mvneta_select_queue(struct ne
}
static const struct net_device_ops mvneta_netdev_ops = {
.ndo_open = mvneta_open,
.ndo_stop = mvneta_stop,
-@@ -3939,6 +4024,8 @@ const struct ethtool_ops mvneta_eth_tool
+@@ -3937,6 +4022,8 @@ const struct ethtool_ops mvneta_eth_tool
.set_rxfh = mvneta_ethtool_set_rxfh,
.get_link_ksettings = mvneta_ethtool_get_link_ksettings,
.set_link_ksettings = mvneta_ethtool_set_link_ksettings,
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -3951,6 +3951,22 @@ static u16 mvneta_select_queue(struct ne
+@@ -3949,6 +3949,22 @@ static u16 mvneta_select_queue(struct ne
}
static int mvneta_ethtool_get_eee(struct net_device *dev,
struct ethtool_eee *eee)
{
-@@ -4024,6 +4040,8 @@ const struct ethtool_ops mvneta_eth_tool
+@@ -4022,6 +4038,8 @@ const struct ethtool_ops mvneta_eth_tool
.set_rxfh = mvneta_ethtool_set_rxfh,
.get_link_ksettings = mvneta_ethtool_get_link_ksettings,
.set_link_ksettings = mvneta_ethtool_set_link_ksettings,
* (preallocated during init) then the packet is
* ignored
*/
-@@ -2669,7 +2667,7 @@ static int stmmac_poll(struct napi_struc
-
- work_done = stmmac_rx(priv, budget);
- if (work_done < budget) {
-- napi_complete(napi);
-+ napi_complete_done(napi, work_done);
- stmmac_enable_dma_irq(priv);
- }
- return work_done;
@@ -2762,7 +2760,7 @@ static netdev_features_t stmmac_fix_feat
/* Some GMAC devices have a bugged Jumbo frame support that
* needs to have the Tx COE disabled for oversized frames