Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69d728ba authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller
Browse files

igb: loopback bits not correctly cleared from RCTL register



This change forces the bits to 0 by using an &= operation with an inverted
mask of all options instead of using an |= with a value of 0.

Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9b07f3d3
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1339,8 +1339,9 @@ static int igb_setup_desc_rings(struct igb_adapter *adapter)
	wr32(E1000_RDLEN(0), rx_ring->size);
	wr32(E1000_RDLEN(0), rx_ring->size);
	wr32(E1000_RDH(0), 0);
	wr32(E1000_RDH(0), 0);
	wr32(E1000_RDT(0), 0);
	wr32(E1000_RDT(0), 0);
	rctl &= ~(E1000_RCTL_LBM_TCVR | E1000_RCTL_LBM_MAC);
	rctl = E1000_RCTL_EN | E1000_RCTL_BAM | E1000_RCTL_SZ_2048 |
	rctl = E1000_RCTL_EN | E1000_RCTL_BAM | E1000_RCTL_SZ_2048 |
		E1000_RCTL_LBM_NO | E1000_RCTL_RDMTS_HALF |
		E1000_RCTL_RDMTS_HALF |
		(adapter->hw.mac.mc_filter_type << E1000_RCTL_MO_SHIFT);
		(adapter->hw.mac.mc_filter_type << E1000_RCTL_MO_SHIFT);
	wr32(E1000_RCTL, rctl);
	wr32(E1000_RCTL, rctl);
	wr32(E1000_SRRCTL(0), 0);
	wr32(E1000_SRRCTL(0), 0);
+2 −2
Original line number Original line Diff line number Diff line
@@ -1779,9 +1779,9 @@ static void igb_setup_rctl(struct igb_adapter *adapter)
	rctl = rd32(E1000_RCTL);
	rctl = rd32(E1000_RCTL);


	rctl &= ~(3 << E1000_RCTL_MO_SHIFT);
	rctl &= ~(3 << E1000_RCTL_MO_SHIFT);
	rctl &= ~(E1000_RCTL_LBM_TCVR | E1000_RCTL_LBM_MAC);


	rctl |= E1000_RCTL_EN | E1000_RCTL_BAM |
	rctl |= E1000_RCTL_EN | E1000_RCTL_BAM | E1000_RCTL_RDMTS_HALF |
		E1000_RCTL_LBM_NO | E1000_RCTL_RDMTS_HALF |
		(adapter->hw.mac.mc_filter_type << E1000_RCTL_MO_SHIFT);
		(adapter->hw.mac.mc_filter_type << E1000_RCTL_MO_SHIFT);


	/*
	/*