mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 22:44:27 -05:00 
			
		
		
		
	generic: rtl8366: enable vlans before enabling the ports
SVN-Revision: 24939
This commit is contained in:
		
							parent
							
								
									c16715f8d2
								
							
						
					
					
						commit
						792a1fb2c0
					
				@ -448,7 +448,7 @@ static int rtl8366_set_pvid(struct rtl8366_smi *smi, unsigned port,
 | 
			
		||||
	return -ENOSPC;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int rtl8366_enable_vlan(struct rtl8366_smi *smi, int enable)
 | 
			
		||||
int rtl8366_enable_vlan(struct rtl8366_smi *smi, int enable)
 | 
			
		||||
{
 | 
			
		||||
	int err;
 | 
			
		||||
 | 
			
		||||
@ -465,6 +465,7 @@ static int rtl8366_enable_vlan(struct rtl8366_smi *smi, int enable)
 | 
			
		||||
 | 
			
		||||
	return err;
 | 
			
		||||
}
 | 
			
		||||
EXPORT_SYMBOL_GPL(rtl8366_enable_vlan);
 | 
			
		||||
 | 
			
		||||
static int rtl8366_enable_vlan4k(struct rtl8366_smi *smi, int enable)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
@ -104,6 +104,7 @@ int rtl8366_smi_read_reg(struct rtl8366_smi *smi, u32 addr, u32 *data);
 | 
			
		||||
int rtl8366_smi_rmwr(struct rtl8366_smi *smi, u32 addr, u32 mask, u32 data);
 | 
			
		||||
 | 
			
		||||
int rtl8366_reset_vlan(struct rtl8366_smi *smi);
 | 
			
		||||
int rtl8366_enable_vlan(struct rtl8366_smi *smi, int enable);
 | 
			
		||||
int rtl8366_enable_all_ports(struct rtl8366_smi *smi, int enable);
 | 
			
		||||
 | 
			
		||||
#ifdef CONFIG_RTL8366S_PHY_DEBUG_FS
 | 
			
		||||
 | 
			
		||||
@ -963,6 +963,10 @@ static int rtl8366rb_sw_reset_switch(struct switch_dev *dev)
 | 
			
		||||
	if (err)
 | 
			
		||||
		return err;
 | 
			
		||||
 | 
			
		||||
	err = rtl8366_enable_vlan(smi, 1);
 | 
			
		||||
	if (err)
 | 
			
		||||
		return err;
 | 
			
		||||
 | 
			
		||||
	return rtl8366_enable_all_ports(smi, 1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -809,6 +809,10 @@ static int rtl8366s_sw_reset_switch(struct switch_dev *dev)
 | 
			
		||||
	if (err)
 | 
			
		||||
		return err;
 | 
			
		||||
 | 
			
		||||
	err = rtl8366_enable_vlan(smi, 1);
 | 
			
		||||
	if (err)
 | 
			
		||||
		return err;
 | 
			
		||||
 | 
			
		||||
	return rtl8366_enable_all_ports(smi, 1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user