Merge branch 'mvneta-fixes'
Gregory CLEMENT says: ==================== Few mvneta fixes In this second version I split the last patch in two parts as requested. For the record the initial cover letter was: "here is a patch set of few fixes. Without the first one, a kernel configured with debug features ended to hang when the driver is built as a module and is removed. This is quite is annoying for debugging! The second patch fix a forgotten flag at the initial submission of the driver. The third patch is only really a cosmetic one so I have no problem to not apply it for 4.5 and wait for 4.6. I really would like to see the first one applied for 4.5 and for the second I let you judge if it something needed for now or that should wait the next release." ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
d98654a7f3
@ -1107,14 +1107,14 @@ static void mvneta_port_down(struct mvneta_port *pp)
|
||||
do {
|
||||
if (count++ >= MVNETA_RX_DISABLE_TIMEOUT_MSEC) {
|
||||
netdev_warn(pp->dev,
|
||||
"TIMEOUT for RX stopped ! rx_queue_cmd: 0x08%x\n",
|
||||
"TIMEOUT for RX stopped ! rx_queue_cmd: 0x%08x\n",
|
||||
val);
|
||||
break;
|
||||
}
|
||||
mdelay(1);
|
||||
|
||||
val = mvreg_read(pp, MVNETA_RXQ_CMD);
|
||||
} while (val & 0xff);
|
||||
} while (val & MVNETA_RXQ_ENABLE_MASK);
|
||||
|
||||
/* Stop Tx port activity. Check port Tx activity. Issue stop
|
||||
* command for active channels only
|
||||
@ -1139,14 +1139,14 @@ static void mvneta_port_down(struct mvneta_port *pp)
|
||||
/* Check TX Command reg that all Txqs are stopped */
|
||||
val = mvreg_read(pp, MVNETA_TXQ_CMD);
|
||||
|
||||
} while (val & 0xff);
|
||||
} while (val & MVNETA_TXQ_ENABLE_MASK);
|
||||
|
||||
/* Double check to verify that TX FIFO is empty */
|
||||
count = 0;
|
||||
do {
|
||||
if (count++ >= MVNETA_TX_FIFO_EMPTY_TIMEOUT) {
|
||||
netdev_warn(pp->dev,
|
||||
"TX FIFO empty timeout status=0x08%x\n",
|
||||
"TX FIFO empty timeout status=0x%08x\n",
|
||||
val);
|
||||
break;
|
||||
}
|
||||
@ -3480,17 +3480,17 @@ static int mvneta_stop(struct net_device *dev)
|
||||
struct mvneta_port *pp = netdev_priv(dev);
|
||||
|
||||
/* Inform that we are stopping so we don't want to setup the
|
||||
* driver for new CPUs in the notifiers
|
||||
* driver for new CPUs in the notifiers. The code of the
|
||||
* notifier for CPU online is protected by the same spinlock,
|
||||
* so when we get the lock, the notifer work is done.
|
||||
*/
|
||||
spin_lock(&pp->lock);
|
||||
pp->is_stopped = true;
|
||||
spin_unlock(&pp->lock);
|
||||
|
||||
mvneta_stop_dev(pp);
|
||||
mvneta_mdio_remove(pp);
|
||||
unregister_cpu_notifier(&pp->cpu_notifier);
|
||||
/* Now that the notifier are unregistered, we can release le
|
||||
* lock
|
||||
*/
|
||||
spin_unlock(&pp->lock);
|
||||
on_each_cpu(mvneta_percpu_disable, pp, true);
|
||||
free_percpu_irq(dev->irq, pp->ports);
|
||||
mvneta_cleanup_rxqs(pp);
|
||||
@ -4023,6 +4023,7 @@ static int mvneta_probe(struct platform_device *pdev)
|
||||
dev->ethtool_ops = &mvneta_eth_tool_ops;
|
||||
|
||||
pp = netdev_priv(dev);
|
||||
spin_lock_init(&pp->lock);
|
||||
pp->phy_node = phy_node;
|
||||
pp->phy_interface = phy_mode;
|
||||
|
||||
@ -4144,7 +4145,7 @@ static int mvneta_probe(struct platform_device *pdev)
|
||||
dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO;
|
||||
dev->hw_features |= dev->features;
|
||||
dev->vlan_features |= dev->features;
|
||||
dev->priv_flags |= IFF_UNICAST_FLT;
|
||||
dev->priv_flags |= IFF_UNICAST_FLT | IFF_LIVE_ADDR_CHANGE;
|
||||
dev->gso_max_segs = MVNETA_MAX_TSO_SEGS;
|
||||
|
||||
err = register_netdev(dev);
|
||||
|
Loading…
x
Reference in New Issue
Block a user