|
@@ -419,6 +419,9 @@ e1000_set_mac_type(struct e1000_hw *hw)
|
419
|
419
|
case E1000_DEV_ID_ICH8_IGP_M:
|
420
|
420
|
hw->mac_type = e1000_ich8lan;
|
421
|
421
|
break;
|
|
422
|
+ case E1000_DEV_ID_82576:
|
|
423
|
+ hw->mac_type = e1000_82576;
|
|
424
|
+ break;
|
422
|
425
|
default:
|
423
|
426
|
/* Should never have loaded on this device */
|
424
|
427
|
return -E1000_ERR_MAC_TYPE;
|
|
@@ -426,6 +429,7 @@ e1000_set_mac_type(struct e1000_hw *hw)
|
426
|
429
|
|
427
|
430
|
switch (hw->mac_type) {
|
428
|
431
|
case e1000_ich8lan:
|
|
432
|
+ case e1000_82576:
|
429
|
433
|
hw->swfwhw_semaphore_present = TRUE;
|
430
|
434
|
hw->asf_firmware_present = TRUE;
|
431
|
435
|
break;
|
|
@@ -504,6 +508,7 @@ e1000_set_media_type(struct e1000_hw *hw)
|
504
|
508
|
break;
|
505
|
509
|
case e1000_ich8lan:
|
506
|
510
|
case e1000_82573:
|
|
511
|
+ case e1000_82576:
|
507
|
512
|
/* The STATUS_TBIMODE bit is reserved or reused for the this
|
508
|
513
|
* device.
|
509
|
514
|
*/
|
|
@@ -750,7 +755,8 @@ e1000_reset_hw(struct e1000_hw *hw)
|
750
|
755
|
static void
|
751
|
756
|
e1000_initialize_hardware_bits(struct e1000_hw *hw)
|
752
|
757
|
{
|
753
|
|
- if ((hw->mac_type >= e1000_82571) && (!hw->initialize_hw_bits_disable)) {
|
|
758
|
+ if ((hw->mac_type >= e1000_82571 && hw->mac_type < e1000_82576) &&
|
|
759
|
+ (!hw->initialize_hw_bits_disable)) {
|
754
|
760
|
/* Settings common to all PCI-express silicon */
|
755
|
761
|
uint32_t reg_ctrl, reg_ctrl_ext;
|
756
|
762
|
uint32_t reg_tarc0, reg_tarc1;
|
|
@@ -907,11 +913,27 @@ e1000_init_hw(struct e1000_hw *hw)
|
907
|
913
|
|
908
|
914
|
/* Disabling VLAN filtering. */
|
909
|
915
|
DEBUGOUT("Initializing the IEEE VLAN\n");
|
910
|
|
- /* VET hardcoded to standard value and VFTA removed in ICH8 LAN */
|
911
|
|
- if (hw->mac_type != e1000_ich8lan) {
|
|
916
|
+ switch (hw->mac_type) {
|
|
917
|
+ case e1000_ich8lan:
|
|
918
|
+ /* VET hardcoded to standard value and VFTA removed in ICH8 LAN */
|
|
919
|
+ break;
|
|
920
|
+ case e1000_82576:
|
|
921
|
+ /* There is no need to clear vfta on 82576 if VLANs are not used.
|
|
922
|
+ * - Intel® 82576 Gigabit Ethernet Controller Datasheet r2.41
|
|
923
|
+ * Section 8.10.19 Table Array - VFTA
|
|
924
|
+ *
|
|
925
|
+ * Setting VET may also be unnecessary, however the documentation
|
|
926
|
+ * isn't specific on this point. The value used here is as advised in
|
|
927
|
+ * - Intel® 82576 Gigabit Ethernet Controller Datasheet r2.41
|
|
928
|
+ * Section 8.2.7 VLAN Ether Type - VET
|
|
929
|
+ */
|
|
930
|
+ E1000_WRITE_REG(hw, VET, ETHERNET_IEEE_VLAN_TYPE);
|
|
931
|
+ break;
|
|
932
|
+ default:
|
912
|
933
|
if (hw->mac_type < e1000_82545_rev_3)
|
913
|
934
|
E1000_WRITE_REG(hw, VET, 0);
|
914
|
935
|
e1000_clear_vfta(hw);
|
|
936
|
+ break;
|
915
|
937
|
}
|
916
|
938
|
|
917
|
939
|
/* For 82542 (rev 2.0), disable MWI and put the receiver into reset */
|
|
@@ -1477,9 +1499,13 @@ e1000_copper_link_igp_setup(struct e1000_hw *hw)
|
1477
|
1499
|
return ret_val;
|
1478
|
1500
|
}
|
1479
|
1501
|
|
1480
|
|
- /* Wait 15ms for MAC to configure PHY from eeprom settings */
|
1481
|
|
- msleep(15);
|
1482
|
|
- if (hw->mac_type != e1000_ich8lan) {
|
|
1502
|
+ /*
|
|
1503
|
+ * Wait 100ms for MAC to configure PHY from NVM settings, to avoid
|
|
1504
|
+ * timeout issues when LFS is enabled.
|
|
1505
|
+ */
|
|
1506
|
+ msleep(100);
|
|
1507
|
+
|
|
1508
|
+ if (hw->mac_type != e1000_ich8lan && hw->mac_type != e1000_82576) {
|
1483
|
1509
|
/* Configure activity LED after PHY reset */
|
1484
|
1510
|
led_ctrl = E1000_READ_REG(hw, LEDCTL);
|
1485
|
1511
|
led_ctrl &= IGP_ACTIVITY_LED_MASK;
|
|
@@ -3493,7 +3519,7 @@ e1000_read_phy_reg(struct e1000_hw *hw,
|
3493
|
3519
|
|
3494
|
3520
|
DEBUGFUNC("e1000_read_phy_reg");
|
3495
|
3521
|
|
3496
|
|
- if ((hw->mac_type == e1000_80003es2lan) &&
|
|
3522
|
+ if ((hw->mac_type == e1000_80003es2lan || hw->mac_type == e1000_82576) &&
|
3497
|
3523
|
(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) {
|
3498
|
3524
|
swfw = E1000_SWFW_PHY1_SM;
|
3499
|
3525
|
} else {
|
|
@@ -3631,7 +3657,7 @@ e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr,
|
3631
|
3657
|
|
3632
|
3658
|
DEBUGFUNC("e1000_write_phy_reg");
|
3633
|
3659
|
|
3634
|
|
- if ((hw->mac_type == e1000_80003es2lan) &&
|
|
3660
|
+ if ((hw->mac_type == e1000_80003es2lan || hw->mac_type == e1000_82576) &&
|
3635
|
3661
|
(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) {
|
3636
|
3662
|
swfw = E1000_SWFW_PHY1_SM;
|
3637
|
3663
|
} else {
|
|
@@ -3751,7 +3777,7 @@ e1000_read_kmrn_reg(struct e1000_hw *hw,
|
3751
|
3777
|
uint16_t swfw;
|
3752
|
3778
|
DEBUGFUNC("e1000_read_kmrn_reg");
|
3753
|
3779
|
|
3754
|
|
- if ((hw->mac_type == e1000_80003es2lan) &&
|
|
3780
|
+ if ((hw->mac_type == e1000_80003es2lan || hw->mac_type == e1000_82576) &&
|
3755
|
3781
|
(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) {
|
3756
|
3782
|
swfw = E1000_SWFW_PHY1_SM;
|
3757
|
3783
|
} else {
|
|
@@ -3784,7 +3810,7 @@ e1000_write_kmrn_reg(struct e1000_hw *hw,
|
3784
|
3810
|
uint16_t swfw;
|
3785
|
3811
|
DEBUGFUNC("e1000_write_kmrn_reg");
|
3786
|
3812
|
|
3787
|
|
- if ((hw->mac_type == e1000_80003es2lan) &&
|
|
3813
|
+ if ((hw->mac_type == e1000_80003es2lan || hw->mac_type == e1000_82576) &&
|
3788
|
3814
|
(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) {
|
3789
|
3815
|
swfw = E1000_SWFW_PHY1_SM;
|
3790
|
3816
|
} else {
|
|
@@ -3826,7 +3852,8 @@ e1000_phy_hw_reset(struct e1000_hw *hw)
|
3826
|
3852
|
DEBUGOUT("Resetting Phy...\n");
|
3827
|
3853
|
|
3828
|
3854
|
if (hw->mac_type > e1000_82543) {
|
3829
|
|
- if ((hw->mac_type == e1000_80003es2lan) &&
|
|
3855
|
+ if ((hw->mac_type == e1000_80003es2lan ||
|
|
3856
|
+ hw->mac_type == e1000_82576) &&
|
3830
|
3857
|
(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) {
|
3831
|
3858
|
swfw = E1000_SWFW_PHY1_SM;
|
3832
|
3859
|
} else {
|
|
@@ -4136,6 +4163,9 @@ e1000_detect_gig_phy(struct e1000_hw *hw)
|
4136
|
4163
|
if (hw->phy_id == IFE_PLUS_E_PHY_ID) match = TRUE;
|
4137
|
4164
|
if (hw->phy_id == IFE_C_E_PHY_ID) match = TRUE;
|
4138
|
4165
|
break;
|
|
4166
|
+ case e1000_82576:
|
|
4167
|
+ match = TRUE;
|
|
4168
|
+ break;
|
4139
|
4169
|
default:
|
4140
|
4170
|
DEBUGOUT1("Invalid MAC type %d\n", hw->mac_type);
|
4141
|
4171
|
return -E1000_ERR_CONFIG;
|
|
@@ -4607,6 +4637,38 @@ e1000_init_eeprom_params(struct e1000_hw *hw)
|
4607
|
4637
|
|
4608
|
4638
|
hw->flash_bank_size /= 2 * sizeof(uint16_t);
|
4609
|
4639
|
|
|
4640
|
+ break;
|
|
4641
|
+ }
|
|
4642
|
+ case e1000_82576:
|
|
4643
|
+ {
|
|
4644
|
+ uint16_t size;
|
|
4645
|
+
|
|
4646
|
+ eeprom->type = e1000_eeprom_spi;
|
|
4647
|
+ eeprom->opcode_bits = 8;
|
|
4648
|
+ eeprom->delay_usec = 1;
|
|
4649
|
+ if (eecd & E1000_EECD_ADDR_BITS) {
|
|
4650
|
+ eeprom->page_size = 32;
|
|
4651
|
+ eeprom->address_bits = 16;
|
|
4652
|
+ } else {
|
|
4653
|
+ eeprom->page_size = 8;
|
|
4654
|
+ eeprom->address_bits = 8;
|
|
4655
|
+ }
|
|
4656
|
+ eeprom->use_eerd = TRUE;
|
|
4657
|
+ eeprom->use_eewr = FALSE;
|
|
4658
|
+
|
|
4659
|
+ size = (uint16_t)((eecd & E1000_EECD_SIZE_EX_MASK) >>
|
|
4660
|
+ E1000_EECD_SIZE_EX_SHIFT);
|
|
4661
|
+ /*
|
|
4662
|
+ * Added to a constant, "size" becomes the left-shift value
|
|
4663
|
+ * for setting word_size.
|
|
4664
|
+ */
|
|
4665
|
+ size += EEPROM_WORD_SIZE_SHIFT;
|
|
4666
|
+
|
|
4667
|
+ /* EEPROM access above 16k is unsupported */
|
|
4668
|
+ if (size > 14)
|
|
4669
|
+ size = 14;
|
|
4670
|
+ eeprom->word_size = 1 << size;
|
|
4671
|
+
|
4610
|
4672
|
break;
|
4611
|
4673
|
}
|
4612
|
4674
|
default:
|
|
@@ -5014,8 +5076,7 @@ e1000_read_eeprom(struct e1000_hw *hw,
|
5014
|
5076
|
* directly. In this case, we need to acquire the EEPROM so that
|
5015
|
5077
|
* FW or other port software does not interrupt.
|
5016
|
5078
|
*/
|
5017
|
|
- if (e1000_is_onboard_nvm_eeprom(hw) == TRUE &&
|
5018
|
|
- hw->eeprom.use_eerd == FALSE) {
|
|
5079
|
+ if (hw->eeprom.use_eerd == FALSE && e1000_is_onboard_nvm_eeprom(hw)) {
|
5019
|
5080
|
/* Prepare the EEPROM for bit-bang reading */
|
5020
|
5081
|
if (e1000_acquire_eeprom(hw) != E1000_SUCCESS)
|
5021
|
5082
|
return -E1000_ERR_EEPROM;
|
|
@@ -5198,6 +5259,8 @@ e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw)
|
5198
|
5259
|
|
5199
|
5260
|
DEBUGFUNC("e1000_is_onboard_nvm_eeprom");
|
5200
|
5261
|
|
|
5262
|
+ assert(hw->mac_type != e1000_82576);
|
|
5263
|
+
|
5201
|
5264
|
if (hw->mac_type == e1000_ich8lan)
|
5202
|
5265
|
return FALSE;
|
5203
|
5266
|
|
|
@@ -5732,6 +5795,7 @@ e1000_read_mac_addr(struct e1000_hw * hw)
|
5732
|
5795
|
case e1000_82546:
|
5733
|
5796
|
case e1000_82546_rev_3:
|
5734
|
5797
|
case e1000_82571:
|
|
5798
|
+ case e1000_82576:
|
5735
|
5799
|
case e1000_80003es2lan:
|
5736
|
5800
|
if (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)
|
5737
|
5801
|
hw->perm_mac_addr[5] ^= 0x01;
|
|
@@ -5944,6 +6008,13 @@ e1000_rar_set(struct e1000_hw *hw,
|
5944
|
6008
|
case e1000_80003es2lan:
|
5945
|
6009
|
if (hw->leave_av_bit_off == TRUE)
|
5946
|
6010
|
break;
|
|
6011
|
+ case e1000_82576:
|
|
6012
|
+ /* If MAC address zero, no need to set the AV bit */
|
|
6013
|
+ if (rar_low || rar_high)
|
|
6014
|
+ rar_high |= E1000_RAH_AV;
|
|
6015
|
+ // Only neded when Multiple Receive Queues are enabmed in MRQC
|
|
6016
|
+ rar_high |= E1000_RAH_POOL_1;
|
|
6017
|
+ break;
|
5947
|
6018
|
default:
|
5948
|
6019
|
/* Indicate to hardware the Address is Valid. */
|
5949
|
6020
|
rar_high |= E1000_RAH_AV;
|
|
@@ -6609,6 +6680,7 @@ e1000_get_bus_info(struct e1000_hw *hw)
|
6609
|
6680
|
case e1000_82572:
|
6610
|
6681
|
case e1000_82573:
|
6611
|
6682
|
case e1000_80003es2lan:
|
|
6683
|
+ case e1000_82576:
|
6612
|
6684
|
hw->bus_type = e1000_bus_type_pci_express;
|
6613
|
6685
|
hw->bus_speed = e1000_bus_speed_2500;
|
6614
|
6686
|
ret_val = e1000_read_pcie_cap_reg(hw,
|
|
@@ -8027,6 +8099,7 @@ e1000_get_auto_rd_done(struct e1000_hw *hw)
|
8027
|
8099
|
case e1000_82573:
|
8028
|
8100
|
case e1000_80003es2lan:
|
8029
|
8101
|
case e1000_ich8lan:
|
|
8102
|
+ case e1000_82576:
|
8030
|
8103
|
while (timeout) {
|
8031
|
8104
|
if (E1000_READ_REG(hw, EECD) & E1000_EECD_AUTO_RD)
|
8032
|
8105
|
break;
|
|
@@ -8072,6 +8145,7 @@ e1000_get_phy_cfg_done(struct e1000_hw *hw)
|
8072
|
8145
|
mdelay(10);
|
8073
|
8146
|
break;
|
8074
|
8147
|
case e1000_80003es2lan:
|
|
8148
|
+ case e1000_82576:
|
8075
|
8149
|
/* Separate *_CFG_DONE_* bit for each port */
|
8076
|
8150
|
if (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)
|
8077
|
8151
|
cfg_mask = E1000_EEPROM_CFG_DONE_PORT_1;
|
|
@@ -8282,6 +8356,7 @@ e1000_arc_subsystem_valid(struct e1000_hw *hw)
|
8282
|
8356
|
case e1000_82572:
|
8283
|
8357
|
case e1000_82573:
|
8284
|
8358
|
case e1000_80003es2lan:
|
|
8359
|
+ case e1000_82576:
|
8285
|
8360
|
fwsm = E1000_READ_REG(hw, FWSM);
|
8286
|
8361
|
if ((fwsm & E1000_FWSM_MODE_MASK) != 0)
|
8287
|
8362
|
return TRUE;
|