From: David S. Miller Date: Wed, 8 Oct 2008 21:56:41 +0000 (-0700) Subject: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4dd565134ece7e5d528d4c5288879310c54419e9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'master' of /linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/e1000e/ich8lan.c drivers/net/e1000e/netdev.c --- 4dd565134ece7e5d528d4c5288879310c54419e9 diff --cc drivers/net/e1000e/e1000.h index 0a1916b0419d,5ea6b60fa377..c55de1c027af --- a/drivers/net/e1000e/e1000.h +++ b/drivers/net/e1000e/e1000.h @@@ -321,8 -306,8 +322,9 @@@ struct e1000_info #define FLAG_HAS_CTRLEXT_ON_LOAD (1 << 5) #define FLAG_HAS_SWSM_ON_LOAD (1 << 6) #define FLAG_HAS_JUMBO_FRAMES (1 << 7) + #define FLAG_READ_ONLY_NVM (1 << 8) #define FLAG_IS_ICH (1 << 9) +#define FLAG_HAS_MSIX (1 << 10) #define FLAG_HAS_SMART_POWER_DOWN (1 << 11) #define FLAG_IS_QUAD_PORT_A (1 << 12) #define FLAG_IS_QUAD_PORT (1 << 13) diff --cc drivers/net/e1000e/ich8lan.c index 692251b60915,bcd2bc477af2..523b9716a543 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c @@@ -398,8 -419,8 +424,10 @@@ static s32 e1000_acquire_swflag_ich8lan if (!timeout) { hw_dbg(hw, "FW or HW has locked the resource for too long.\n"); + extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG; + ew32(EXTCNF_CTRL, extcnf_ctrl); + nvm_owner = -1; + mutex_unlock(&nvm_mutex); return -E1000_ERR_CONFIG; } @@@ -421,24 -442,11 +449,27 @@@ static void e1000_release_swflag_ich8la extcnf_ctrl = er32(EXTCNF_CTRL); extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG; ew32(EXTCNF_CTRL, extcnf_ctrl); + + nvm_owner = -1; + mutex_unlock(&nvm_mutex); } +/** + * e1000_check_mng_mode_ich8lan - Checks management mode + * @hw: pointer to the HW structure + * + * This checks if the adapter has manageability enabled. + * This is a function pointer entry point only called by read/write + * routines for the PHY and NVM parts. + **/ +static bool e1000_check_mng_mode_ich8lan(struct e1000_hw *hw) +{ + u32 fwsm = er32(FWSM); + + return (fwsm & E1000_FWSM_MODE_MASK) == + (E1000_ICH_MNG_IAMT_MODE << E1000_FWSM_MODE_SHIFT); +} + /** * e1000_check_reset_block_ich8lan - Check if PHY reset is blocked * @hw: pointer to the HW structure diff --cc drivers/net/e1000e/netdev.c index 24d05cb70055,b81c4237b5d3..1b72749979c4 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c @@@ -2905,10 -2600,14 +2913,8 @@@ static int __devinit e1000_sw_init(stru /* Explicitly disable IRQ since the NIC can be in any state. */ e1000_irq_disable(adapter); - spin_lock_init(&adapter->stats_lock); - set_bit(__E1000_DOWN, &adapter->state); return 0; - -err: - e_err("Unable to allocate memory for queues\n"); - kfree(adapter->rx_ring); - kfree(adapter->tx_ring); - return -ENOMEM; } /**