mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 22:44:27 -05:00 
			
		
		
		
	ramips: ethernet: ralink: allow to return EPROBE_DEFER on switch_init
For rt3050 the switch needs to be initialized before the ethernet start sending packets. Allow switch_init to return -EPROBE_DEFER. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
This commit is contained in:
		
							parent
							
								
									60fadae62b
								
							
						
					
					
						commit
						74c58c9d58
					
				@ -1376,11 +1376,16 @@ static int __init fe_init(struct net_device *dev)
 | 
			
		||||
	else
 | 
			
		||||
		fe_reset_fe(priv);
 | 
			
		||||
 | 
			
		||||
	if (priv->soc->switch_init)
 | 
			
		||||
		if (priv->soc->switch_init(priv)) {
 | 
			
		||||
	if (priv->soc->switch_init) {
 | 
			
		||||
		err = priv->soc->switch_init(priv);
 | 
			
		||||
		if (err) {
 | 
			
		||||
			if (err == -EPROBE_DEFER)
 | 
			
		||||
				return err;
 | 
			
		||||
 | 
			
		||||
			netdev_err(dev, "failed to initialize switch core\n");
 | 
			
		||||
			return -ENODEV;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	fe_reset_phy(priv);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user