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

Commit bb8e3311 authored by Jeff Garzik's avatar Jeff Garzik
Browse files

e1000: workaround for the ESB2 NIC RX unit issue



In rare occasions, ESB2 systems would end up started without the RX
unit being turned on. Add a check that runs post-init to work around
this issue.

Originally from Jesse Brandeburg <jesse.brandeburg@intel.com>,
rewritten to use feature flags by me.

Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 72f3ab74
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -452,6 +452,12 @@ e1000_set_mac_type(struct e1000_hw *hw)
	if (hw->mac_type >= e1000_82571)
	if (hw->mac_type >= e1000_82571)
		hw->has_manc2h = TRUE;
		hw->has_manc2h = TRUE;


	/* In rare occasions, ESB2 systems would end up started without
	 * the RX unit being turned on.
	 */
	if (hw->mac_type == e1000_80003es2lan)
		hw->rx_needs_kicking = TRUE;

	return E1000_SUCCESS;
	return E1000_SUCCESS;
}
}


+1 −0
Original line number Original line Diff line number Diff line
@@ -1463,6 +1463,7 @@ struct e1000_hw {
	boolean_t		kmrn_lock_loss_workaround_disabled;
	boolean_t		kmrn_lock_loss_workaround_disabled;
	boolean_t		bad_tx_carr_stats_fd;
	boolean_t		bad_tx_carr_stats_fd;
	boolean_t		has_manc2h;
	boolean_t		has_manc2h;
	boolean_t		rx_needs_kicking;
};
};




+7 −0
Original line number Original line Diff line number Diff line
@@ -2579,6 +2579,13 @@ e1000_watchdog(unsigned long data)
			netif_wake_queue(netdev);
			netif_wake_queue(netdev);
			mod_timer(&adapter->phy_info_timer, jiffies + 2 * HZ);
			mod_timer(&adapter->phy_info_timer, jiffies + 2 * HZ);
			adapter->smartspeed = 0;
			adapter->smartspeed = 0;
		} else {
			/* make sure the receive unit is started */
			if (adapter->hw.rx_needs_kicking) {
				struct e1000_hw *hw = &adapter->hw;
				uint32_t rctl = E1000_READ_REG(hw, RCTL);
				E1000_WRITE_REG(hw, RCTL, rctl | E1000_RCTL_EN);
			}
		}
		}
	} else {
	} else {
		if (netif_carrier_ok(netdev)) {
		if (netif_carrier_ok(netdev)) {