|  | @@ -206,7 +206,7 @@ static s32 e1000e_init_phy_params_pchlan(struct e1000_hw *hw)
 | 
		
	
		
			
			| 206 | 206 |  	e1000e_get_phy_id(hw);
 | 
		
	
		
			
			| 207 | 207 |  	phy->type = e1000e_get_phy_type_from_id(phy->id);
 | 
		
	
		
			
			| 208 | 208 |  
 | 
		
	
		
			
			| 209 |  | -	if (phy->type == e1000_phy_82577) {
 | 
		
	
		
			
			|  | 209 | +	if (phy->type == e1000_phy_82577 || phy->type == e1000_phy_82579) {
 | 
		
	
		
			
			| 210 | 210 |  		phy->ops.check_polarity = e1000e_check_polarity_82577;
 | 
		
	
		
			
			| 211 | 211 |  #if 0
 | 
		
	
		
			
			| 212 | 212 |  		phy->ops.force_speed_duplex =
 | 
		
	
	
		
			
			|  | @@ -449,6 +449,7 @@ static s32 e1000e_init_mac_params_ich8lan(struct e1000_hw *hw)
 | 
		
	
		
			
			| 449 | 449 |  		mac->ops.led_off = e1000e_led_off_ich8lan;
 | 
		
	
		
			
			| 450 | 450 |  		break;
 | 
		
	
		
			
			| 451 | 451 |  	case e1000_pchlan:
 | 
		
	
		
			
			|  | 452 | +	case e1000_pch2lan:
 | 
		
	
		
			
			| 452 | 453 |  		/* ID LED init */
 | 
		
	
		
			
			| 453 | 454 |  		mac->ops.id_led_init = e1000e_id_led_init_pchlan;
 | 
		
	
		
			
			| 454 | 455 |  		/* setup LED */
 | 
		
	
	
		
			
			|  | @@ -467,6 +468,14 @@ static s32 e1000e_init_mac_params_ich8lan(struct e1000_hw *hw)
 | 
		
	
		
			
			| 467 | 468 |  	if (mac->type == e1000_ich8lan)
 | 
		
	
		
			
			| 468 | 469 |  		e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw, true);
 | 
		
	
		
			
			| 469 | 470 |  
 | 
		
	
		
			
			|  | 471 | +	/* Disable PHY configuration by hardware, config by software */
 | 
		
	
		
			
			|  | 472 | +	if (mac->type == e1000_pch2lan) {
 | 
		
	
		
			
			|  | 473 | +		u32 extcnf_ctrl = er32(EXTCNF_CTRL);
 | 
		
	
		
			
			|  | 474 | +
 | 
		
	
		
			
			|  | 475 | +		extcnf_ctrl |= E1000_EXTCNF_CTRL_GATE_PHY_CFG;
 | 
		
	
		
			
			|  | 476 | +		ew32(EXTCNF_CTRL, extcnf_ctrl);
 | 
		
	
		
			
			|  | 477 | +	}
 | 
		
	
		
			
			|  | 478 | +
 | 
		
	
		
			
			| 470 | 479 |  
 | 
		
	
		
			
			| 471 | 480 |  	return E1000_SUCCESS;
 | 
		
	
		
			
			| 472 | 481 |  }
 | 
		
	
	
		
			
			|  | @@ -577,6 +586,7 @@ void e1000e_init_function_pointers_ich8lan(struct e1000_hw *hw)
 | 
		
	
		
			
			| 577 | 586 |  		hw->phy.ops.init_params = e1000e_init_phy_params_ich8lan;
 | 
		
	
		
			
			| 578 | 587 |  		break;
 | 
		
	
		
			
			| 579 | 588 |  	case e1000_pchlan:
 | 
		
	
		
			
			|  | 589 | +	case e1000_pch2lan:
 | 
		
	
		
			
			| 580 | 590 |  		hw->phy.ops.init_params = e1000e_init_phy_params_pchlan;
 | 
		
	
		
			
			| 581 | 591 |  		break;
 | 
		
	
		
			
			| 582 | 592 |  	default:
 | 
		
	
	
		
			
			|  | @@ -765,7 +775,8 @@ static s32 e1000e_sw_lcd_config_ich8lan(struct e1000_hw *hw)
 | 
		
	
		
			
			| 765 | 775 |  		/* Check if SW needs to configure the PHY */
 | 
		
	
		
			
			| 766 | 776 |  		if ((hw->device_id == E1000_DEV_ID_ICH8_IGP_M_AMT) ||
 | 
		
	
		
			
			| 767 | 777 |  		    (hw->device_id == E1000_DEV_ID_ICH8_IGP_M) ||
 | 
		
	
		
			
			| 768 |  | -		    (hw->mac.type == e1000_pchlan))
 | 
		
	
		
			
			|  | 778 | +		    (hw->mac.type == e1000_pchlan) ||
 | 
		
	
		
			
			|  | 779 | +		    (hw->mac.type == e1000_pch2lan))
 | 
		
	
		
			
			| 769 | 780 |  			sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG_ICH8M;
 | 
		
	
		
			
			| 770 | 781 |  		else
 | 
		
	
		
			
			| 771 | 782 |  			sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG;
 | 
		
	
	
		
			
			|  | @@ -777,13 +788,15 @@ static s32 e1000e_sw_lcd_config_ich8lan(struct e1000_hw *hw)
 | 
		
	
		
			
			| 777 | 788 |  		/* Wait for basic configuration completes before proceeding */
 | 
		
	
		
			
			| 778 | 789 |  		e1000e_lan_init_done_ich8lan(hw);
 | 
		
	
		
			
			| 779 | 790 |  
 | 
		
	
		
			
			| 780 |  | -		/*
 | 
		
	
		
			
			| 781 |  | -		 * Make sure HW does not configure LCD from PHY
 | 
		
	
		
			
			| 782 |  | -		 * extended configuration before SW configuration
 | 
		
	
		
			
			| 783 |  | -		 */
 | 
		
	
		
			
			| 784 |  | -		data = er32(EXTCNF_CTRL);
 | 
		
	
		
			
			| 785 |  | -		if (data & E1000_EXTCNF_CTRL_LCD_WRITE_ENABLE)
 | 
		
	
		
			
			| 786 |  | -			goto out;
 | 
		
	
		
			
			|  | 791 | +		if (hw->mac.type != e1000_pch2lan) {
 | 
		
	
		
			
			|  | 792 | +			/*
 | 
		
	
		
			
			|  | 793 | +			 * Make sure HW does not configure LCD from PHY
 | 
		
	
		
			
			|  | 794 | +			 * extended configuration before SW configuration
 | 
		
	
		
			
			|  | 795 | +			 */
 | 
		
	
		
			
			|  | 796 | +			data = er32(EXTCNF_CTRL);
 | 
		
	
		
			
			|  | 797 | +			if (data & E1000_EXTCNF_CTRL_LCD_WRITE_ENABLE)
 | 
		
	
		
			
			|  | 798 | +				goto out;
 | 
		
	
		
			
			|  | 799 | +		}
 | 
		
	
		
			
			| 787 | 800 |  
 | 
		
	
		
			
			| 788 | 801 |  		cnf_size = er32(EXTCNF_SIZE);
 | 
		
	
		
			
			| 789 | 802 |  		cnf_size &= E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH_MASK;
 | 
		
	
	
		
			
			|  | @@ -795,7 +808,8 @@ static s32 e1000e_sw_lcd_config_ich8lan(struct e1000_hw *hw)
 | 
		
	
		
			
			| 795 | 808 |  		cnf_base_addr >>= E1000_EXTCNF_CTRL_EXT_CNF_POINTER_SHIFT;
 | 
		
	
		
			
			| 796 | 809 |  
 | 
		
	
		
			
			| 797 | 810 |  		if (!(data & E1000_EXTCNF_CTRL_OEM_WRITE_ENABLE) &&
 | 
		
	
		
			
			| 798 |  | -		    (hw->mac.type == e1000_pchlan)) {
 | 
		
	
		
			
			|  | 811 | +		    (hw->mac.type == e1000_pchlan ||
 | 
		
	
		
			
			|  | 812 | +		     hw->mac.type == e1000_pch2lan)) {
 | 
		
	
		
			
			| 799 | 813 |  			/*
 | 
		
	
		
			
			| 800 | 814 |  			 * HW configures the SMBus address and LEDs when the
 | 
		
	
		
			
			| 801 | 815 |  			 * OEM and LCD Write Enable bits are set in the NVM.
 | 
		
	
	
		
			
			|  | @@ -1006,16 +1020,18 @@ s32 e1000e_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state)
 | 
		
	
		
			
			| 1006 | 1020 |  	u32 mac_reg;
 | 
		
	
		
			
			| 1007 | 1021 |  	u16 oem_reg;
 | 
		
	
		
			
			| 1008 | 1022 |  
 | 
		
	
		
			
			| 1009 |  | -	if (hw->mac.type != e1000_pchlan)
 | 
		
	
		
			
			|  | 1023 | +	if (hw->mac.type != e1000_pchlan && hw->mac.type != e1000_pch2lan)
 | 
		
	
		
			
			| 1010 | 1024 |  		return ret_val;
 | 
		
	
		
			
			| 1011 | 1025 |  
 | 
		
	
		
			
			| 1012 | 1026 |  	ret_val = hw->phy.ops.acquire(hw);
 | 
		
	
		
			
			| 1013 | 1027 |  	if (ret_val)
 | 
		
	
		
			
			| 1014 | 1028 |  		return ret_val;
 | 
		
	
		
			
			| 1015 | 1029 |  
 | 
		
	
		
			
			| 1016 |  | -	mac_reg = er32(EXTCNF_CTRL);
 | 
		
	
		
			
			| 1017 |  | -	if (mac_reg & E1000_EXTCNF_CTRL_OEM_WRITE_ENABLE)
 | 
		
	
		
			
			| 1018 |  | -		goto out;
 | 
		
	
		
			
			|  | 1030 | +	if (hw->mac.type != e1000_pch2lan) {
 | 
		
	
		
			
			|  | 1031 | +		mac_reg = er32(EXTCNF_CTRL);
 | 
		
	
		
			
			|  | 1032 | +		if (mac_reg & E1000_EXTCNF_CTRL_OEM_WRITE_ENABLE)
 | 
		
	
		
			
			|  | 1033 | +			goto out;
 | 
		
	
		
			
			|  | 1034 | +	}
 | 
		
	
		
			
			| 1019 | 1035 |  
 | 
		
	
		
			
			| 1020 | 1036 |  	mac_reg = er32(FEXTNVM);
 | 
		
	
		
			
			| 1021 | 1037 |  	if (!(mac_reg & E1000_FEXTNVM_SW_CONFIG_ICH8M))
 | 
		
	
	
		
			
			|  | @@ -2573,7 +2589,7 @@ static s32 e1000e_reset_hw_ich8lan(struct e1000_hw *hw)
 | 
		
	
		
			
			| 2573 | 2589 |  		}
 | 
		
	
		
			
			| 2574 | 2590 |  	}
 | 
		
	
		
			
			| 2575 | 2591 |  	/* Dummy read to clear the phy wakeup bit after lcd reset */
 | 
		
	
		
			
			| 2576 |  | -	if (hw->mac.type == e1000_pchlan)
 | 
		
	
		
			
			|  | 2592 | +	if (hw->mac.type == e1000_pchlan || hw->mac.type == e1000_pch2lan)
 | 
		
	
		
			
			| 2577 | 2593 |  		e1e_rphy(hw, BM_WUC, ®);
 | 
		
	
		
			
			| 2578 | 2594 |  
 | 
		
	
		
			
			| 2579 | 2595 |  	ret_val = e1000e_sw_lcd_config_ich8lan(hw);
 | 
		
	
	
		
			
			|  | @@ -2791,6 +2807,7 @@ static s32 e1000e_setup_link_ich8lan(struct e1000_hw *hw)
 | 
		
	
		
			
			| 2791 | 2807 |  
 | 
		
	
		
			
			| 2792 | 2808 |  	ew32(FCTTV, hw->fc.pause_time);
 | 
		
	
		
			
			| 2793 | 2809 |  	if ((hw->phy.type == e1000_phy_82578) ||
 | 
		
	
		
			
			|  | 2810 | +	    (hw->phy.type == e1000_phy_82579) ||
 | 
		
	
		
			
			| 2794 | 2811 |  	    (hw->phy.type == e1000_phy_82577)) {
 | 
		
	
		
			
			| 2795 | 2812 |  		ret_val = e1e_wphy(hw,
 | 
		
	
		
			
			| 2796 | 2813 |  		                             PHY_REG(BM_PORT_CTRL_PAGE, 27),
 | 
		
	
	
		
			
			|  | @@ -2859,6 +2876,7 @@ static s32 e1000e_setup_copper_link_ich8lan(struct e1000_hw *hw)
 | 
		
	
		
			
			| 2859 | 2876 |  			goto out;
 | 
		
	
		
			
			| 2860 | 2877 |  		break;
 | 
		
	
		
			
			| 2861 | 2878 |  	case e1000_phy_82577:
 | 
		
	
		
			
			|  | 2879 | +	case e1000_phy_82579:
 | 
		
	
		
			
			| 2862 | 2880 |  		ret_val = e1000e_copper_link_setup_82577(hw);
 | 
		
	
		
			
			| 2863 | 2881 |  		if (ret_val)
 | 
		
	
		
			
			| 2864 | 2882 |  			goto out;
 | 
		
	
	
		
			
			|  | @@ -3388,6 +3406,7 @@ static void e1000e_clear_hw_cntrs_ich8lan(struct e1000_hw *hw __unused)
 | 
		
	
		
			
			| 3388 | 3406 |  
 | 
		
	
		
			
			| 3389 | 3407 |  	/* Clear PHY statistics registers */
 | 
		
	
		
			
			| 3390 | 3408 |  	if ((hw->phy.type == e1000_phy_82578) ||
 | 
		
	
		
			
			|  | 3409 | +	    (hw->phy.type == e1000_phy_82579) ||
 | 
		
	
		
			
			| 3391 | 3410 |  	    (hw->phy.type == e1000_phy_82577)) {
 | 
		
	
		
			
			| 3392 | 3411 |  		e1e_rphy(hw, HV_SCC_UPPER, &phy_data);
 | 
		
	
		
			
			| 3393 | 3412 |  		e1e_rphy(hw, HV_SCC_LOWER, &phy_data);
 | 
		
	
	
		
			
			|  | @@ -3434,6 +3453,8 @@ static struct pci_device_id e1000e_ich8lan_nics[] = {
 | 
		
	
		
			
			| 3434 | 3453 |       PCI_ROM(0x8086, 0x10EB, "E1000_DEV_ID_PCH_M_HV_LC", "E1000_DEV_ID_PCH_M_HV_LC", board_pchlan),
 | 
		
	
		
			
			| 3435 | 3454 |       PCI_ROM(0x8086, 0x10EF, "E1000_DEV_ID_PCH_D_HV_DM", "E1000_DEV_ID_PCH_D_HV_DM", board_pchlan),
 | 
		
	
		
			
			| 3436 | 3455 |       PCI_ROM(0x8086, 0x10F0, "E1000_DEV_ID_PCH_D_HV_DC", "E1000_DEV_ID_PCH_D_HV_DC", board_pchlan),
 | 
		
	
		
			
			|  | 3456 | +     PCI_ROM(0x8086, 0x1502, "E1000_DEV_ID_PCH2_LV_LM", "E1000_DEV_ID_PCH2_LV_LM", board_pch2lan),
 | 
		
	
		
			
			|  | 3457 | +     PCI_ROM(0x8086, 0x1503, "E1000_DEV_ID_PCH2_LV_V", "E1000_DEV_ID_PCH2_LV_V", board_pch2lan),
 | 
		
	
		
			
			| 3437 | 3458 |  };
 | 
		
	
		
			
			| 3438 | 3459 |  
 | 
		
	
		
			
			| 3439 | 3460 |  struct pci_driver e1000e_ich8lan_driver __pci_driver = {
 |