|
@@ -132,7 +132,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
u64 ethtool_stats[ARRAY_SIZE(mvneta_statistics)];
|
|
u64 ethtool_stats[ARRAY_SIZE(mvneta_statistics)];
|
|
|
|
|
|
u32 indir[MVNETA_RSS_LU_TABLE_SIZE];
|
|
u32 indir[MVNETA_RSS_LU_TABLE_SIZE];
|
|
-@@ -1214,10 +1233,6 @@ static void mvneta_port_disable(struct m
|
|
|
|
|
|
+@@ -1215,10 +1234,6 @@ static void mvneta_port_disable(struct m
|
|
val &= ~MVNETA_GMAC0_PORT_ENABLE;
|
|
val &= ~MVNETA_GMAC0_PORT_ENABLE;
|
|
mvreg_write(pp, MVNETA_GMAC_CTRL_0, val);
|
|
mvreg_write(pp, MVNETA_GMAC_CTRL_0, val);
|
|
|
|
|
|
@@ -143,7 +143,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
udelay(200);
|
|
udelay(200);
|
|
}
|
|
}
|
|
|
|
|
|
-@@ -1277,44 +1292,6 @@ static void mvneta_set_other_mcast_table
|
|
|
|
|
|
+@@ -1278,44 +1293,6 @@ static void mvneta_set_other_mcast_table
|
|
mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + offset, val);
|
|
mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + offset, val);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -188,7 +188,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
static void mvneta_percpu_unmask_interrupt(void *arg)
|
|
static void mvneta_percpu_unmask_interrupt(void *arg)
|
|
{
|
|
{
|
|
struct mvneta_port *pp = arg;
|
|
struct mvneta_port *pp = arg;
|
|
-@@ -1467,7 +1444,6 @@ static void mvneta_defaults_set(struct m
|
|
|
|
|
|
+@@ -1468,7 +1445,6 @@ static void mvneta_defaults_set(struct m
|
|
val &= ~MVNETA_PHY_POLLING_ENABLE;
|
|
val &= ~MVNETA_PHY_POLLING_ENABLE;
|
|
mvreg_write(pp, MVNETA_UNIT_CONTROL, val);
|
|
mvreg_write(pp, MVNETA_UNIT_CONTROL, val);
|
|
|
|
|
|
@@ -196,7 +196,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
mvneta_set_ucast_table(pp, -1);
|
|
mvneta_set_ucast_table(pp, -1);
|
|
mvneta_set_special_mcast_table(pp, -1);
|
|
mvneta_set_special_mcast_table(pp, -1);
|
|
mvneta_set_other_mcast_table(pp, -1);
|
|
mvneta_set_other_mcast_table(pp, -1);
|
|
-@@ -2692,26 +2668,11 @@ static irqreturn_t mvneta_percpu_isr(int
|
|
|
|
|
|
+@@ -2693,26 +2669,11 @@ static irqreturn_t mvneta_percpu_isr(int
|
|
return IRQ_HANDLED;
|
|
return IRQ_HANDLED;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -225,7 +225,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
}
|
|
}
|
|
|
|
|
|
/* NAPI handler
|
|
/* NAPI handler
|
|
-@@ -2727,7 +2688,6 @@ static int mvneta_poll(struct napi_struc
|
|
|
|
|
|
+@@ -2728,7 +2689,6 @@ static int mvneta_poll(struct napi_struc
|
|
u32 cause_rx_tx;
|
|
u32 cause_rx_tx;
|
|
int rx_queue;
|
|
int rx_queue;
|
|
struct mvneta_port *pp = netdev_priv(napi->dev);
|
|
struct mvneta_port *pp = netdev_priv(napi->dev);
|
|
@@ -233,7 +233,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
struct mvneta_pcpu_port *port = this_cpu_ptr(pp->ports);
|
|
struct mvneta_pcpu_port *port = this_cpu_ptr(pp->ports);
|
|
|
|
|
|
if (!netif_running(pp->dev)) {
|
|
if (!netif_running(pp->dev)) {
|
|
-@@ -2741,12 +2701,11 @@ static int mvneta_poll(struct napi_struc
|
|
|
|
|
|
+@@ -2742,12 +2702,11 @@ static int mvneta_poll(struct napi_struc
|
|
u32 cause_misc = mvreg_read(pp, MVNETA_INTR_MISC_CAUSE);
|
|
u32 cause_misc = mvreg_read(pp, MVNETA_INTR_MISC_CAUSE);
|
|
|
|
|
|
mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0);
|
|
mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0);
|
|
@@ -251,7 +251,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
}
|
|
}
|
|
|
|
|
|
/* Release Tx descriptors */
|
|
/* Release Tx descriptors */
|
|
-@@ -3060,7 +3019,6 @@ static int mvneta_setup_txqs(struct mvne
|
|
|
|
|
|
+@@ -3061,7 +3020,6 @@ static int mvneta_setup_txqs(struct mvne
|
|
static void mvneta_start_dev(struct mvneta_port *pp)
|
|
static void mvneta_start_dev(struct mvneta_port *pp)
|
|
{
|
|
{
|
|
int cpu;
|
|
int cpu;
|
|
@@ -259,7 +259,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
|
|
|
|
mvneta_max_rx_size_set(pp, pp->pkt_size);
|
|
mvneta_max_rx_size_set(pp, pp->pkt_size);
|
|
mvneta_txq_max_tx_size_set(pp, pp->pkt_size);
|
|
mvneta_txq_max_tx_size_set(pp, pp->pkt_size);
|
|
-@@ -3088,16 +3046,15 @@ static void mvneta_start_dev(struct mvne
|
|
|
|
|
|
+@@ -3089,16 +3047,15 @@ static void mvneta_start_dev(struct mvne
|
|
MVNETA_CAUSE_LINK_CHANGE |
|
|
MVNETA_CAUSE_LINK_CHANGE |
|
|
MVNETA_CAUSE_PSC_SYNC_CHANGE);
|
|
MVNETA_CAUSE_PSC_SYNC_CHANGE);
|
|
|
|
|
|
@@ -278,7 +278,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
|
|
|
|
if (!pp->neta_armada3700) {
|
|
if (!pp->neta_armada3700) {
|
|
for_each_online_cpu(cpu) {
|
|
for_each_online_cpu(cpu) {
|
|
-@@ -3251,103 +3208,232 @@ static int mvneta_set_mac_addr(struct ne
|
|
|
|
|
|
+@@ -3252,103 +3209,232 @@ static int mvneta_set_mac_addr(struct ne
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -585,7 +585,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
}
|
|
}
|
|
|
|
|
|
/* Electing a CPU must be done in an atomic way: it should be done
|
|
/* Electing a CPU must be done in an atomic way: it should be done
|
|
-@@ -3626,10 +3712,9 @@ static int mvneta_stop(struct net_device
|
|
|
|
|
|
+@@ -3627,10 +3713,9 @@ static int mvneta_stop(struct net_device
|
|
|
|
|
|
static int mvneta_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
|
static int mvneta_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
|
{
|
|
{
|
|
@@ -598,7 +598,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
}
|
|
}
|
|
|
|
|
|
/* Ethtool methods */
|
|
/* Ethtool methods */
|
|
-@@ -3640,44 +3725,25 @@ mvneta_ethtool_set_link_ksettings(struct
|
|
|
|
|
|
+@@ -3641,44 +3726,25 @@ mvneta_ethtool_set_link_ksettings(struct
|
|
const struct ethtool_link_ksettings *cmd)
|
|
const struct ethtool_link_ksettings *cmd)
|
|
{
|
|
{
|
|
struct mvneta_port *pp = netdev_priv(ndev);
|
|
struct mvneta_port *pp = netdev_priv(ndev);
|
|
@@ -657,7 +657,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
}
|
|
}
|
|
|
|
|
|
/* Set interrupt coalescing for ethtools */
|
|
/* Set interrupt coalescing for ethtools */
|
|
-@@ -3769,6 +3835,22 @@ static int mvneta_ethtool_set_ringparam(
|
|
|
|
|
|
+@@ -3770,6 +3836,22 @@ static int mvneta_ethtool_set_ringparam(
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -680,7 +680,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
static void mvneta_ethtool_get_strings(struct net_device *netdev, u32 sset,
|
|
static void mvneta_ethtool_get_strings(struct net_device *netdev, u32 sset,
|
|
u8 *data)
|
|
u8 *data)
|
|
{
|
|
{
|
|
-@@ -3785,26 +3867,35 @@ static void mvneta_ethtool_update_stats(
|
|
|
|
|
|
+@@ -3786,26 +3868,35 @@ static void mvneta_ethtool_update_stats(
|
|
{
|
|
{
|
|
const struct mvneta_statistic *s;
|
|
const struct mvneta_statistic *s;
|
|
void __iomem *base = pp->base;
|
|
void __iomem *base = pp->base;
|
|
@@ -721,7 +721,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-@@ -3939,28 +4030,65 @@ static int mvneta_ethtool_get_rxfh(struc
|
|
|
|
|
|
+@@ -3940,28 +4031,65 @@ static int mvneta_ethtool_get_rxfh(struc
|
|
static void mvneta_ethtool_get_wol(struct net_device *dev,
|
|
static void mvneta_ethtool_get_wol(struct net_device *dev,
|
|
struct ethtool_wolinfo *wol)
|
|
struct ethtool_wolinfo *wol)
|
|
{
|
|
{
|
|
@@ -795,7 +795,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
static u16 mvneta_select_queue(struct net_device *dev, struct sk_buff *skb,
|
|
static u16 mvneta_select_queue(struct net_device *dev, struct sk_buff *skb,
|
|
void *accel_priv,
|
|
void *accel_priv,
|
|
select_queue_fallback_t fallback)
|
|
select_queue_fallback_t fallback)
|
|
-@@ -3984,13 +4112,15 @@ static const struct net_device_ops mvnet
|
|
|
|
|
|
+@@ -3985,13 +4113,15 @@ static const struct net_device_ops mvnet
|
|
};
|
|
};
|
|
|
|
|
|
static const struct ethtool_ops mvneta_eth_tool_ops = {
|
|
static const struct ethtool_ops mvneta_eth_tool_ops = {
|
|
@@ -812,7 +812,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
.get_strings = mvneta_ethtool_get_strings,
|
|
.get_strings = mvneta_ethtool_get_strings,
|
|
.get_ethtool_stats = mvneta_ethtool_get_stats,
|
|
.get_ethtool_stats = mvneta_ethtool_get_stats,
|
|
.get_sset_count = mvneta_ethtool_get_sset_count,
|
|
.get_sset_count = mvneta_ethtool_get_sset_count,
|
|
-@@ -3998,10 +4128,12 @@ static const struct ethtool_ops mvneta_e
|
|
|
|
|
|
+@@ -3999,10 +4129,12 @@ static const struct ethtool_ops mvneta_e
|
|
.get_rxnfc = mvneta_ethtool_get_rxnfc,
|
|
.get_rxnfc = mvneta_ethtool_get_rxnfc,
|
|
.get_rxfh = mvneta_ethtool_get_rxfh,
|
|
.get_rxfh = mvneta_ethtool_get_rxfh,
|
|
.set_rxfh = mvneta_ethtool_set_rxfh,
|
|
.set_rxfh = mvneta_ethtool_set_rxfh,
|
|
@@ -826,7 +826,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
};
|
|
};
|
|
|
|
|
|
/* Initialize hw */
|
|
/* Initialize hw */
|
|
-@@ -4146,14 +4278,13 @@ static int mvneta_probe(struct platform_
|
|
|
|
|
|
+@@ -4147,14 +4279,13 @@ static int mvneta_probe(struct platform_
|
|
{
|
|
{
|
|
struct resource *res;
|
|
struct resource *res;
|
|
struct device_node *dn = pdev->dev.of_node;
|
|
struct device_node *dn = pdev->dev.of_node;
|
|
@@ -842,7 +842,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
int tx_csum_limit;
|
|
int tx_csum_limit;
|
|
int phy_mode;
|
|
int phy_mode;
|
|
int err;
|
|
int err;
|
|
-@@ -4169,31 +4300,11 @@ static int mvneta_probe(struct platform_
|
|
|
|
|
|
+@@ -4170,31 +4301,11 @@ static int mvneta_probe(struct platform_
|
|
goto err_free_netdev;
|
|
goto err_free_netdev;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -875,7 +875,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
}
|
|
}
|
|
|
|
|
|
dev->tx_queue_len = MVNETA_MAX_TXD;
|
|
dev->tx_queue_len = MVNETA_MAX_TXD;
|
|
-@@ -4204,12 +4315,7 @@ static int mvneta_probe(struct platform_
|
|
|
|
|
|
+@@ -4205,12 +4316,7 @@ static int mvneta_probe(struct platform_
|
|
|
|
|
|
pp = netdev_priv(dev);
|
|
pp = netdev_priv(dev);
|
|
spin_lock_init(&pp->lock);
|
|
spin_lock_init(&pp->lock);
|
|
@@ -889,7 +889,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
|
|
|
|
pp->rxq_def = rxq_def;
|
|
pp->rxq_def = rxq_def;
|
|
|
|
|
|
-@@ -4231,7 +4337,7 @@ static int mvneta_probe(struct platform_
|
|
|
|
|
|
+@@ -4232,7 +4338,7 @@ static int mvneta_probe(struct platform_
|
|
pp->clk = devm_clk_get(&pdev->dev, NULL);
|
|
pp->clk = devm_clk_get(&pdev->dev, NULL);
|
|
if (IS_ERR(pp->clk)) {
|
|
if (IS_ERR(pp->clk)) {
|
|
err = PTR_ERR(pp->clk);
|
|
err = PTR_ERR(pp->clk);
|
|
@@ -898,7 +898,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
}
|
|
}
|
|
|
|
|
|
clk_prepare_enable(pp->clk);
|
|
clk_prepare_enable(pp->clk);
|
|
-@@ -4357,6 +4463,14 @@ static int mvneta_probe(struct platform_
|
|
|
|
|
|
+@@ -4358,6 +4464,14 @@ static int mvneta_probe(struct platform_
|
|
/* 9676 == 9700 - 20 and rounding to 8 */
|
|
/* 9676 == 9700 - 20 and rounding to 8 */
|
|
dev->max_mtu = 9676;
|
|
dev->max_mtu = 9676;
|
|
|
|
|
|
@@ -913,7 +913,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
err = register_netdev(dev);
|
|
err = register_netdev(dev);
|
|
if (err < 0) {
|
|
if (err < 0) {
|
|
dev_err(&pdev->dev, "failed to register\n");
|
|
dev_err(&pdev->dev, "failed to register\n");
|
|
-@@ -4368,14 +4482,6 @@ static int mvneta_probe(struct platform_
|
|
|
|
|
|
+@@ -4369,14 +4483,6 @@ static int mvneta_probe(struct platform_
|
|
|
|
|
|
platform_set_drvdata(pdev, pp->dev);
|
|
platform_set_drvdata(pdev, pp->dev);
|
|
|
|
|
|
@@ -928,7 +928,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
err_netdev:
|
|
err_netdev:
|
|
-@@ -4386,16 +4492,14 @@ err_netdev:
|
|
|
|
|
|
+@@ -4387,16 +4493,14 @@ err_netdev:
|
|
1 << pp->id);
|
|
1 << pp->id);
|
|
}
|
|
}
|
|
err_free_stats:
|
|
err_free_stats:
|
|
@@ -947,7 +947,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
err_free_irq:
|
|
err_free_irq:
|
|
irq_dispose_mapping(dev->irq);
|
|
irq_dispose_mapping(dev->irq);
|
|
err_free_netdev:
|
|
err_free_netdev:
|
|
-@@ -4407,7 +4511,6 @@ err_free_netdev:
|
|
|
|
|
|
+@@ -4408,7 +4512,6 @@ err_free_netdev:
|
|
static int mvneta_remove(struct platform_device *pdev)
|
|
static int mvneta_remove(struct platform_device *pdev)
|
|
{
|
|
{
|
|
struct net_device *dev = platform_get_drvdata(pdev);
|
|
struct net_device *dev = platform_get_drvdata(pdev);
|
|
@@ -955,7 +955,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
struct mvneta_port *pp = netdev_priv(dev);
|
|
struct mvneta_port *pp = netdev_priv(dev);
|
|
|
|
|
|
unregister_netdev(dev);
|
|
unregister_netdev(dev);
|
|
-@@ -4415,10 +4518,8 @@ static int mvneta_remove(struct platform
|
|
|
|
|
|
+@@ -4416,10 +4519,8 @@ static int mvneta_remove(struct platform
|
|
clk_disable_unprepare(pp->clk);
|
|
clk_disable_unprepare(pp->clk);
|
|
free_percpu(pp->ports);
|
|
free_percpu(pp->ports);
|
|
free_percpu(pp->stats);
|
|
free_percpu(pp->stats);
|
|
@@ -967,7 +967,7 @@ Signed-off-by: Russell King <[email protected]>
|
|
free_netdev(dev);
|
|
free_netdev(dev);
|
|
|
|
|
|
if (pp->bm_priv) {
|
|
if (pp->bm_priv) {
|
|
-@@ -4470,9 +4571,6 @@ static int mvneta_resume(struct device *
|
|
|
|
|
|
+@@ -4471,9 +4572,6 @@ static int mvneta_resume(struct device *
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|