bnx2x: Fix port swap for BCM8073
Fix link on BCM57712 + BCM8073 when port swap is enabled. Common PHY reset was done on the wrong port. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
					parent
					
						
							
								53eda06def
							
						
					
				
			
			
				commit
				
					
						c8e64df48a
					
				
			
		
					 1 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
					@ -7688,10 +7688,13 @@ static u8 bnx2x_8073_common_init_phy(struct bnx2x *bp,
 | 
				
			||||||
	struct bnx2x_phy phy[PORT_MAX];
 | 
						struct bnx2x_phy phy[PORT_MAX];
 | 
				
			||||||
	struct bnx2x_phy *phy_blk[PORT_MAX];
 | 
						struct bnx2x_phy *phy_blk[PORT_MAX];
 | 
				
			||||||
	u16 val;
 | 
						u16 val;
 | 
				
			||||||
	s8 port;
 | 
						s8 port = 0;
 | 
				
			||||||
	s8 port_of_path = 0;
 | 
						s8 port_of_path = 0;
 | 
				
			||||||
 | 
						u32 swap_val, swap_override;
 | 
				
			||||||
	bnx2x_ext_phy_hw_reset(bp, 0);
 | 
						swap_val = REG_RD(bp,  NIG_REG_PORT_SWAP);
 | 
				
			||||||
 | 
						swap_override = REG_RD(bp,  NIG_REG_STRAP_OVERRIDE);
 | 
				
			||||||
 | 
						port ^= (swap_val && swap_override);
 | 
				
			||||||
 | 
						bnx2x_ext_phy_hw_reset(bp, port);
 | 
				
			||||||
	/* PART1 - Reset both phys */
 | 
						/* PART1 - Reset both phys */
 | 
				
			||||||
	for (port = PORT_MAX - 1; port >= PORT_0; port--) {
 | 
						for (port = PORT_MAX - 1; port >= PORT_0; port--) {
 | 
				
			||||||
		u32 shmem_base, shmem2_base;
 | 
							u32 shmem_base, shmem2_base;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue