kernel: update and refresh patches

The lantiq patch 0028-NET-lantiq-various-etop-fixes.patch and sunxi
patch 0051-stmmac-form-4-11.patch no longer applied after applying the
the "generalize napi_complete_done()" patch.
Update them so they apply, and refresh patches while at it.

Fixes: 9aeb7ce8dc ("generic: net: generalize napi_complete_done")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
owl
Stijn Tintel 2017-09-28 10:08:59 +03:00
parent 9aeb7ce8dc
commit 239dff6697
14 changed files with 78 additions and 88 deletions

View File

@ -203,28 +203,27 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
}
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 =
@ -240,7 +239,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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);
@ -250,7 +249,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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;
@ -264,7 +263,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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);
@ -273,7 +272,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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);
@ -329,11 +328,10 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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 */
@ -342,7 +340,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ 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,
@ -441,7 +440,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
}
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)
{
@ -453,7 +452,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
}
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
@ -493,7 +492,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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;
@ -505,7 +504,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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);
@ -522,7 +521,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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;
@ -542,7 +541,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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),
@ -569,7 +568,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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;
@ -585,7 +584,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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);
@ -614,7 +613,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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);
@ -644,7 +643,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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);
@ -666,7 +665,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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;
@ -675,7 +674,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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);
@ -690,7 +689,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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;
@ -702,7 +701,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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);
@ -712,7 +711,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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);
@ -726,7 +725,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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;
@ -736,7 +735,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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,
};
@ -760,7 +759,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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;
}
@ -838,7 +837,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
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;
}

View File

@ -204,7 +204,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+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;

View File

@ -63,7 +63,7 @@
/* 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)
{
@ -72,7 +72,7 @@
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);

View File

@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- 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;
}
@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
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,

View File

@ -182,7 +182,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
}
/* 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;
@ -190,7 +190,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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);
@ -209,7 +209,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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;
}
@ -490,7 +490,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
}
/* 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)
{
@ -503,7 +503,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
}
/* 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);
@ -557,7 +557,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
}
/* 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;
@ -591,7 +591,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
}
}
@@ -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,
@ -600,7 +600,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
.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;
@ -616,7 +616,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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;
}
@ -649,7 +649,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
}
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);
@ -663,7 +663,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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);
@ -672,7 +672,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
}
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;
@ -687,7 +687,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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);
@ -702,7 +702,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
return 0;
err_netdev:
@@ -4210,16 +4215,14 @@ err_netdev:
@@ -4208,16 +4213,14 @@ err_netdev:
1 << pp->id);
}
err_free_stats:
@ -721,7 +721,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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);
@ -729,7 +729,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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);

View File

@ -26,7 +26,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
}
/* 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 |
@ -36,7 +36,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
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 |
@ -46,7 +46,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
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 |

View File

@ -11,7 +11,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--- 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);
}
@ -25,7 +25,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
/* 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 = {

View File

@ -11,7 +11,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--- 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);
@ -24,7 +24,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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;
@ -33,7 +33,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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;
@ -42,7 +42,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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;
}
@ -65,7 +65,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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,

View File

@ -12,7 +12,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--- 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);

View File

@ -11,7 +11,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- 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);
@ -20,7 +20,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/* 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);
}

View File

@ -10,7 +10,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--- 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
}
}

View File

@ -65,7 +65,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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);
}
@ -84,7 +84,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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);
}
@ -94,7 +94,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
}
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);
@ -106,7 +106,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
}
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;
@ -120,7 +120,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
}
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
}
@ -168,7 +168,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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,

View File

@ -7,7 +7,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--- 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
}
@ -30,7 +30,7 @@ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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,

View File

@ -1736,15 +1736,6 @@
* (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