diff options
-rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 3 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_hw.c | 685 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_hw.h | 287 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 5 |
4 files changed, 964 insertions, 16 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 70238e089f16..0d6a16c5f8cd 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -589,6 +589,7 @@ e1000_get_drvinfo(struct net_device *netdev, | |||
589 | case e1000_82571: | 589 | case e1000_82571: |
590 | case e1000_82572: | 590 | case e1000_82572: |
591 | case e1000_82573: | 591 | case e1000_82573: |
592 | case e1000_80003es2lan: | ||
592 | sprintf(firmware_version, "%d.%d-%d", | 593 | sprintf(firmware_version, "%d.%d-%d", |
593 | (eeprom_data & 0xF000) >> 12, | 594 | (eeprom_data & 0xF000) >> 12, |
594 | (eeprom_data & 0x0FF0) >> 4, | 595 | (eeprom_data & 0x0FF0) >> 4, |
@@ -762,6 +763,7 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data) | |||
762 | /* there are several bits on newer hardware that are r/w */ | 763 | /* there are several bits on newer hardware that are r/w */ |
763 | case e1000_82571: | 764 | case e1000_82571: |
764 | case e1000_82572: | 765 | case e1000_82572: |
766 | case e1000_80003es2lan: | ||
765 | toggle = 0x7FFFF3FF; | 767 | toggle = 0x7FFFF3FF; |
766 | break; | 768 | break; |
767 | case e1000_82573: | 769 | case e1000_82573: |
@@ -1320,6 +1322,7 @@ e1000_set_phy_loopback(struct e1000_adapter *adapter) | |||
1320 | case e1000_82571: | 1322 | case e1000_82571: |
1321 | case e1000_82572: | 1323 | case e1000_82572: |
1322 | case e1000_82573: | 1324 | case e1000_82573: |
1325 | case e1000_80003es2lan: | ||
1323 | return e1000_integrated_phy_loopback(adapter); | 1326 | return e1000_integrated_phy_loopback(adapter); |
1324 | break; | 1327 | break; |
1325 | 1328 | ||
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c index 5ee42c75adb1..63e237084a51 100644 --- a/drivers/net/e1000/e1000_hw.c +++ b/drivers/net/e1000/e1000_hw.c | |||
@@ -100,6 +100,8 @@ static void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset, | |||
100 | 100 | ||
101 | #define E1000_WRITE_REG_IO(a, reg, val) \ | 101 | #define E1000_WRITE_REG_IO(a, reg, val) \ |
102 | e1000_write_reg_io((a), E1000_##reg, val) | 102 | e1000_write_reg_io((a), E1000_##reg, val) |
103 | static int32_t e1000_configure_kmrn_for_10_100(struct e1000_hw *hw); | ||
104 | static int32_t e1000_configure_kmrn_for_1000(struct e1000_hw *hw); | ||
103 | 105 | ||
104 | /* IGP cable length table */ | 106 | /* IGP cable length table */ |
105 | static const | 107 | static const |
@@ -153,6 +155,11 @@ e1000_set_phy_type(struct e1000_hw *hw) | |||
153 | hw->phy_type = e1000_phy_igp; | 155 | hw->phy_type = e1000_phy_igp; |
154 | break; | 156 | break; |
155 | } | 157 | } |
158 | case GG82563_E_PHY_ID: | ||
159 | if (hw->mac_type == e1000_80003es2lan) { | ||
160 | hw->phy_type = e1000_phy_gg82563; | ||
161 | break; | ||
162 | } | ||
156 | /* Fall Through */ | 163 | /* Fall Through */ |
157 | default: | 164 | default: |
158 | /* Should never have loaded on this device */ | 165 | /* Should never have loaded on this device */ |
@@ -353,12 +360,19 @@ e1000_set_mac_type(struct e1000_hw *hw) | |||
353 | case E1000_DEV_ID_82573L: | 360 | case E1000_DEV_ID_82573L: |
354 | hw->mac_type = e1000_82573; | 361 | hw->mac_type = e1000_82573; |
355 | break; | 362 | break; |
363 | case E1000_DEV_ID_80003ES2LAN_COPPER_DPT: | ||
364 | case E1000_DEV_ID_80003ES2LAN_SERDES_DPT: | ||
365 | hw->mac_type = e1000_80003es2lan; | ||
366 | break; | ||
356 | default: | 367 | default: |
357 | /* Should never have loaded on this device */ | 368 | /* Should never have loaded on this device */ |
358 | return -E1000_ERR_MAC_TYPE; | 369 | return -E1000_ERR_MAC_TYPE; |
359 | } | 370 | } |
360 | 371 | ||
361 | switch(hw->mac_type) { | 372 | switch(hw->mac_type) { |
373 | case e1000_80003es2lan: | ||
374 | hw->swfw_sync_present = TRUE; | ||
375 | /* fall through */ | ||
362 | case e1000_82571: | 376 | case e1000_82571: |
363 | case e1000_82572: | 377 | case e1000_82572: |
364 | case e1000_82573: | 378 | case e1000_82573: |
@@ -399,6 +413,7 @@ e1000_set_media_type(struct e1000_hw *hw) | |||
399 | case E1000_DEV_ID_82546GB_SERDES: | 413 | case E1000_DEV_ID_82546GB_SERDES: |
400 | case E1000_DEV_ID_82571EB_SERDES: | 414 | case E1000_DEV_ID_82571EB_SERDES: |
401 | case E1000_DEV_ID_82572EI_SERDES: | 415 | case E1000_DEV_ID_82572EI_SERDES: |
416 | case E1000_DEV_ID_80003ES2LAN_SERDES_DPT: | ||
402 | hw->media_type = e1000_media_type_internal_serdes; | 417 | hw->media_type = e1000_media_type_internal_serdes; |
403 | break; | 418 | break; |
404 | default: | 419 | default: |
@@ -575,6 +590,7 @@ e1000_reset_hw(struct e1000_hw *hw) | |||
575 | /* fall through */ | 590 | /* fall through */ |
576 | case e1000_82571: | 591 | case e1000_82571: |
577 | case e1000_82572: | 592 | case e1000_82572: |
593 | case e1000_80003es2lan: | ||
578 | ret_val = e1000_get_auto_rd_done(hw); | 594 | ret_val = e1000_get_auto_rd_done(hw); |
579 | if(ret_val) | 595 | if(ret_val) |
580 | /* We don't want to continue accessing MAC registers. */ | 596 | /* We don't want to continue accessing MAC registers. */ |
@@ -641,6 +657,7 @@ e1000_init_hw(struct e1000_hw *hw) | |||
641 | uint16_t cmd_mmrbc; | 657 | uint16_t cmd_mmrbc; |
642 | uint16_t stat_mmrbc; | 658 | uint16_t stat_mmrbc; |
643 | uint32_t mta_size; | 659 | uint32_t mta_size; |
660 | uint32_t reg_data; | ||
644 | uint32_t ctrl_ext; | 661 | uint32_t ctrl_ext; |
645 | 662 | ||
646 | DEBUGFUNC("e1000_init_hw"); | 663 | DEBUGFUNC("e1000_init_hw"); |
@@ -739,6 +756,7 @@ e1000_init_hw(struct e1000_hw *hw) | |||
739 | case e1000_82571: | 756 | case e1000_82571: |
740 | case e1000_82572: | 757 | case e1000_82572: |
741 | case e1000_82573: | 758 | case e1000_82573: |
759 | case e1000_80003es2lan: | ||
742 | ctrl |= E1000_TXDCTL_COUNT_DESC; | 760 | ctrl |= E1000_TXDCTL_COUNT_DESC; |
743 | break; | 761 | break; |
744 | } | 762 | } |
@@ -752,12 +770,34 @@ e1000_init_hw(struct e1000_hw *hw) | |||
752 | switch (hw->mac_type) { | 770 | switch (hw->mac_type) { |
753 | default: | 771 | default: |
754 | break; | 772 | break; |
773 | case e1000_80003es2lan: | ||
774 | /* Enable retransmit on late collisions */ | ||
775 | reg_data = E1000_READ_REG(hw, TCTL); | ||
776 | reg_data |= E1000_TCTL_RTLC; | ||
777 | E1000_WRITE_REG(hw, TCTL, reg_data); | ||
778 | |||
779 | /* Configure Gigabit Carry Extend Padding */ | ||
780 | reg_data = E1000_READ_REG(hw, TCTL_EXT); | ||
781 | reg_data &= ~E1000_TCTL_EXT_GCEX_MASK; | ||
782 | reg_data |= DEFAULT_80003ES2LAN_TCTL_EXT_GCEX; | ||
783 | E1000_WRITE_REG(hw, TCTL_EXT, reg_data); | ||
784 | |||
785 | /* Configure Transmit Inter-Packet Gap */ | ||
786 | reg_data = E1000_READ_REG(hw, TIPG); | ||
787 | reg_data &= ~E1000_TIPG_IPGT_MASK; | ||
788 | reg_data |= DEFAULT_80003ES2LAN_TIPG_IPGT_1000; | ||
789 | E1000_WRITE_REG(hw, TIPG, reg_data); | ||
790 | |||
791 | reg_data = E1000_READ_REG_ARRAY(hw, FFLT, 0x0001); | ||
792 | reg_data &= ~0x00100000; | ||
793 | E1000_WRITE_REG_ARRAY(hw, FFLT, 0x0001, reg_data); | ||
794 | /* Fall through */ | ||
755 | case e1000_82571: | 795 | case e1000_82571: |
756 | case e1000_82572: | 796 | case e1000_82572: |
757 | ctrl = E1000_READ_REG(hw, TXDCTL1); | 797 | ctrl = E1000_READ_REG(hw, TXDCTL1); |
758 | ctrl &= ~E1000_TXDCTL_WTHRESH; | 798 | ctrl = (ctrl & ~E1000_TXDCTL_WTHRESH) | E1000_TXDCTL_FULL_TX_DESC_WB; |
759 | ctrl |= E1000_TXDCTL_COUNT_DESC | E1000_TXDCTL_FULL_TX_DESC_WB; | 799 | if(hw->mac_type >= e1000_82571) |
760 | ctrl |= (1 << 22); | 800 | ctrl |= E1000_TXDCTL_COUNT_DESC; |
761 | E1000_WRITE_REG(hw, TXDCTL1, ctrl); | 801 | E1000_WRITE_REG(hw, TXDCTL1, ctrl); |
762 | break; | 802 | break; |
763 | } | 803 | } |
@@ -1314,6 +1354,154 @@ e1000_copper_link_igp_setup(struct e1000_hw *hw) | |||
1314 | return E1000_SUCCESS; | 1354 | return E1000_SUCCESS; |
1315 | } | 1355 | } |
1316 | 1356 | ||
1357 | /******************************************************************** | ||
1358 | * Copper link setup for e1000_phy_gg82563 series. | ||
1359 | * | ||
1360 | * hw - Struct containing variables accessed by shared code | ||
1361 | *********************************************************************/ | ||
1362 | static int32_t | ||
1363 | e1000_copper_link_ggp_setup(struct e1000_hw *hw) | ||
1364 | { | ||
1365 | int32_t ret_val; | ||
1366 | uint16_t phy_data; | ||
1367 | uint32_t reg_data; | ||
1368 | |||
1369 | DEBUGFUNC("e1000_copper_link_ggp_setup"); | ||
1370 | |||
1371 | if(!hw->phy_reset_disable) { | ||
1372 | |||
1373 | /* Enable CRS on TX for half-duplex operation. */ | ||
1374 | ret_val = e1000_read_phy_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, | ||
1375 | &phy_data); | ||
1376 | if(ret_val) | ||
1377 | return ret_val; | ||
1378 | |||
1379 | phy_data |= GG82563_MSCR_ASSERT_CRS_ON_TX; | ||
1380 | /* Use 25MHz for both link down and 1000BASE-T for Tx clock */ | ||
1381 | phy_data |= GG82563_MSCR_TX_CLK_1000MBPS_25MHZ; | ||
1382 | |||
1383 | ret_val = e1000_write_phy_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, | ||
1384 | phy_data); | ||
1385 | if(ret_val) | ||
1386 | return ret_val; | ||
1387 | |||
1388 | /* Options: | ||
1389 | * MDI/MDI-X = 0 (default) | ||
1390 | * 0 - Auto for all speeds | ||
1391 | * 1 - MDI mode | ||
1392 | * 2 - MDI-X mode | ||
1393 | * 3 - Auto for 1000Base-T only (MDI-X for 10/100Base-T modes) | ||
1394 | */ | ||
1395 | ret_val = e1000_read_phy_reg(hw, GG82563_PHY_SPEC_CTRL, &phy_data); | ||
1396 | if(ret_val) | ||
1397 | return ret_val; | ||
1398 | |||
1399 | phy_data &= ~GG82563_PSCR_CROSSOVER_MODE_MASK; | ||
1400 | |||
1401 | switch (hw->mdix) { | ||
1402 | case 1: | ||
1403 | phy_data |= GG82563_PSCR_CROSSOVER_MODE_MDI; | ||
1404 | break; | ||
1405 | case 2: | ||
1406 | phy_data |= GG82563_PSCR_CROSSOVER_MODE_MDIX; | ||
1407 | break; | ||
1408 | case 0: | ||
1409 | default: | ||
1410 | phy_data |= GG82563_PSCR_CROSSOVER_MODE_AUTO; | ||
1411 | break; | ||
1412 | } | ||
1413 | |||
1414 | /* Options: | ||
1415 | * disable_polarity_correction = 0 (default) | ||
1416 | * Automatic Correction for Reversed Cable Polarity | ||
1417 | * 0 - Disabled | ||
1418 | * 1 - Enabled | ||
1419 | */ | ||
1420 | phy_data &= ~GG82563_PSCR_POLARITY_REVERSAL_DISABLE; | ||
1421 | if(hw->disable_polarity_correction == 1) | ||
1422 | phy_data |= GG82563_PSCR_POLARITY_REVERSAL_DISABLE; | ||
1423 | ret_val = e1000_write_phy_reg(hw, GG82563_PHY_SPEC_CTRL, phy_data); | ||
1424 | |||
1425 | if(ret_val) | ||
1426 | return ret_val; | ||
1427 | |||
1428 | /* SW Reset the PHY so all changes take effect */ | ||
1429 | ret_val = e1000_phy_reset(hw); | ||
1430 | if (ret_val) { | ||
1431 | DEBUGOUT("Error Resetting the PHY\n"); | ||
1432 | return ret_val; | ||
1433 | } | ||
1434 | } /* phy_reset_disable */ | ||
1435 | |||
1436 | if (hw->mac_type == e1000_80003es2lan) { | ||
1437 | /* Bypass RX and TX FIFO's */ | ||
1438 | ret_val = e1000_write_kmrn_reg(hw, E1000_KUMCTRLSTA_OFFSET_FIFO_CTRL, | ||
1439 | E1000_KUMCTRLSTA_FIFO_CTRL_RX_BYPASS | | ||
1440 | E1000_KUMCTRLSTA_FIFO_CTRL_TX_BYPASS); | ||
1441 | if (ret_val) | ||
1442 | return ret_val; | ||
1443 | |||
1444 | ret_val = e1000_read_phy_reg(hw, GG82563_PHY_SPEC_CTRL_2, &phy_data); | ||
1445 | if (ret_val) | ||
1446 | return ret_val; | ||
1447 | |||
1448 | phy_data &= ~GG82563_PSCR2_REVERSE_AUTO_NEG; | ||
1449 | ret_val = e1000_write_phy_reg(hw, GG82563_PHY_SPEC_CTRL_2, phy_data); | ||
1450 | |||
1451 | if (ret_val) | ||
1452 | return ret_val; | ||
1453 | |||
1454 | reg_data = E1000_READ_REG(hw, CTRL_EXT); | ||
1455 | reg_data &= ~(E1000_CTRL_EXT_LINK_MODE_MASK); | ||
1456 | E1000_WRITE_REG(hw, CTRL_EXT, reg_data); | ||
1457 | |||
1458 | ret_val = e1000_read_phy_reg(hw, GG82563_PHY_PWR_MGMT_CTRL, | ||
1459 | &phy_data); | ||
1460 | if (ret_val) | ||
1461 | return ret_val; | ||
1462 | |||
1463 | /* Do not init these registers when the HW is in IAMT mode, since the | ||
1464 | * firmware will have already initialized them. We only initialize | ||
1465 | * them if the HW is not in IAMT mode. | ||
1466 | */ | ||
1467 | if (e1000_check_mng_mode(hw) == FALSE) { | ||
1468 | /* Enable Electrical Idle on the PHY */ | ||
1469 | phy_data |= GG82563_PMCR_ENABLE_ELECTRICAL_IDLE; | ||
1470 | ret_val = e1000_write_phy_reg(hw, GG82563_PHY_PWR_MGMT_CTRL, | ||
1471 | phy_data); | ||
1472 | if (ret_val) | ||
1473 | return ret_val; | ||
1474 | |||
1475 | ret_val = e1000_read_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, | ||
1476 | &phy_data); | ||
1477 | if (ret_val) | ||
1478 | return ret_val; | ||
1479 | |||
1480 | /* Enable Pass False Carrier on the PHY */ | ||
1481 | phy_data |= GG82563_KMCR_PASS_FALSE_CARRIER; | ||
1482 | |||
1483 | ret_val = e1000_write_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, | ||
1484 | phy_data); | ||
1485 | if (ret_val) | ||
1486 | return ret_val; | ||
1487 | } | ||
1488 | |||
1489 | /* Workaround: Disable padding in Kumeran interface in the MAC | ||
1490 | * and in the PHY to avoid CRC errors. | ||
1491 | */ | ||
1492 | ret_val = e1000_read_phy_reg(hw, GG82563_PHY_INBAND_CTRL, | ||
1493 | &phy_data); | ||
1494 | if (ret_val) | ||
1495 | return ret_val; | ||
1496 | phy_data |= GG82563_ICR_DIS_PADDING; | ||
1497 | ret_val = e1000_write_phy_reg(hw, GG82563_PHY_INBAND_CTRL, | ||
1498 | phy_data); | ||
1499 | if (ret_val) | ||
1500 | return ret_val; | ||
1501 | } | ||
1502 | |||
1503 | return E1000_SUCCESS; | ||
1504 | } | ||
1317 | 1505 | ||
1318 | /******************************************************************** | 1506 | /******************************************************************** |
1319 | * Copper link setup for e1000_phy_m88 series. | 1507 | * Copper link setup for e1000_phy_m88 series. |
@@ -1524,6 +1712,7 @@ e1000_setup_copper_link(struct e1000_hw *hw) | |||
1524 | int32_t ret_val; | 1712 | int32_t ret_val; |
1525 | uint16_t i; | 1713 | uint16_t i; |
1526 | uint16_t phy_data; | 1714 | uint16_t phy_data; |
1715 | uint16_t reg_data; | ||
1527 | 1716 | ||
1528 | DEBUGFUNC("e1000_setup_copper_link"); | 1717 | DEBUGFUNC("e1000_setup_copper_link"); |
1529 | 1718 | ||
@@ -1532,6 +1721,22 @@ e1000_setup_copper_link(struct e1000_hw *hw) | |||
1532 | if(ret_val) | 1721 | if(ret_val) |
1533 | return ret_val; | 1722 | return ret_val; |
1534 | 1723 | ||
1724 | switch (hw->mac_type) { | ||
1725 | case e1000_80003es2lan: | ||
1726 | ret_val = e1000_read_kmrn_reg(hw, E1000_KUMCTRLSTA_OFFSET_INB_CTRL, | ||
1727 | ®_data); | ||
1728 | if (ret_val) | ||
1729 | return ret_val; | ||
1730 | reg_data |= E1000_KUMCTRLSTA_INB_CTRL_DIS_PADDING; | ||
1731 | ret_val = e1000_write_kmrn_reg(hw, E1000_KUMCTRLSTA_OFFSET_INB_CTRL, | ||
1732 | reg_data); | ||
1733 | if (ret_val) | ||
1734 | return ret_val; | ||
1735 | break; | ||
1736 | default: | ||
1737 | break; | ||
1738 | } | ||
1739 | |||
1535 | if (hw->phy_type == e1000_phy_igp || | 1740 | if (hw->phy_type == e1000_phy_igp || |
1536 | hw->phy_type == e1000_phy_igp_2) { | 1741 | hw->phy_type == e1000_phy_igp_2) { |
1537 | ret_val = e1000_copper_link_igp_setup(hw); | 1742 | ret_val = e1000_copper_link_igp_setup(hw); |
@@ -1541,6 +1746,10 @@ e1000_setup_copper_link(struct e1000_hw *hw) | |||
1541 | ret_val = e1000_copper_link_mgp_setup(hw); | 1746 | ret_val = e1000_copper_link_mgp_setup(hw); |
1542 | if(ret_val) | 1747 | if(ret_val) |
1543 | return ret_val; | 1748 | return ret_val; |
1749 | } else if (hw->phy_type == e1000_phy_gg82563) { | ||
1750 | ret_val = e1000_copper_link_ggp_setup(hw); | ||
1751 | if(ret_val) | ||
1752 | return ret_val; | ||
1544 | } | 1753 | } |
1545 | 1754 | ||
1546 | if(hw->autoneg) { | 1755 | if(hw->autoneg) { |
@@ -1588,6 +1797,59 @@ e1000_setup_copper_link(struct e1000_hw *hw) | |||
1588 | } | 1797 | } |
1589 | 1798 | ||
1590 | /****************************************************************************** | 1799 | /****************************************************************************** |
1800 | * Configure the MAC-to-PHY interface for 10/100Mbps | ||
1801 | * | ||
1802 | * hw - Struct containing variables accessed by shared code | ||
1803 | ******************************************************************************/ | ||
1804 | static int32_t | ||
1805 | e1000_configure_kmrn_for_10_100(struct e1000_hw *hw) | ||
1806 | { | ||
1807 | int32_t ret_val = E1000_SUCCESS; | ||
1808 | uint32_t tipg; | ||
1809 | uint16_t reg_data; | ||
1810 | |||
1811 | DEBUGFUNC("e1000_configure_kmrn_for_10_100"); | ||
1812 | |||
1813 | reg_data = E1000_KUMCTRLSTA_HD_CTRL_10_100_DEFAULT; | ||
1814 | ret_val = e1000_write_kmrn_reg(hw, E1000_KUMCTRLSTA_OFFSET_HD_CTRL, | ||
1815 | reg_data); | ||
1816 | if (ret_val) | ||
1817 | return ret_val; | ||
1818 | |||
1819 | /* Configure Transmit Inter-Packet Gap */ | ||
1820 | tipg = E1000_READ_REG(hw, TIPG); | ||
1821 | tipg &= ~E1000_TIPG_IPGT_MASK; | ||
1822 | tipg |= DEFAULT_80003ES2LAN_TIPG_IPGT_10_100; | ||
1823 | E1000_WRITE_REG(hw, TIPG, tipg); | ||
1824 | |||
1825 | return ret_val; | ||
1826 | } | ||
1827 | |||
1828 | static int32_t | ||
1829 | e1000_configure_kmrn_for_1000(struct e1000_hw *hw) | ||
1830 | { | ||
1831 | int32_t ret_val = E1000_SUCCESS; | ||
1832 | uint16_t reg_data; | ||
1833 | uint32_t tipg; | ||
1834 | |||
1835 | DEBUGFUNC("e1000_configure_kmrn_for_1000"); | ||
1836 | |||
1837 | reg_data = E1000_KUMCTRLSTA_HD_CTRL_1000_DEFAULT; | ||
1838 | ret_val = e1000_write_kmrn_reg(hw, E1000_KUMCTRLSTA_OFFSET_HD_CTRL, | ||
1839 | reg_data); | ||
1840 | if (ret_val) | ||
1841 | return ret_val; | ||
1842 | |||
1843 | /* Configure Transmit Inter-Packet Gap */ | ||
1844 | tipg = E1000_READ_REG(hw, TIPG); | ||
1845 | tipg &= ~E1000_TIPG_IPGT_MASK; | ||
1846 | tipg |= DEFAULT_80003ES2LAN_TIPG_IPGT_1000; | ||
1847 | E1000_WRITE_REG(hw, TIPG, tipg); | ||
1848 | |||
1849 | return ret_val; | ||
1850 | } | ||
1851 | |||
1852 | /****************************************************************************** | ||
1591 | * Configures PHY autoneg and flow control advertisement settings | 1853 | * Configures PHY autoneg and flow control advertisement settings |
1592 | * | 1854 | * |
1593 | * hw - Struct containing variables accessed by shared code | 1855 | * hw - Struct containing variables accessed by shared code |
@@ -1808,7 +2070,8 @@ e1000_phy_force_speed_duplex(struct e1000_hw *hw) | |||
1808 | /* Write the configured values back to the Device Control Reg. */ | 2070 | /* Write the configured values back to the Device Control Reg. */ |
1809 | E1000_WRITE_REG(hw, CTRL, ctrl); | 2071 | E1000_WRITE_REG(hw, CTRL, ctrl); |
1810 | 2072 | ||
1811 | if (hw->phy_type == e1000_phy_m88) { | 2073 | if ((hw->phy_type == e1000_phy_m88) || |
2074 | (hw->phy_type == e1000_phy_gg82563)) { | ||
1812 | ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); | 2075 | ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); |
1813 | if(ret_val) | 2076 | if(ret_val) |
1814 | return ret_val; | 2077 | return ret_val; |
@@ -1877,7 +2140,8 @@ e1000_phy_force_speed_duplex(struct e1000_hw *hw) | |||
1877 | msec_delay(100); | 2140 | msec_delay(100); |
1878 | } | 2141 | } |
1879 | if((i == 0) && | 2142 | if((i == 0) && |
1880 | (hw->phy_type == e1000_phy_m88)) { | 2143 | ((hw->phy_type == e1000_phy_m88) || |
2144 | (hw->phy_type == e1000_phy_gg82563))) { | ||
1881 | /* We didn't get link. Reset the DSP and wait again for link. */ | 2145 | /* We didn't get link. Reset the DSP and wait again for link. */ |
1882 | ret_val = e1000_phy_reset_dsp(hw); | 2146 | ret_val = e1000_phy_reset_dsp(hw); |
1883 | if(ret_val) { | 2147 | if(ret_val) { |
@@ -1936,6 +2200,27 @@ e1000_phy_force_speed_duplex(struct e1000_hw *hw) | |||
1936 | if(ret_val) | 2200 | if(ret_val) |
1937 | return ret_val; | 2201 | return ret_val; |
1938 | } | 2202 | } |
2203 | } else if (hw->phy_type == e1000_phy_gg82563) { | ||
2204 | /* The TX_CLK of the Extended PHY Specific Control Register defaults | ||
2205 | * to 2.5MHz on a reset. We need to re-force it back to 25MHz, if | ||
2206 | * we're not in a forced 10/duplex configuration. */ | ||
2207 | ret_val = e1000_read_phy_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, &phy_data); | ||
2208 | if (ret_val) | ||
2209 | return ret_val; | ||
2210 | |||
2211 | phy_data &= ~GG82563_MSCR_TX_CLK_MASK; | ||
2212 | if ((hw->forced_speed_duplex == e1000_10_full) || | ||
2213 | (hw->forced_speed_duplex == e1000_10_half)) | ||
2214 | phy_data |= GG82563_MSCR_TX_CLK_10MBPS_2_5MHZ; | ||
2215 | else | ||
2216 | phy_data |= GG82563_MSCR_TX_CLK_100MBPS_25MHZ; | ||
2217 | |||
2218 | /* Also due to the reset, we need to enable CRS on Tx. */ | ||
2219 | phy_data |= GG82563_MSCR_ASSERT_CRS_ON_TX; | ||
2220 | |||
2221 | ret_val = e1000_write_phy_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, phy_data); | ||
2222 | if (ret_val) | ||
2223 | return ret_val; | ||
1939 | } | 2224 | } |
1940 | return E1000_SUCCESS; | 2225 | return E1000_SUCCESS; |
1941 | } | 2226 | } |
@@ -2598,6 +2883,16 @@ e1000_get_speed_and_duplex(struct e1000_hw *hw, | |||
2598 | } | 2883 | } |
2599 | } | 2884 | } |
2600 | 2885 | ||
2886 | if ((hw->mac_type == e1000_80003es2lan) && | ||
2887 | (hw->media_type == e1000_media_type_copper)) { | ||
2888 | if (*speed == SPEED_1000) | ||
2889 | ret_val = e1000_configure_kmrn_for_1000(hw); | ||
2890 | else | ||
2891 | ret_val = e1000_configure_kmrn_for_10_100(hw); | ||
2892 | if (ret_val) | ||
2893 | return ret_val; | ||
2894 | } | ||
2895 | |||
2601 | return E1000_SUCCESS; | 2896 | return E1000_SUCCESS; |
2602 | } | 2897 | } |
2603 | 2898 | ||
@@ -2773,6 +3068,72 @@ e1000_shift_in_mdi_bits(struct e1000_hw *hw) | |||
2773 | return data; | 3068 | return data; |
2774 | } | 3069 | } |
2775 | 3070 | ||
3071 | int32_t | ||
3072 | e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask) | ||
3073 | { | ||
3074 | uint32_t swfw_sync = 0; | ||
3075 | uint32_t swmask = mask; | ||
3076 | uint32_t fwmask = mask << 16; | ||
3077 | int32_t timeout = 200; | ||
3078 | |||
3079 | DEBUGFUNC("e1000_swfw_sync_acquire"); | ||
3080 | |||
3081 | if (!hw->swfw_sync_present) | ||
3082 | return e1000_get_hw_eeprom_semaphore(hw); | ||
3083 | |||
3084 | while(timeout) { | ||
3085 | if (e1000_get_hw_eeprom_semaphore(hw)) | ||
3086 | return -E1000_ERR_SWFW_SYNC; | ||
3087 | |||
3088 | swfw_sync = E1000_READ_REG(hw, SW_FW_SYNC); | ||
3089 | if (!(swfw_sync & (fwmask | swmask))) { | ||
3090 | break; | ||
3091 | } | ||
3092 | |||
3093 | /* firmware currently using resource (fwmask) */ | ||
3094 | /* or other software thread currently using resource (swmask) */ | ||
3095 | e1000_put_hw_eeprom_semaphore(hw); | ||
3096 | msec_delay_irq(5); | ||
3097 | timeout--; | ||
3098 | } | ||
3099 | |||
3100 | if (!timeout) { | ||
3101 | DEBUGOUT("Driver can't access resource, SW_FW_SYNC timeout.\n"); | ||
3102 | return -E1000_ERR_SWFW_SYNC; | ||
3103 | } | ||
3104 | |||
3105 | swfw_sync |= swmask; | ||
3106 | E1000_WRITE_REG(hw, SW_FW_SYNC, swfw_sync); | ||
3107 | |||
3108 | e1000_put_hw_eeprom_semaphore(hw); | ||
3109 | return E1000_SUCCESS; | ||
3110 | } | ||
3111 | |||
3112 | void | ||
3113 | e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask) | ||
3114 | { | ||
3115 | uint32_t swfw_sync; | ||
3116 | uint32_t swmask = mask; | ||
3117 | |||
3118 | DEBUGFUNC("e1000_swfw_sync_release"); | ||
3119 | |||
3120 | if (!hw->swfw_sync_present) { | ||
3121 | e1000_put_hw_eeprom_semaphore(hw); | ||
3122 | return; | ||
3123 | } | ||
3124 | |||
3125 | /* if (e1000_get_hw_eeprom_semaphore(hw)) | ||
3126 | * return -E1000_ERR_SWFW_SYNC; */ | ||
3127 | while (e1000_get_hw_eeprom_semaphore(hw) != E1000_SUCCESS); | ||
3128 | /* empty */ | ||
3129 | |||
3130 | swfw_sync = E1000_READ_REG(hw, SW_FW_SYNC); | ||
3131 | swfw_sync &= ~swmask; | ||
3132 | E1000_WRITE_REG(hw, SW_FW_SYNC, swfw_sync); | ||
3133 | |||
3134 | e1000_put_hw_eeprom_semaphore(hw); | ||
3135 | } | ||
3136 | |||
2776 | /***************************************************************************** | 3137 | /***************************************************************************** |
2777 | * Reads the value from a PHY register, if the value is on a specific non zero | 3138 | * Reads the value from a PHY register, if the value is on a specific non zero |
2778 | * page, sets the page first. | 3139 | * page, sets the page first. |
@@ -2785,22 +3146,55 @@ e1000_read_phy_reg(struct e1000_hw *hw, | |||
2785 | uint16_t *phy_data) | 3146 | uint16_t *phy_data) |
2786 | { | 3147 | { |
2787 | uint32_t ret_val; | 3148 | uint32_t ret_val; |
3149 | uint16_t swfw; | ||
2788 | 3150 | ||
2789 | DEBUGFUNC("e1000_read_phy_reg"); | 3151 | DEBUGFUNC("e1000_read_phy_reg"); |
2790 | 3152 | ||
3153 | if ((hw->mac_type == e1000_80003es2lan) && | ||
3154 | (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) { | ||
3155 | swfw = E1000_SWFW_PHY1_SM; | ||
3156 | } else { | ||
3157 | swfw = E1000_SWFW_PHY0_SM; | ||
3158 | } | ||
3159 | if (e1000_swfw_sync_acquire(hw, swfw)) | ||
3160 | return -E1000_ERR_SWFW_SYNC; | ||
3161 | |||
2791 | if((hw->phy_type == e1000_phy_igp || | 3162 | if((hw->phy_type == e1000_phy_igp || |
2792 | hw->phy_type == e1000_phy_igp_2) && | 3163 | hw->phy_type == e1000_phy_igp_2) && |
2793 | (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { | 3164 | (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { |
2794 | ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, | 3165 | ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, |
2795 | (uint16_t)reg_addr); | 3166 | (uint16_t)reg_addr); |
2796 | if(ret_val) { | 3167 | if(ret_val) { |
3168 | e1000_swfw_sync_release(hw, swfw); | ||
2797 | return ret_val; | 3169 | return ret_val; |
2798 | } | 3170 | } |
3171 | } else if (hw->phy_type == e1000_phy_gg82563) { | ||
3172 | if (((reg_addr & MAX_PHY_REG_ADDRESS) > MAX_PHY_MULTI_PAGE_REG) || | ||
3173 | (hw->mac_type == e1000_80003es2lan)) { | ||
3174 | /* Select Configuration Page */ | ||
3175 | if ((reg_addr & MAX_PHY_REG_ADDRESS) < GG82563_MIN_ALT_REG) { | ||
3176 | ret_val = e1000_write_phy_reg_ex(hw, GG82563_PHY_PAGE_SELECT, | ||
3177 | (uint16_t)((uint16_t)reg_addr >> GG82563_PAGE_SHIFT)); | ||
3178 | } else { | ||
3179 | /* Use Alternative Page Select register to access | ||
3180 | * registers 30 and 31 | ||
3181 | */ | ||
3182 | ret_val = e1000_write_phy_reg_ex(hw, | ||
3183 | GG82563_PHY_PAGE_SELECT_ALT, | ||
3184 | (uint16_t)((uint16_t)reg_addr >> GG82563_PAGE_SHIFT)); | ||
3185 | } | ||
3186 | |||
3187 | if (ret_val) { | ||
3188 | e1000_swfw_sync_release(hw, swfw); | ||
3189 | return ret_val; | ||
3190 | } | ||
3191 | } | ||
2799 | } | 3192 | } |
2800 | 3193 | ||
2801 | ret_val = e1000_read_phy_reg_ex(hw, MAX_PHY_REG_ADDRESS & reg_addr, | 3194 | ret_val = e1000_read_phy_reg_ex(hw, MAX_PHY_REG_ADDRESS & reg_addr, |
2802 | phy_data); | 3195 | phy_data); |
2803 | 3196 | ||
3197 | e1000_swfw_sync_release(hw, swfw); | ||
2804 | return ret_val; | 3198 | return ret_val; |
2805 | } | 3199 | } |
2806 | 3200 | ||
@@ -2891,22 +3285,55 @@ e1000_write_phy_reg(struct e1000_hw *hw, | |||
2891 | uint16_t phy_data) | 3285 | uint16_t phy_data) |
2892 | { | 3286 | { |
2893 | uint32_t ret_val; | 3287 | uint32_t ret_val; |
3288 | uint16_t swfw; | ||
2894 | 3289 | ||
2895 | DEBUGFUNC("e1000_write_phy_reg"); | 3290 | DEBUGFUNC("e1000_write_phy_reg"); |
2896 | 3291 | ||
3292 | if ((hw->mac_type == e1000_80003es2lan) && | ||
3293 | (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) { | ||
3294 | swfw = E1000_SWFW_PHY1_SM; | ||
3295 | } else { | ||
3296 | swfw = E1000_SWFW_PHY0_SM; | ||
3297 | } | ||
3298 | if (e1000_swfw_sync_acquire(hw, swfw)) | ||
3299 | return -E1000_ERR_SWFW_SYNC; | ||
3300 | |||
2897 | if((hw->phy_type == e1000_phy_igp || | 3301 | if((hw->phy_type == e1000_phy_igp || |
2898 | hw->phy_type == e1000_phy_igp_2) && | 3302 | hw->phy_type == e1000_phy_igp_2) && |
2899 | (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { | 3303 | (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { |
2900 | ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, | 3304 | ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, |
2901 | (uint16_t)reg_addr); | 3305 | (uint16_t)reg_addr); |
2902 | if(ret_val) { | 3306 | if(ret_val) { |
3307 | e1000_swfw_sync_release(hw, swfw); | ||
2903 | return ret_val; | 3308 | return ret_val; |
2904 | } | 3309 | } |
3310 | } else if (hw->phy_type == e1000_phy_gg82563) { | ||
3311 | if (((reg_addr & MAX_PHY_REG_ADDRESS) > MAX_PHY_MULTI_PAGE_REG) || | ||
3312 | (hw->mac_type == e1000_80003es2lan)) { | ||
3313 | /* Select Configuration Page */ | ||
3314 | if ((reg_addr & MAX_PHY_REG_ADDRESS) < GG82563_MIN_ALT_REG) { | ||
3315 | ret_val = e1000_write_phy_reg_ex(hw, GG82563_PHY_PAGE_SELECT, | ||
3316 | (uint16_t)((uint16_t)reg_addr >> GG82563_PAGE_SHIFT)); | ||
3317 | } else { | ||
3318 | /* Use Alternative Page Select register to access | ||
3319 | * registers 30 and 31 | ||
3320 | */ | ||
3321 | ret_val = e1000_write_phy_reg_ex(hw, | ||
3322 | GG82563_PHY_PAGE_SELECT_ALT, | ||
3323 | (uint16_t)((uint16_t)reg_addr >> GG82563_PAGE_SHIFT)); | ||
3324 | } | ||
3325 | |||
3326 | if (ret_val) { | ||
3327 | e1000_swfw_sync_release(hw, swfw); | ||
3328 | return ret_val; | ||
3329 | } | ||
3330 | } | ||
2905 | } | 3331 | } |
2906 | 3332 | ||
2907 | ret_val = e1000_write_phy_reg_ex(hw, MAX_PHY_REG_ADDRESS & reg_addr, | 3333 | ret_val = e1000_write_phy_reg_ex(hw, MAX_PHY_REG_ADDRESS & reg_addr, |
2908 | phy_data); | 3334 | phy_data); |
2909 | 3335 | ||
3336 | e1000_swfw_sync_release(hw, swfw); | ||
2910 | return ret_val; | 3337 | return ret_val; |
2911 | } | 3338 | } |
2912 | 3339 | ||
@@ -2973,6 +3400,65 @@ e1000_write_phy_reg_ex(struct e1000_hw *hw, | |||
2973 | return E1000_SUCCESS; | 3400 | return E1000_SUCCESS; |
2974 | } | 3401 | } |
2975 | 3402 | ||
3403 | int32_t | ||
3404 | e1000_read_kmrn_reg(struct e1000_hw *hw, | ||
3405 | uint32_t reg_addr, | ||
3406 | uint16_t *data) | ||
3407 | { | ||
3408 | uint32_t reg_val; | ||
3409 | uint16_t swfw; | ||
3410 | DEBUGFUNC("e1000_read_kmrn_reg"); | ||
3411 | |||
3412 | if ((hw->mac_type == e1000_80003es2lan) && | ||
3413 | (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) { | ||
3414 | swfw = E1000_SWFW_PHY1_SM; | ||
3415 | } else { | ||
3416 | swfw = E1000_SWFW_PHY0_SM; | ||
3417 | } | ||
3418 | if (e1000_swfw_sync_acquire(hw, swfw)) | ||
3419 | return -E1000_ERR_SWFW_SYNC; | ||
3420 | |||
3421 | /* Write register address */ | ||
3422 | reg_val = ((reg_addr << E1000_KUMCTRLSTA_OFFSET_SHIFT) & | ||
3423 | E1000_KUMCTRLSTA_OFFSET) | | ||
3424 | E1000_KUMCTRLSTA_REN; | ||
3425 | E1000_WRITE_REG(hw, KUMCTRLSTA, reg_val); | ||
3426 | udelay(2); | ||
3427 | |||
3428 | /* Read the data returned */ | ||
3429 | reg_val = E1000_READ_REG(hw, KUMCTRLSTA); | ||
3430 | *data = (uint16_t)reg_val; | ||
3431 | |||
3432 | e1000_swfw_sync_release(hw, swfw); | ||
3433 | return E1000_SUCCESS; | ||
3434 | } | ||
3435 | |||
3436 | int32_t | ||
3437 | e1000_write_kmrn_reg(struct e1000_hw *hw, | ||
3438 | uint32_t reg_addr, | ||
3439 | uint16_t data) | ||
3440 | { | ||
3441 | uint32_t reg_val; | ||
3442 | uint16_t swfw; | ||
3443 | DEBUGFUNC("e1000_write_kmrn_reg"); | ||
3444 | |||
3445 | if ((hw->mac_type == e1000_80003es2lan) && | ||
3446 | (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) { | ||
3447 | swfw = E1000_SWFW_PHY1_SM; | ||
3448 | } else { | ||
3449 | swfw = E1000_SWFW_PHY0_SM; | ||
3450 | } | ||
3451 | if (e1000_swfw_sync_acquire(hw, swfw)) | ||
3452 | return -E1000_ERR_SWFW_SYNC; | ||
3453 | |||
3454 | reg_val = ((reg_addr << E1000_KUMCTRLSTA_OFFSET_SHIFT) & | ||
3455 | E1000_KUMCTRLSTA_OFFSET) | data; | ||
3456 | E1000_WRITE_REG(hw, KUMCTRLSTA, reg_val); | ||
3457 | udelay(2); | ||
3458 | |||
3459 | e1000_swfw_sync_release(hw, swfw); | ||
3460 | return E1000_SUCCESS; | ||
3461 | } | ||
2976 | 3462 | ||
2977 | /****************************************************************************** | 3463 | /****************************************************************************** |
2978 | * Returns the PHY to the power-on reset state | 3464 | * Returns the PHY to the power-on reset state |
@@ -2985,6 +3471,7 @@ e1000_phy_hw_reset(struct e1000_hw *hw) | |||
2985 | uint32_t ctrl, ctrl_ext; | 3471 | uint32_t ctrl, ctrl_ext; |
2986 | uint32_t led_ctrl; | 3472 | uint32_t led_ctrl; |
2987 | int32_t ret_val; | 3473 | int32_t ret_val; |
3474 | uint16_t swfw; | ||
2988 | 3475 | ||
2989 | DEBUGFUNC("e1000_phy_hw_reset"); | 3476 | DEBUGFUNC("e1000_phy_hw_reset"); |
2990 | 3477 | ||
@@ -2997,6 +3484,16 @@ e1000_phy_hw_reset(struct e1000_hw *hw) | |||
2997 | DEBUGOUT("Resetting Phy...\n"); | 3484 | DEBUGOUT("Resetting Phy...\n"); |
2998 | 3485 | ||
2999 | if(hw->mac_type > e1000_82543) { | 3486 | if(hw->mac_type > e1000_82543) { |
3487 | if ((hw->mac_type == e1000_80003es2lan) && | ||
3488 | (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) { | ||
3489 | swfw = E1000_SWFW_PHY1_SM; | ||
3490 | } else { | ||
3491 | swfw = E1000_SWFW_PHY0_SM; | ||
3492 | } | ||
3493 | if (e1000_swfw_sync_acquire(hw, swfw)) { | ||
3494 | e1000_release_software_semaphore(hw); | ||
3495 | return -E1000_ERR_SWFW_SYNC; | ||
3496 | } | ||
3000 | /* Read the device control register and assert the E1000_CTRL_PHY_RST | 3497 | /* Read the device control register and assert the E1000_CTRL_PHY_RST |
3001 | * bit. Then, take it out of reset. | 3498 | * bit. Then, take it out of reset. |
3002 | * For pre-e1000_82571 hardware, we delay for 10ms between the assert | 3499 | * For pre-e1000_82571 hardware, we delay for 10ms between the assert |
@@ -3017,6 +3514,7 @@ e1000_phy_hw_reset(struct e1000_hw *hw) | |||
3017 | 3514 | ||
3018 | if (hw->mac_type >= e1000_82571) | 3515 | if (hw->mac_type >= e1000_82571) |
3019 | msec_delay(10); | 3516 | msec_delay(10); |
3517 | e1000_swfw_sync_release(hw, swfw); | ||
3020 | } else { | 3518 | } else { |
3021 | /* Read the Extended Device Control Register, assert the PHY_RESET_DIR | 3519 | /* Read the Extended Device Control Register, assert the PHY_RESET_DIR |
3022 | * bit to put the PHY into reset. Then, take it out of reset. | 3520 | * bit to put the PHY into reset. Then, take it out of reset. |
@@ -3043,6 +3541,7 @@ e1000_phy_hw_reset(struct e1000_hw *hw) | |||
3043 | 3541 | ||
3044 | /* Wait for FW to finish PHY configuration. */ | 3542 | /* Wait for FW to finish PHY configuration. */ |
3045 | ret_val = e1000_get_phy_cfg_done(hw); | 3543 | ret_val = e1000_get_phy_cfg_done(hw); |
3544 | e1000_release_software_semaphore(hw); | ||
3046 | 3545 | ||
3047 | return ret_val; | 3546 | return ret_val; |
3048 | } | 3547 | } |
@@ -3120,6 +3619,15 @@ e1000_detect_gig_phy(struct e1000_hw *hw) | |||
3120 | return E1000_SUCCESS; | 3619 | return E1000_SUCCESS; |
3121 | } | 3620 | } |
3122 | 3621 | ||
3622 | /* ESB-2 PHY reads require e1000_phy_gg82563 to be set because of a work- | ||
3623 | * around that forces PHY page 0 to be set or the reads fail. The rest of | ||
3624 | * the code in this routine uses e1000_read_phy_reg to read the PHY ID. | ||
3625 | * So for ESB-2 we need to have this set so our reads won't fail. If the | ||
3626 | * attached PHY is not a e1000_phy_gg82563, the routines below will figure | ||
3627 | * this out as well. */ | ||
3628 | if (hw->mac_type == e1000_80003es2lan) | ||
3629 | hw->phy_type = e1000_phy_gg82563; | ||
3630 | |||
3123 | /* Read the PHY ID Registers to identify which PHY is onboard. */ | 3631 | /* Read the PHY ID Registers to identify which PHY is onboard. */ |
3124 | ret_val = e1000_read_phy_reg(hw, PHY_ID1, &phy_id_high); | 3632 | ret_val = e1000_read_phy_reg(hw, PHY_ID1, &phy_id_high); |
3125 | if(ret_val) | 3633 | if(ret_val) |
@@ -3157,6 +3665,9 @@ e1000_detect_gig_phy(struct e1000_hw *hw) | |||
3157 | case e1000_82573: | 3665 | case e1000_82573: |
3158 | if(hw->phy_id == M88E1111_I_PHY_ID) match = TRUE; | 3666 | if(hw->phy_id == M88E1111_I_PHY_ID) match = TRUE; |
3159 | break; | 3667 | break; |
3668 | case e1000_80003es2lan: | ||
3669 | if (hw->phy_id == GG82563_E_PHY_ID) match = TRUE; | ||
3670 | break; | ||
3160 | default: | 3671 | default: |
3161 | DEBUGOUT1("Invalid MAC type %d\n", hw->mac_type); | 3672 | DEBUGOUT1("Invalid MAC type %d\n", hw->mac_type); |
3162 | return -E1000_ERR_CONFIG; | 3673 | return -E1000_ERR_CONFIG; |
@@ -3183,8 +3694,10 @@ e1000_phy_reset_dsp(struct e1000_hw *hw) | |||
3183 | DEBUGFUNC("e1000_phy_reset_dsp"); | 3694 | DEBUGFUNC("e1000_phy_reset_dsp"); |
3184 | 3695 | ||
3185 | do { | 3696 | do { |
3186 | ret_val = e1000_write_phy_reg(hw, 29, 0x001d); | 3697 | if (hw->phy_type != e1000_phy_gg82563) { |
3187 | if(ret_val) break; | 3698 | ret_val = e1000_write_phy_reg(hw, 29, 0x001d); |
3699 | if(ret_val) break; | ||
3700 | } | ||
3188 | ret_val = e1000_write_phy_reg(hw, 30, 0x00c1); | 3701 | ret_val = e1000_write_phy_reg(hw, 30, 0x00c1); |
3189 | if(ret_val) break; | 3702 | if(ret_val) break; |
3190 | ret_val = e1000_write_phy_reg(hw, 30, 0x0000); | 3703 | ret_val = e1000_write_phy_reg(hw, 30, 0x0000); |
@@ -3316,8 +3829,17 @@ e1000_phy_m88_get_info(struct e1000_hw *hw, | |||
3316 | /* Cable Length Estimation and Local/Remote Receiver Information | 3829 | /* Cable Length Estimation and Local/Remote Receiver Information |
3317 | * are only valid at 1000 Mbps. | 3830 | * are only valid at 1000 Mbps. |
3318 | */ | 3831 | */ |
3319 | phy_info->cable_length = ((phy_data & M88E1000_PSSR_CABLE_LENGTH) >> | 3832 | if (hw->phy_type != e1000_phy_gg82563) { |
3320 | M88E1000_PSSR_CABLE_LENGTH_SHIFT); | 3833 | phy_info->cable_length = ((phy_data & M88E1000_PSSR_CABLE_LENGTH) >> |
3834 | M88E1000_PSSR_CABLE_LENGTH_SHIFT); | ||
3835 | } else { | ||
3836 | ret_val = e1000_read_phy_reg(hw, GG82563_PHY_DSP_DISTANCE, | ||
3837 | &phy_data); | ||
3838 | if (ret_val) | ||
3839 | return ret_val; | ||
3840 | |||
3841 | phy_info->cable_length = phy_data & GG82563_DSPD_CABLE_LENGTH; | ||
3842 | } | ||
3321 | 3843 | ||
3322 | ret_val = e1000_read_phy_reg(hw, PHY_1000T_STATUS, &phy_data); | 3844 | ret_val = e1000_read_phy_reg(hw, PHY_1000T_STATUS, &phy_data); |
3323 | if(ret_val) | 3845 | if(ret_val) |
@@ -3511,6 +4033,20 @@ e1000_init_eeprom_params(struct e1000_hw *hw) | |||
3511 | E1000_WRITE_REG(hw, EECD, eecd); | 4033 | E1000_WRITE_REG(hw, EECD, eecd); |
3512 | } | 4034 | } |
3513 | break; | 4035 | break; |
4036 | case e1000_80003es2lan: | ||
4037 | eeprom->type = e1000_eeprom_spi; | ||
4038 | eeprom->opcode_bits = 8; | ||
4039 | eeprom->delay_usec = 1; | ||
4040 | if (eecd & E1000_EECD_ADDR_BITS) { | ||
4041 | eeprom->page_size = 32; | ||
4042 | eeprom->address_bits = 16; | ||
4043 | } else { | ||
4044 | eeprom->page_size = 8; | ||
4045 | eeprom->address_bits = 8; | ||
4046 | } | ||
4047 | eeprom->use_eerd = TRUE; | ||
4048 | eeprom->use_eewr = FALSE; | ||
4049 | break; | ||
3514 | default: | 4050 | default: |
3515 | break; | 4051 | break; |
3516 | } | 4052 | } |
@@ -3691,9 +4227,8 @@ e1000_acquire_eeprom(struct e1000_hw *hw) | |||
3691 | 4227 | ||
3692 | DEBUGFUNC("e1000_acquire_eeprom"); | 4228 | DEBUGFUNC("e1000_acquire_eeprom"); |
3693 | 4229 | ||
3694 | if(e1000_get_hw_eeprom_semaphore(hw)) | 4230 | if (e1000_swfw_sync_acquire(hw, E1000_SWFW_EEP_SM)) |
3695 | return -E1000_ERR_EEPROM; | 4231 | return -E1000_ERR_SWFW_SYNC; |
3696 | |||
3697 | eecd = E1000_READ_REG(hw, EECD); | 4232 | eecd = E1000_READ_REG(hw, EECD); |
3698 | 4233 | ||
3699 | if (hw->mac_type != e1000_82573) { | 4234 | if (hw->mac_type != e1000_82573) { |
@@ -3712,7 +4247,7 @@ e1000_acquire_eeprom(struct e1000_hw *hw) | |||
3712 | eecd &= ~E1000_EECD_REQ; | 4247 | eecd &= ~E1000_EECD_REQ; |
3713 | E1000_WRITE_REG(hw, EECD, eecd); | 4248 | E1000_WRITE_REG(hw, EECD, eecd); |
3714 | DEBUGOUT("Could not acquire EEPROM grant\n"); | 4249 | DEBUGOUT("Could not acquire EEPROM grant\n"); |
3715 | e1000_put_hw_eeprom_semaphore(hw); | 4250 | e1000_swfw_sync_release(hw, E1000_SWFW_EEP_SM); |
3716 | return -E1000_ERR_EEPROM; | 4251 | return -E1000_ERR_EEPROM; |
3717 | } | 4252 | } |
3718 | } | 4253 | } |
@@ -3835,7 +4370,7 @@ e1000_release_eeprom(struct e1000_hw *hw) | |||
3835 | E1000_WRITE_REG(hw, EECD, eecd); | 4370 | E1000_WRITE_REG(hw, EECD, eecd); |
3836 | } | 4371 | } |
3837 | 4372 | ||
3838 | e1000_put_hw_eeprom_semaphore(hw); | 4373 | e1000_swfw_sync_release(hw, E1000_SWFW_EEP_SM); |
3839 | } | 4374 | } |
3840 | 4375 | ||
3841 | /****************************************************************************** | 4376 | /****************************************************************************** |
@@ -3914,6 +4449,8 @@ e1000_read_eeprom(struct e1000_hw *hw, | |||
3914 | if (e1000_is_onboard_nvm_eeprom(hw) == TRUE && | 4449 | if (e1000_is_onboard_nvm_eeprom(hw) == TRUE && |
3915 | hw->eeprom.use_eerd == FALSE) { | 4450 | hw->eeprom.use_eerd == FALSE) { |
3916 | switch (hw->mac_type) { | 4451 | switch (hw->mac_type) { |
4452 | case e1000_80003es2lan: | ||
4453 | break; | ||
3917 | default: | 4454 | default: |
3918 | /* Prepare the EEPROM for reading */ | 4455 | /* Prepare the EEPROM for reading */ |
3919 | if (e1000_acquire_eeprom(hw) != E1000_SUCCESS) | 4456 | if (e1000_acquire_eeprom(hw) != E1000_SUCCESS) |
@@ -4031,6 +4568,9 @@ e1000_write_eeprom_eewr(struct e1000_hw *hw, | |||
4031 | uint32_t i = 0; | 4568 | uint32_t i = 0; |
4032 | int32_t error = 0; | 4569 | int32_t error = 0; |
4033 | 4570 | ||
4571 | if (e1000_swfw_sync_acquire(hw, E1000_SWFW_EEP_SM)) | ||
4572 | return -E1000_ERR_SWFW_SYNC; | ||
4573 | |||
4034 | for (i = 0; i < words; i++) { | 4574 | for (i = 0; i < words; i++) { |
4035 | register_value = (data[i] << E1000_EEPROM_RW_REG_DATA) | | 4575 | register_value = (data[i] << E1000_EEPROM_RW_REG_DATA) | |
4036 | ((offset+i) << E1000_EEPROM_RW_ADDR_SHIFT) | | 4576 | ((offset+i) << E1000_EEPROM_RW_ADDR_SHIFT) | |
@@ -4050,6 +4590,7 @@ e1000_write_eeprom_eewr(struct e1000_hw *hw, | |||
4050 | } | 4590 | } |
4051 | } | 4591 | } |
4052 | 4592 | ||
4593 | e1000_swfw_sync_release(hw, E1000_SWFW_EEP_SM); | ||
4053 | return error; | 4594 | return error; |
4054 | } | 4595 | } |
4055 | 4596 | ||
@@ -4091,6 +4632,8 @@ e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw) | |||
4091 | { | 4632 | { |
4092 | uint32_t eecd = 0; | 4633 | uint32_t eecd = 0; |
4093 | 4634 | ||
4635 | DEBUGFUNC("e1000_is_onboard_nvm_eeprom"); | ||
4636 | |||
4094 | if(hw->mac_type == e1000_82573) { | 4637 | if(hw->mac_type == e1000_82573) { |
4095 | eecd = E1000_READ_REG(hw, EECD); | 4638 | eecd = E1000_READ_REG(hw, EECD); |
4096 | 4639 | ||
@@ -4517,6 +5060,7 @@ e1000_read_mac_addr(struct e1000_hw * hw) | |||
4517 | case e1000_82546: | 5060 | case e1000_82546: |
4518 | case e1000_82546_rev_3: | 5061 | case e1000_82546_rev_3: |
4519 | case e1000_82571: | 5062 | case e1000_82571: |
5063 | case e1000_80003es2lan: | ||
4520 | if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1) | 5064 | if(E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1) |
4521 | hw->perm_mac_addr[5] ^= 0x01; | 5065 | hw->perm_mac_addr[5] ^= 0x01; |
4522 | break; | 5066 | break; |
@@ -4778,6 +5322,7 @@ e1000_rar_set(struct e1000_hw *hw, | |||
4778 | switch (hw->mac_type) { | 5322 | switch (hw->mac_type) { |
4779 | case e1000_82571: | 5323 | case e1000_82571: |
4780 | case e1000_82572: | 5324 | case e1000_82572: |
5325 | case e1000_80003es2lan: | ||
4781 | if (hw->leave_av_bit_off == TRUE) | 5326 | if (hw->leave_av_bit_off == TRUE) |
4782 | break; | 5327 | break; |
4783 | default: | 5328 | default: |
@@ -5364,6 +5909,7 @@ e1000_get_bus_info(struct e1000_hw *hw) | |||
5364 | hw->bus_width = e1000_bus_width_pciex_1; | 5909 | hw->bus_width = e1000_bus_width_pciex_1; |
5365 | break; | 5910 | break; |
5366 | case e1000_82571: | 5911 | case e1000_82571: |
5912 | case e1000_80003es2lan: | ||
5367 | hw->bus_type = e1000_bus_type_pci_express; | 5913 | hw->bus_type = e1000_bus_type_pci_express; |
5368 | hw->bus_speed = e1000_bus_speed_2500; | 5914 | hw->bus_speed = e1000_bus_speed_2500; |
5369 | hw->bus_width = e1000_bus_width_pciex_4; | 5915 | hw->bus_width = e1000_bus_width_pciex_4; |
@@ -5509,6 +6055,34 @@ e1000_get_cable_length(struct e1000_hw *hw, | |||
5509 | return -E1000_ERR_PHY; | 6055 | return -E1000_ERR_PHY; |
5510 | break; | 6056 | break; |
5511 | } | 6057 | } |
6058 | } else if (hw->phy_type == e1000_phy_gg82563) { | ||
6059 | ret_val = e1000_read_phy_reg(hw, GG82563_PHY_DSP_DISTANCE, | ||
6060 | &phy_data); | ||
6061 | if (ret_val) | ||
6062 | return ret_val; | ||
6063 | cable_length = phy_data & GG82563_DSPD_CABLE_LENGTH; | ||
6064 | |||
6065 | switch (cable_length) { | ||
6066 | case e1000_gg_cable_length_60: | ||
6067 | *min_length = 0; | ||
6068 | *max_length = e1000_igp_cable_length_60; | ||
6069 | break; | ||
6070 | case e1000_gg_cable_length_60_115: | ||
6071 | *min_length = e1000_igp_cable_length_60; | ||
6072 | *max_length = e1000_igp_cable_length_115; | ||
6073 | break; | ||
6074 | case e1000_gg_cable_length_115_150: | ||
6075 | *min_length = e1000_igp_cable_length_115; | ||
6076 | *max_length = e1000_igp_cable_length_150; | ||
6077 | break; | ||
6078 | case e1000_gg_cable_length_150: | ||
6079 | *min_length = e1000_igp_cable_length_150; | ||
6080 | *max_length = e1000_igp_cable_length_180; | ||
6081 | break; | ||
6082 | default: | ||
6083 | return -E1000_ERR_PHY; | ||
6084 | break; | ||
6085 | } | ||
5512 | } else if(hw->phy_type == e1000_phy_igp) { /* For IGP PHY */ | 6086 | } else if(hw->phy_type == e1000_phy_igp) { /* For IGP PHY */ |
5513 | uint16_t agc_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = | 6087 | uint16_t agc_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = |
5514 | {IGP01E1000_PHY_AGC_A, | 6088 | {IGP01E1000_PHY_AGC_A, |
@@ -5618,7 +6192,8 @@ e1000_check_polarity(struct e1000_hw *hw, | |||
5618 | 6192 | ||
5619 | DEBUGFUNC("e1000_check_polarity"); | 6193 | DEBUGFUNC("e1000_check_polarity"); |
5620 | 6194 | ||
5621 | if(hw->phy_type == e1000_phy_m88) { | 6195 | if ((hw->phy_type == e1000_phy_m88) || |
6196 | (hw->phy_type == e1000_phy_gg82563)) { | ||
5622 | /* return the Polarity bit in the Status register. */ | 6197 | /* return the Polarity bit in the Status register. */ |
5623 | ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, | 6198 | ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, |
5624 | &phy_data); | 6199 | &phy_data); |
@@ -5687,7 +6262,8 @@ e1000_check_downshift(struct e1000_hw *hw) | |||
5687 | return ret_val; | 6262 | return ret_val; |
5688 | 6263 | ||
5689 | hw->speed_downgraded = (phy_data & IGP01E1000_PLHR_SS_DOWNGRADE) ? 1 : 0; | 6264 | hw->speed_downgraded = (phy_data & IGP01E1000_PLHR_SS_DOWNGRADE) ? 1 : 0; |
5690 | } else if(hw->phy_type == e1000_phy_m88) { | 6265 | } else if ((hw->phy_type == e1000_phy_m88) || |
6266 | (hw->phy_type == e1000_phy_gg82563)) { | ||
5691 | ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, | 6267 | ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, |
5692 | &phy_data); | 6268 | &phy_data); |
5693 | if(ret_val) | 6269 | if(ret_val) |
@@ -6720,6 +7296,7 @@ e1000_get_auto_rd_done(struct e1000_hw *hw) | |||
6720 | case e1000_82571: | 7296 | case e1000_82571: |
6721 | case e1000_82572: | 7297 | case e1000_82572: |
6722 | case e1000_82573: | 7298 | case e1000_82573: |
7299 | case e1000_80003es2lan: | ||
6723 | while(timeout) { | 7300 | while(timeout) { |
6724 | if (E1000_READ_REG(hw, EECD) & E1000_EECD_AUTO_RD) break; | 7301 | if (E1000_READ_REG(hw, EECD) & E1000_EECD_AUTO_RD) break; |
6725 | else msec_delay(1); | 7302 | else msec_delay(1); |
@@ -6763,6 +7340,11 @@ e1000_get_phy_cfg_done(struct e1000_hw *hw) | |||
6763 | default: | 7340 | default: |
6764 | msec_delay(10); | 7341 | msec_delay(10); |
6765 | break; | 7342 | break; |
7343 | case e1000_80003es2lan: | ||
7344 | /* Separate *_CFG_DONE_* bit for each port */ | ||
7345 | if (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1) | ||
7346 | cfg_mask = E1000_EEPROM_CFG_DONE_PORT_1; | ||
7347 | /* Fall Through */ | ||
6766 | case e1000_82571: | 7348 | case e1000_82571: |
6767 | case e1000_82572: | 7349 | case e1000_82572: |
6768 | while (timeout) { | 7350 | while (timeout) { |
@@ -6805,6 +7387,11 @@ e1000_get_hw_eeprom_semaphore(struct e1000_hw *hw) | |||
6805 | if(!hw->eeprom_semaphore_present) | 7387 | if(!hw->eeprom_semaphore_present) |
6806 | return E1000_SUCCESS; | 7388 | return E1000_SUCCESS; |
6807 | 7389 | ||
7390 | if (hw->mac_type == e1000_80003es2lan) { | ||
7391 | /* Get the SW semaphore. */ | ||
7392 | if (e1000_get_software_semaphore(hw) != E1000_SUCCESS) | ||
7393 | return -E1000_ERR_EEPROM; | ||
7394 | } | ||
6808 | 7395 | ||
6809 | /* Get the FW semaphore. */ | 7396 | /* Get the FW semaphore. */ |
6810 | timeout = hw->eeprom.word_size + 1; | 7397 | timeout = hw->eeprom.word_size + 1; |
@@ -6850,10 +7437,75 @@ e1000_put_hw_eeprom_semaphore(struct e1000_hw *hw) | |||
6850 | return; | 7437 | return; |
6851 | 7438 | ||
6852 | swsm = E1000_READ_REG(hw, SWSM); | 7439 | swsm = E1000_READ_REG(hw, SWSM); |
7440 | if (hw->mac_type == e1000_80003es2lan) { | ||
7441 | /* Release both semaphores. */ | ||
7442 | swsm &= ~(E1000_SWSM_SMBI | E1000_SWSM_SWESMBI); | ||
7443 | } else | ||
6853 | swsm &= ~(E1000_SWSM_SWESMBI); | 7444 | swsm &= ~(E1000_SWSM_SWESMBI); |
6854 | E1000_WRITE_REG(hw, SWSM, swsm); | 7445 | E1000_WRITE_REG(hw, SWSM, swsm); |
6855 | } | 7446 | } |
6856 | 7447 | ||
7448 | /*************************************************************************** | ||
7449 | * | ||
7450 | * Obtaining software semaphore bit (SMBI) before resetting PHY. | ||
7451 | * | ||
7452 | * hw: Struct containing variables accessed by shared code | ||
7453 | * | ||
7454 | * returns: - E1000_ERR_RESET if fail to obtain semaphore. | ||
7455 | * E1000_SUCCESS at any other case. | ||
7456 | * | ||
7457 | ***************************************************************************/ | ||
7458 | int32_t | ||
7459 | e1000_get_software_semaphore(struct e1000_hw *hw) | ||
7460 | { | ||
7461 | int32_t timeout = hw->eeprom.word_size + 1; | ||
7462 | uint32_t swsm; | ||
7463 | |||
7464 | DEBUGFUNC("e1000_get_software_semaphore"); | ||
7465 | |||
7466 | if (hw->mac_type != e1000_80003es2lan) | ||
7467 | return E1000_SUCCESS; | ||
7468 | |||
7469 | while(timeout) { | ||
7470 | swsm = E1000_READ_REG(hw, SWSM); | ||
7471 | /* If SMBI bit cleared, it is now set and we hold the semaphore */ | ||
7472 | if(!(swsm & E1000_SWSM_SMBI)) | ||
7473 | break; | ||
7474 | msec_delay_irq(1); | ||
7475 | timeout--; | ||
7476 | } | ||
7477 | |||
7478 | if(!timeout) { | ||
7479 | DEBUGOUT("Driver can't access device - SMBI bit is set.\n"); | ||
7480 | return -E1000_ERR_RESET; | ||
7481 | } | ||
7482 | |||
7483 | return E1000_SUCCESS; | ||
7484 | } | ||
7485 | |||
7486 | /*************************************************************************** | ||
7487 | * | ||
7488 | * Release semaphore bit (SMBI). | ||
7489 | * | ||
7490 | * hw: Struct containing variables accessed by shared code | ||
7491 | * | ||
7492 | ***************************************************************************/ | ||
7493 | void | ||
7494 | e1000_release_software_semaphore(struct e1000_hw *hw) | ||
7495 | { | ||
7496 | uint32_t swsm; | ||
7497 | |||
7498 | DEBUGFUNC("e1000_release_software_semaphore"); | ||
7499 | |||
7500 | if (hw->mac_type != e1000_80003es2lan) | ||
7501 | return; | ||
7502 | |||
7503 | swsm = E1000_READ_REG(hw, SWSM); | ||
7504 | /* Release the SW semaphores.*/ | ||
7505 | swsm &= ~E1000_SWSM_SMBI; | ||
7506 | E1000_WRITE_REG(hw, SWSM, swsm); | ||
7507 | } | ||
7508 | |||
6857 | /****************************************************************************** | 7509 | /****************************************************************************** |
6858 | * Checks if PHY reset is blocked due to SOL/IDER session, for example. | 7510 | * Checks if PHY reset is blocked due to SOL/IDER session, for example. |
6859 | * Returning E1000_BLK_PHY_RESET isn't necessarily an error. But it's up to | 7511 | * Returning E1000_BLK_PHY_RESET isn't necessarily an error. But it's up to |
@@ -6890,6 +7542,7 @@ e1000_arc_subsystem_valid(struct e1000_hw *hw) | |||
6890 | case e1000_82571: | 7542 | case e1000_82571: |
6891 | case e1000_82572: | 7543 | case e1000_82572: |
6892 | case e1000_82573: | 7544 | case e1000_82573: |
7545 | case e1000_80003es2lan: | ||
6893 | fwsm = E1000_READ_REG(hw, FWSM); | 7546 | fwsm = E1000_READ_REG(hw, FWSM); |
6894 | if((fwsm & E1000_FWSM_MODE_MASK) != 0) | 7547 | if((fwsm & E1000_FWSM_MODE_MASK) != 0) |
6895 | return TRUE; | 7548 | return TRUE; |
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h index f565b201c49e..947a156bd702 100644 --- a/drivers/net/e1000/e1000_hw.h +++ b/drivers/net/e1000/e1000_hw.h | |||
@@ -60,6 +60,7 @@ typedef enum { | |||
60 | e1000_82571, | 60 | e1000_82571, |
61 | e1000_82572, | 61 | e1000_82572, |
62 | e1000_82573, | 62 | e1000_82573, |
63 | e1000_80003es2lan, | ||
63 | e1000_num_macs | 64 | e1000_num_macs |
64 | } e1000_mac_type; | 65 | } e1000_mac_type; |
65 | 66 | ||
@@ -139,6 +140,13 @@ typedef enum { | |||
139 | } e1000_cable_length; | 140 | } e1000_cable_length; |
140 | 141 | ||
141 | typedef enum { | 142 | typedef enum { |
143 | e1000_gg_cable_length_60 = 0, | ||
144 | e1000_gg_cable_length_60_115 = 1, | ||
145 | e1000_gg_cable_length_115_150 = 2, | ||
146 | e1000_gg_cable_length_150 = 4 | ||
147 | } e1000_gg_cable_length; | ||
148 | |||
149 | typedef enum { | ||
142 | e1000_igp_cable_length_10 = 10, | 150 | e1000_igp_cable_length_10 = 10, |
143 | e1000_igp_cable_length_20 = 20, | 151 | e1000_igp_cable_length_20 = 20, |
144 | e1000_igp_cable_length_30 = 30, | 152 | e1000_igp_cable_length_30 = 30, |
@@ -208,6 +216,7 @@ typedef enum { | |||
208 | e1000_phy_m88 = 0, | 216 | e1000_phy_m88 = 0, |
209 | e1000_phy_igp, | 217 | e1000_phy_igp, |
210 | e1000_phy_igp_2, | 218 | e1000_phy_igp_2, |
219 | e1000_phy_gg82563, | ||
211 | e1000_phy_undefined = 0xFF | 220 | e1000_phy_undefined = 0xFF |
212 | } e1000_phy_type; | 221 | } e1000_phy_type; |
213 | 222 | ||
@@ -281,6 +290,7 @@ typedef enum { | |||
281 | #define E1000_ERR_MASTER_REQUESTS_PENDING 10 | 290 | #define E1000_ERR_MASTER_REQUESTS_PENDING 10 |
282 | #define E1000_ERR_HOST_INTERFACE_COMMAND 11 | 291 | #define E1000_ERR_HOST_INTERFACE_COMMAND 11 |
283 | #define E1000_BLK_PHY_RESET 12 | 292 | #define E1000_BLK_PHY_RESET 12 |
293 | #define E1000_ERR_SWFW_SYNC 13 | ||
284 | 294 | ||
285 | /* Function prototypes */ | 295 | /* Function prototypes */ |
286 | /* Initialization */ | 296 | /* Initialization */ |
@@ -304,6 +314,8 @@ int32_t e1000_phy_hw_reset(struct e1000_hw *hw); | |||
304 | int32_t e1000_phy_reset(struct e1000_hw *hw); | 314 | int32_t e1000_phy_reset(struct e1000_hw *hw); |
305 | int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); | 315 | int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); |
306 | int32_t e1000_validate_mdi_setting(struct e1000_hw *hw); | 316 | int32_t e1000_validate_mdi_setting(struct e1000_hw *hw); |
317 | int32_t e1000_read_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *data); | ||
318 | int32_t e1000_write_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data); | ||
307 | 319 | ||
308 | /* EEPROM Functions */ | 320 | /* EEPROM Functions */ |
309 | int32_t e1000_init_eeprom_params(struct e1000_hw *hw); | 321 | int32_t e1000_init_eeprom_params(struct e1000_hw *hw); |
@@ -454,6 +466,8 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); | |||
454 | #define E1000_DEV_ID_82573E_IAMT 0x108C | 466 | #define E1000_DEV_ID_82573E_IAMT 0x108C |
455 | #define E1000_DEV_ID_82573L 0x109A | 467 | #define E1000_DEV_ID_82573L 0x109A |
456 | #define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 | 468 | #define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 |
469 | #define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096 | ||
470 | #define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098 | ||
457 | 471 | ||
458 | 472 | ||
459 | #define NODE_ADDRESS_SIZE 6 | 473 | #define NODE_ADDRESS_SIZE 6 |
@@ -850,6 +864,7 @@ struct e1000_ffvt_entry { | |||
850 | #define E1000_TXCW 0x00178 /* TX Configuration Word - RW */ | 864 | #define E1000_TXCW 0x00178 /* TX Configuration Word - RW */ |
851 | #define E1000_RXCW 0x00180 /* RX Configuration Word - RO */ | 865 | #define E1000_RXCW 0x00180 /* RX Configuration Word - RO */ |
852 | #define E1000_TCTL 0x00400 /* TX Control - RW */ | 866 | #define E1000_TCTL 0x00400 /* TX Control - RW */ |
867 | #define E1000_TCTL_EXT 0x00404 /* Extended TX Control - RW */ | ||
853 | #define E1000_TIPG 0x00410 /* TX Inter-packet gap -RW */ | 868 | #define E1000_TIPG 0x00410 /* TX Inter-packet gap -RW */ |
854 | #define E1000_TBT 0x00448 /* TX Burst Timer - RW */ | 869 | #define E1000_TBT 0x00448 /* TX Burst Timer - RW */ |
855 | #define E1000_AIT 0x00458 /* Adaptive Interframe Spacing Throttle - RW */ | 870 | #define E1000_AIT 0x00458 /* Adaptive Interframe Spacing Throttle - RW */ |
@@ -996,6 +1011,11 @@ struct e1000_ffvt_entry { | |||
996 | #define E1000_FFMT 0x09000 /* Flexible Filter Mask Table - RW Array */ | 1011 | #define E1000_FFMT 0x09000 /* Flexible Filter Mask Table - RW Array */ |
997 | #define E1000_FFVT 0x09800 /* Flexible Filter Value Table - RW Array */ | 1012 | #define E1000_FFVT 0x09800 /* Flexible Filter Value Table - RW Array */ |
998 | 1013 | ||
1014 | #define E1000_KUMCTRLSTA 0x00034 /* MAC-PHY interface - RW */ | ||
1015 | #define E1000_MDPHYA 0x0003C /* PHY address - RW */ | ||
1016 | #define E1000_MANC2H 0x05860 /* Managment Control To Host - RW */ | ||
1017 | #define E1000_SW_FW_SYNC 0x05B5C /* Software-Firmware Synchronization - RW */ | ||
1018 | |||
999 | #define E1000_GCR 0x05B00 /* PCI-Ex Control */ | 1019 | #define E1000_GCR 0x05B00 /* PCI-Ex Control */ |
1000 | #define E1000_GSCL_1 0x05B10 /* PCI-Ex Statistic Control #1 */ | 1020 | #define E1000_GSCL_1 0x05B10 /* PCI-Ex Statistic Control #1 */ |
1001 | #define E1000_GSCL_2 0x05B14 /* PCI-Ex Statistic Control #2 */ | 1021 | #define E1000_GSCL_2 0x05B14 /* PCI-Ex Statistic Control #2 */ |
@@ -1065,6 +1085,7 @@ struct e1000_ffvt_entry { | |||
1065 | #define E1000_82542_RXCW E1000_RXCW | 1085 | #define E1000_82542_RXCW E1000_RXCW |
1066 | #define E1000_82542_MTA 0x00200 | 1086 | #define E1000_82542_MTA 0x00200 |
1067 | #define E1000_82542_TCTL E1000_TCTL | 1087 | #define E1000_82542_TCTL E1000_TCTL |
1088 | #define E1000_82542_TCTL_EXT E1000_TCTL_EXT | ||
1068 | #define E1000_82542_TIPG E1000_TIPG | 1089 | #define E1000_82542_TIPG E1000_TIPG |
1069 | #define E1000_82542_TDBAL 0x00420 | 1090 | #define E1000_82542_TDBAL 0x00420 |
1070 | #define E1000_82542_TDBAH 0x00424 | 1091 | #define E1000_82542_TDBAH 0x00424 |
@@ -1212,6 +1233,8 @@ struct e1000_ffvt_entry { | |||
1212 | #define E1000_82542_RSSRK E1000_RSSRK | 1233 | #define E1000_82542_RSSRK E1000_RSSRK |
1213 | #define E1000_82542_RSSIM E1000_RSSIM | 1234 | #define E1000_82542_RSSIM E1000_RSSIM |
1214 | #define E1000_82542_RSSIR E1000_RSSIR | 1235 | #define E1000_82542_RSSIR E1000_RSSIR |
1236 | #define E1000_82542_KUMCTRLSTA E1000_KUMCTRLSTA | ||
1237 | #define E1000_82542_SW_FW_SYNC E1000_SW_FW_SYNC | ||
1215 | 1238 | ||
1216 | /* Statistics counters collected by the MAC */ | 1239 | /* Statistics counters collected by the MAC */ |
1217 | struct e1000_hw_stats { | 1240 | struct e1000_hw_stats { |
@@ -1303,6 +1326,7 @@ struct e1000_hw { | |||
1303 | e1000_ffe_config ffe_config_state; | 1326 | e1000_ffe_config ffe_config_state; |
1304 | uint32_t asf_firmware_present; | 1327 | uint32_t asf_firmware_present; |
1305 | uint32_t eeprom_semaphore_present; | 1328 | uint32_t eeprom_semaphore_present; |
1329 | uint32_t swfw_sync_present; | ||
1306 | unsigned long io_base; | 1330 | unsigned long io_base; |
1307 | uint32_t phy_id; | 1331 | uint32_t phy_id; |
1308 | uint32_t phy_revision; | 1332 | uint32_t phy_revision; |
@@ -1394,6 +1418,8 @@ struct e1000_hw { | |||
1394 | #define E1000_CTRL_FRCDPX 0x00001000 /* Force Duplex */ | 1418 | #define E1000_CTRL_FRCDPX 0x00001000 /* Force Duplex */ |
1395 | #define E1000_CTRL_D_UD_EN 0x00002000 /* Dock/Undock enable */ | 1419 | #define E1000_CTRL_D_UD_EN 0x00002000 /* Dock/Undock enable */ |
1396 | #define E1000_CTRL_D_UD_POLARITY 0x00004000 /* Defined polarity of Dock/Undock indication in SDP[0] */ | 1420 | #define E1000_CTRL_D_UD_POLARITY 0x00004000 /* Defined polarity of Dock/Undock indication in SDP[0] */ |
1421 | #define E1000_CTRL_FORCE_PHY_RESET 0x00008000 /* Reset both PHY ports, through PHYRST_N pin */ | ||
1422 | #define E1000_CTRL_EXT_LINK_EN 0x00010000 /* enable link status from external LINK_0 and LINK_1 pins */ | ||
1397 | #define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */ | 1423 | #define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */ |
1398 | #define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */ | 1424 | #define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */ |
1399 | #define E1000_CTRL_SWDPIN2 0x00100000 /* SWDPIN 2 value */ | 1425 | #define E1000_CTRL_SWDPIN2 0x00100000 /* SWDPIN 2 value */ |
@@ -1430,6 +1456,16 @@ struct e1000_hw { | |||
1430 | #define E1000_STATUS_BUS64 0x00001000 /* In 64 bit slot */ | 1456 | #define E1000_STATUS_BUS64 0x00001000 /* In 64 bit slot */ |
1431 | #define E1000_STATUS_PCIX_MODE 0x00002000 /* PCI-X mode */ | 1457 | #define E1000_STATUS_PCIX_MODE 0x00002000 /* PCI-X mode */ |
1432 | #define E1000_STATUS_PCIX_SPEED 0x0000C000 /* PCI-X bus speed */ | 1458 | #define E1000_STATUS_PCIX_SPEED 0x0000C000 /* PCI-X bus speed */ |
1459 | #define E1000_STATUS_BMC_SKU_0 0x00100000 /* BMC USB redirect disabled */ | ||
1460 | #define E1000_STATUS_BMC_SKU_1 0x00200000 /* BMC SRAM disabled */ | ||
1461 | #define E1000_STATUS_BMC_SKU_2 0x00400000 /* BMC SDRAM disabled */ | ||
1462 | #define E1000_STATUS_BMC_CRYPTO 0x00800000 /* BMC crypto disabled */ | ||
1463 | #define E1000_STATUS_BMC_LITE 0x01000000 /* BMC external code execution disabled */ | ||
1464 | #define E1000_STATUS_RGMII_ENABLE 0x02000000 /* RGMII disabled */ | ||
1465 | #define E1000_STATUS_FUSE_8 0x04000000 | ||
1466 | #define E1000_STATUS_FUSE_9 0x08000000 | ||
1467 | #define E1000_STATUS_SERDES0_DIS 0x10000000 /* SERDES disabled on port 0 */ | ||
1468 | #define E1000_STATUS_SERDES1_DIS 0x20000000 /* SERDES disabled on port 1 */ | ||
1433 | 1469 | ||
1434 | /* Constants used to intrepret the masked PCI-X bus speed. */ | 1470 | /* Constants used to intrepret the masked PCI-X bus speed. */ |
1435 | #define E1000_STATUS_PCIX_SPEED_66 0x00000000 /* PCI-X bus speed 50-66 MHz */ | 1471 | #define E1000_STATUS_PCIX_SPEED_66 0x00000000 /* PCI-X bus speed 50-66 MHz */ |
@@ -1507,6 +1543,8 @@ struct e1000_hw { | |||
1507 | #define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000 | 1543 | #define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000 |
1508 | #define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000 | 1544 | #define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000 |
1509 | #define E1000_CTRL_EXT_LINK_MODE_TBI 0x00C00000 | 1545 | #define E1000_CTRL_EXT_LINK_MODE_TBI 0x00C00000 |
1546 | #define E1000_CTRL_EXT_LINK_MODE_KMRN 0x00000000 | ||
1547 | #define E1000_CTRL_EXT_LINK_MODE_SERDES 0x00C00000 | ||
1510 | #define E1000_CTRL_EXT_WR_WMARK_MASK 0x03000000 | 1548 | #define E1000_CTRL_EXT_WR_WMARK_MASK 0x03000000 |
1511 | #define E1000_CTRL_EXT_WR_WMARK_256 0x00000000 | 1549 | #define E1000_CTRL_EXT_WR_WMARK_256 0x00000000 |
1512 | #define E1000_CTRL_EXT_WR_WMARK_320 0x01000000 | 1550 | #define E1000_CTRL_EXT_WR_WMARK_320 0x01000000 |
@@ -1516,6 +1554,9 @@ struct e1000_hw { | |||
1516 | #define E1000_CTRL_EXT_DRV_LOAD 0x10000000 /* Driver loaded bit for FW */ | 1554 | #define E1000_CTRL_EXT_DRV_LOAD 0x10000000 /* Driver loaded bit for FW */ |
1517 | #define E1000_CTRL_EXT_IAME 0x08000000 /* Interrupt acknowledge Auto-mask */ | 1555 | #define E1000_CTRL_EXT_IAME 0x08000000 /* Interrupt acknowledge Auto-mask */ |
1518 | #define E1000_CTRL_EXT_INT_TIMER_CLR 0x20000000 /* Clear Interrupt timers after IMS clear */ | 1556 | #define E1000_CTRL_EXT_INT_TIMER_CLR 0x20000000 /* Clear Interrupt timers after IMS clear */ |
1557 | #define E1000_CRTL_EXT_PB_PAREN 0x01000000 /* packet buffer parity error detection enabled */ | ||
1558 | #define E1000_CTRL_EXT_DF_PAREN 0x02000000 /* descriptor FIFO parity error detection enable */ | ||
1559 | #define E1000_CTRL_EXT_GHOST_PAREN 0x40000000 | ||
1519 | 1560 | ||
1520 | /* MDI Control */ | 1561 | /* MDI Control */ |
1521 | #define E1000_MDIC_DATA_MASK 0x0000FFFF | 1562 | #define E1000_MDIC_DATA_MASK 0x0000FFFF |
@@ -1529,6 +1570,32 @@ struct e1000_hw { | |||
1529 | #define E1000_MDIC_INT_EN 0x20000000 | 1570 | #define E1000_MDIC_INT_EN 0x20000000 |
1530 | #define E1000_MDIC_ERROR 0x40000000 | 1571 | #define E1000_MDIC_ERROR 0x40000000 |
1531 | 1572 | ||
1573 | #define E1000_KUMCTRLSTA_MASK 0x0000FFFF | ||
1574 | #define E1000_KUMCTRLSTA_OFFSET 0x001F0000 | ||
1575 | #define E1000_KUMCTRLSTA_OFFSET_SHIFT 16 | ||
1576 | #define E1000_KUMCTRLSTA_REN 0x00200000 | ||
1577 | |||
1578 | #define E1000_KUMCTRLSTA_OFFSET_FIFO_CTRL 0x00000000 | ||
1579 | #define E1000_KUMCTRLSTA_OFFSET_CTRL 0x00000001 | ||
1580 | #define E1000_KUMCTRLSTA_OFFSET_INB_CTRL 0x00000002 | ||
1581 | #define E1000_KUMCTRLSTA_OFFSET_DIAG 0x00000003 | ||
1582 | #define E1000_KUMCTRLSTA_OFFSET_TIMEOUTS 0x00000004 | ||
1583 | #define E1000_KUMCTRLSTA_OFFSET_INB_PARAM 0x00000009 | ||
1584 | #define E1000_KUMCTRLSTA_OFFSET_HD_CTRL 0x00000010 | ||
1585 | #define E1000_KUMCTRLSTA_OFFSET_M2P_SERDES 0x0000001E | ||
1586 | #define E1000_KUMCTRLSTA_OFFSET_M2P_MODES 0x0000001F | ||
1587 | |||
1588 | /* FIFO Control */ | ||
1589 | #define E1000_KUMCTRLSTA_FIFO_CTRL_RX_BYPASS 0x00000008 | ||
1590 | #define E1000_KUMCTRLSTA_FIFO_CTRL_TX_BYPASS 0x00000800 | ||
1591 | |||
1592 | /* In-Band Control */ | ||
1593 | #define E1000_KUMCTRLSTA_INB_CTRL_DIS_PADDING 0x00000010 | ||
1594 | |||
1595 | /* Half-Duplex Control */ | ||
1596 | #define E1000_KUMCTRLSTA_HD_CTRL_10_100_DEFAULT 0x00000004 | ||
1597 | #define E1000_KUMCTRLSTA_HD_CTRL_1000_DEFAULT 0x00000000 | ||
1598 | |||
1532 | /* LED Control */ | 1599 | /* LED Control */ |
1533 | #define E1000_LEDCTL_LED0_MODE_MASK 0x0000000F | 1600 | #define E1000_LEDCTL_LED0_MODE_MASK 0x0000000F |
1534 | #define E1000_LEDCTL_LED0_MODE_SHIFT 0 | 1601 | #define E1000_LEDCTL_LED0_MODE_SHIFT 0 |
@@ -1591,6 +1658,13 @@ struct e1000_hw { | |||
1591 | #define E1000_ICR_MNG 0x00040000 /* Manageability event */ | 1658 | #define E1000_ICR_MNG 0x00040000 /* Manageability event */ |
1592 | #define E1000_ICR_DOCK 0x00080000 /* Dock/Undock */ | 1659 | #define E1000_ICR_DOCK 0x00080000 /* Dock/Undock */ |
1593 | #define E1000_ICR_INT_ASSERTED 0x80000000 /* If this bit asserted, the driver should claim the interrupt */ | 1660 | #define E1000_ICR_INT_ASSERTED 0x80000000 /* If this bit asserted, the driver should claim the interrupt */ |
1661 | #define E1000_ICR_RXD_FIFO_PAR0 0x00100000 /* queue 0 Rx descriptor FIFO parity error */ | ||
1662 | #define E1000_ICR_TXD_FIFO_PAR0 0x00200000 /* queue 0 Tx descriptor FIFO parity error */ | ||
1663 | #define E1000_ICR_HOST_ARB_PAR 0x00400000 /* host arb read buffer parity error */ | ||
1664 | #define E1000_ICR_PB_PAR 0x00800000 /* packet buffer parity error */ | ||
1665 | #define E1000_ICR_RXD_FIFO_PAR1 0x01000000 /* queue 1 Rx descriptor FIFO parity error */ | ||
1666 | #define E1000_ICR_TXD_FIFO_PAR1 0x02000000 /* queue 1 Tx descriptor FIFO parity error */ | ||
1667 | #define E1000_ICR_ALL_PARITY 0x03F00000 /* all parity error bits */ | ||
1594 | 1668 | ||
1595 | /* Interrupt Cause Set */ | 1669 | /* Interrupt Cause Set */ |
1596 | #define E1000_ICS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ | 1670 | #define E1000_ICS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ |
@@ -1611,6 +1685,12 @@ struct e1000_hw { | |||
1611 | #define E1000_ICS_ACK E1000_ICR_ACK /* Receive Ack frame */ | 1685 | #define E1000_ICS_ACK E1000_ICR_ACK /* Receive Ack frame */ |
1612 | #define E1000_ICS_MNG E1000_ICR_MNG /* Manageability event */ | 1686 | #define E1000_ICS_MNG E1000_ICR_MNG /* Manageability event */ |
1613 | #define E1000_ICS_DOCK E1000_ICR_DOCK /* Dock/Undock */ | 1687 | #define E1000_ICS_DOCK E1000_ICR_DOCK /* Dock/Undock */ |
1688 | #define E1000_ICS_RXD_FIFO_PAR0 E1000_ICR_RXD_FIFO_PAR0 /* queue 0 Rx descriptor FIFO parity error */ | ||
1689 | #define E1000_ICS_TXD_FIFO_PAR0 E1000_ICR_TXD_FIFO_PAR0 /* queue 0 Tx descriptor FIFO parity error */ | ||
1690 | #define E1000_ICS_HOST_ARB_PAR E1000_ICR_HOST_ARB_PAR /* host arb read buffer parity error */ | ||
1691 | #define E1000_ICS_PB_PAR E1000_ICR_PB_PAR /* packet buffer parity error */ | ||
1692 | #define E1000_ICS_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* queue 1 Rx descriptor FIFO parity error */ | ||
1693 | #define E1000_ICS_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* queue 1 Tx descriptor FIFO parity error */ | ||
1614 | 1694 | ||
1615 | /* Interrupt Mask Set */ | 1695 | /* Interrupt Mask Set */ |
1616 | #define E1000_IMS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ | 1696 | #define E1000_IMS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ |
@@ -1631,6 +1711,12 @@ struct e1000_hw { | |||
1631 | #define E1000_IMS_ACK E1000_ICR_ACK /* Receive Ack frame */ | 1711 | #define E1000_IMS_ACK E1000_ICR_ACK /* Receive Ack frame */ |
1632 | #define E1000_IMS_MNG E1000_ICR_MNG /* Manageability event */ | 1712 | #define E1000_IMS_MNG E1000_ICR_MNG /* Manageability event */ |
1633 | #define E1000_IMS_DOCK E1000_ICR_DOCK /* Dock/Undock */ | 1713 | #define E1000_IMS_DOCK E1000_ICR_DOCK /* Dock/Undock */ |
1714 | #define E1000_IMS_RXD_FIFO_PAR0 E1000_ICR_RXD_FIFO_PAR0 /* queue 0 Rx descriptor FIFO parity error */ | ||
1715 | #define E1000_IMS_TXD_FIFO_PAR0 E1000_ICR_TXD_FIFO_PAR0 /* queue 0 Tx descriptor FIFO parity error */ | ||
1716 | #define E1000_IMS_HOST_ARB_PAR E1000_ICR_HOST_ARB_PAR /* host arb read buffer parity error */ | ||
1717 | #define E1000_IMS_PB_PAR E1000_ICR_PB_PAR /* packet buffer parity error */ | ||
1718 | #define E1000_IMS_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* queue 1 Rx descriptor FIFO parity error */ | ||
1719 | #define E1000_IMS_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* queue 1 Tx descriptor FIFO parity error */ | ||
1634 | 1720 | ||
1635 | /* Interrupt Mask Clear */ | 1721 | /* Interrupt Mask Clear */ |
1636 | #define E1000_IMC_TXDW E1000_ICR_TXDW /* Transmit desc written back */ | 1722 | #define E1000_IMC_TXDW E1000_ICR_TXDW /* Transmit desc written back */ |
@@ -1651,6 +1737,12 @@ struct e1000_hw { | |||
1651 | #define E1000_IMC_ACK E1000_ICR_ACK /* Receive Ack frame */ | 1737 | #define E1000_IMC_ACK E1000_ICR_ACK /* Receive Ack frame */ |
1652 | #define E1000_IMC_MNG E1000_ICR_MNG /* Manageability event */ | 1738 | #define E1000_IMC_MNG E1000_ICR_MNG /* Manageability event */ |
1653 | #define E1000_IMC_DOCK E1000_ICR_DOCK /* Dock/Undock */ | 1739 | #define E1000_IMC_DOCK E1000_ICR_DOCK /* Dock/Undock */ |
1740 | #define E1000_IMC_RXD_FIFO_PAR0 E1000_ICR_RXD_FIFO_PAR0 /* queue 0 Rx descriptor FIFO parity error */ | ||
1741 | #define E1000_IMC_TXD_FIFO_PAR0 E1000_ICR_TXD_FIFO_PAR0 /* queue 0 Tx descriptor FIFO parity error */ | ||
1742 | #define E1000_IMC_HOST_ARB_PAR E1000_ICR_HOST_ARB_PAR /* host arb read buffer parity error */ | ||
1743 | #define E1000_IMC_PB_PAR E1000_ICR_PB_PAR /* packet buffer parity error */ | ||
1744 | #define E1000_IMC_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* queue 1 Rx descriptor FIFO parity error */ | ||
1745 | #define E1000_IMC_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* queue 1 Tx descriptor FIFO parity error */ | ||
1654 | 1746 | ||
1655 | /* Receive Control */ | 1747 | /* Receive Control */ |
1656 | #define E1000_RCTL_RST 0x00000001 /* Software reset */ | 1748 | #define E1000_RCTL_RST 0x00000001 /* Software reset */ |
@@ -1720,6 +1812,12 @@ struct e1000_hw { | |||
1720 | #define E1000_PSRCTL_BSIZE2_SHIFT 6 /* Shift _left_ 6 */ | 1812 | #define E1000_PSRCTL_BSIZE2_SHIFT 6 /* Shift _left_ 6 */ |
1721 | #define E1000_PSRCTL_BSIZE3_SHIFT 14 /* Shift _left_ 14 */ | 1813 | #define E1000_PSRCTL_BSIZE3_SHIFT 14 /* Shift _left_ 14 */ |
1722 | 1814 | ||
1815 | /* SW_W_SYNC definitions */ | ||
1816 | #define E1000_SWFW_EEP_SM 0x0001 | ||
1817 | #define E1000_SWFW_PHY0_SM 0x0002 | ||
1818 | #define E1000_SWFW_PHY1_SM 0x0004 | ||
1819 | #define E1000_SWFW_MAC_CSR_SM 0x0008 | ||
1820 | |||
1723 | /* Receive Descriptor */ | 1821 | /* Receive Descriptor */ |
1724 | #define E1000_RDT_DELAY 0x0000ffff /* Delay timer (1=1024us) */ | 1822 | #define E1000_RDT_DELAY 0x0000ffff /* Delay timer (1=1024us) */ |
1725 | #define E1000_RDT_FPDB 0x80000000 /* Flush descriptor block */ | 1823 | #define E1000_RDT_FPDB 0x80000000 /* Flush descriptor block */ |
@@ -1798,6 +1896,11 @@ struct e1000_hw { | |||
1798 | #define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */ | 1896 | #define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */ |
1799 | #define E1000_TCTL_NRTU 0x02000000 /* No Re-transmit on underrun */ | 1897 | #define E1000_TCTL_NRTU 0x02000000 /* No Re-transmit on underrun */ |
1800 | #define E1000_TCTL_MULR 0x10000000 /* Multiple request support */ | 1898 | #define E1000_TCTL_MULR 0x10000000 /* Multiple request support */ |
1899 | /* Extended Transmit Control */ | ||
1900 | #define E1000_TCTL_EXT_BST_MASK 0x000003FF /* Backoff Slot Time */ | ||
1901 | #define E1000_TCTL_EXT_GCEX_MASK 0x000FFC00 /* Gigabit Carry Extend Padding */ | ||
1902 | |||
1903 | #define DEFAULT_80003ES2LAN_TCTL_EXT_GCEX 0x00010000 | ||
1801 | 1904 | ||
1802 | /* Receive Checksum Control */ | 1905 | /* Receive Checksum Control */ |
1803 | #define E1000_RXCSUM_PCSS_MASK 0x000000FF /* Packet Checksum Start */ | 1906 | #define E1000_RXCSUM_PCSS_MASK 0x000000FF /* Packet Checksum Start */ |
@@ -2044,6 +2147,7 @@ struct e1000_host_command_info { | |||
2044 | #define EEPROM_CHECKSUM_REG 0x003F | 2147 | #define EEPROM_CHECKSUM_REG 0x003F |
2045 | 2148 | ||
2046 | #define E1000_EEPROM_CFG_DONE 0x00040000 /* MNG config cycle done */ | 2149 | #define E1000_EEPROM_CFG_DONE 0x00040000 /* MNG config cycle done */ |
2150 | #define E1000_EEPROM_CFG_DONE_PORT_1 0x00080000 /* ...for second port */ | ||
2047 | 2151 | ||
2048 | /* Word definitions for ID LED Settings */ | 2152 | /* Word definitions for ID LED Settings */ |
2049 | #define ID_LED_RESERVED_0000 0x0000 | 2153 | #define ID_LED_RESERVED_0000 0x0000 |
@@ -2132,8 +2236,11 @@ struct e1000_host_command_info { | |||
2132 | 2236 | ||
2133 | #define DEFAULT_82542_TIPG_IPGR2 10 | 2237 | #define DEFAULT_82542_TIPG_IPGR2 10 |
2134 | #define DEFAULT_82543_TIPG_IPGR2 6 | 2238 | #define DEFAULT_82543_TIPG_IPGR2 6 |
2239 | #define DEFAULT_80003ES2LAN_TIPG_IPGR2 7 | ||
2135 | #define E1000_TIPG_IPGR2_SHIFT 20 | 2240 | #define E1000_TIPG_IPGR2_SHIFT 20 |
2136 | 2241 | ||
2242 | #define DEFAULT_80003ES2LAN_TIPG_IPGT_10_100 0x00000009 | ||
2243 | #define DEFAULT_80003ES2LAN_TIPG_IPGT_1000 0x00000008 | ||
2137 | #define E1000_TXDMAC_DPP 0x00000001 | 2244 | #define E1000_TXDMAC_DPP 0x00000001 |
2138 | 2245 | ||
2139 | /* Adaptive IFS defines */ | 2246 | /* Adaptive IFS defines */ |
@@ -2374,6 +2481,78 @@ struct e1000_host_command_info { | |||
2374 | 2481 | ||
2375 | #define IGP01E1000_ANALOG_REGS_PAGE 0x20C0 | 2482 | #define IGP01E1000_ANALOG_REGS_PAGE 0x20C0 |
2376 | 2483 | ||
2484 | /* Bits... | ||
2485 | * 15-5: page | ||
2486 | * 4-0: register offset | ||
2487 | */ | ||
2488 | #define GG82563_PAGE_SHIFT 5 | ||
2489 | #define GG82563_REG(page, reg) \ | ||
2490 | (((page) << GG82563_PAGE_SHIFT) | ((reg) & MAX_PHY_REG_ADDRESS)) | ||
2491 | #define GG82563_MIN_ALT_REG 30 | ||
2492 | |||
2493 | /* GG82563 Specific Registers */ | ||
2494 | #define GG82563_PHY_SPEC_CTRL \ | ||
2495 | GG82563_REG(0, 16) /* PHY Specific Control */ | ||
2496 | #define GG82563_PHY_SPEC_STATUS \ | ||
2497 | GG82563_REG(0, 17) /* PHY Specific Status */ | ||
2498 | #define GG82563_PHY_INT_ENABLE \ | ||
2499 | GG82563_REG(0, 18) /* Interrupt Enable */ | ||
2500 | #define GG82563_PHY_SPEC_STATUS_2 \ | ||
2501 | GG82563_REG(0, 19) /* PHY Specific Status 2 */ | ||
2502 | #define GG82563_PHY_RX_ERR_CNTR \ | ||
2503 | GG82563_REG(0, 21) /* Receive Error Counter */ | ||
2504 | #define GG82563_PHY_PAGE_SELECT \ | ||
2505 | GG82563_REG(0, 22) /* Page Select */ | ||
2506 | #define GG82563_PHY_SPEC_CTRL_2 \ | ||
2507 | GG82563_REG(0, 26) /* PHY Specific Control 2 */ | ||
2508 | #define GG82563_PHY_PAGE_SELECT_ALT \ | ||
2509 | GG82563_REG(0, 29) /* Alternate Page Select */ | ||
2510 | #define GG82563_PHY_TEST_CLK_CTRL \ | ||
2511 | GG82563_REG(0, 30) /* Test Clock Control (use reg. 29 to select) */ | ||
2512 | |||
2513 | #define GG82563_PHY_MAC_SPEC_CTRL \ | ||
2514 | GG82563_REG(2, 21) /* MAC Specific Control Register */ | ||
2515 | #define GG82563_PHY_MAC_SPEC_CTRL_2 \ | ||
2516 | GG82563_REG(2, 26) /* MAC Specific Control 2 */ | ||
2517 | |||
2518 | #define GG82563_PHY_DSP_DISTANCE \ | ||
2519 | GG82563_REG(5, 26) /* DSP Distance */ | ||
2520 | |||
2521 | /* Page 193 - Port Control Registers */ | ||
2522 | #define GG82563_PHY_KMRN_MODE_CTRL \ | ||
2523 | GG82563_REG(193, 16) /* Kumeran Mode Control */ | ||
2524 | #define GG82563_PHY_PORT_RESET \ | ||
2525 | GG82563_REG(193, 17) /* Port Reset */ | ||
2526 | #define GG82563_PHY_REVISION_ID \ | ||
2527 | GG82563_REG(193, 18) /* Revision ID */ | ||
2528 | #define GG82563_PHY_DEVICE_ID \ | ||
2529 | GG82563_REG(193, 19) /* Device ID */ | ||
2530 | #define GG82563_PHY_PWR_MGMT_CTRL \ | ||
2531 | GG82563_REG(193, 20) /* Power Management Control */ | ||
2532 | #define GG82563_PHY_RATE_ADAPT_CTRL \ | ||
2533 | GG82563_REG(193, 25) /* Rate Adaptation Control */ | ||
2534 | |||
2535 | /* Page 194 - KMRN Registers */ | ||
2536 | #define GG82563_PHY_KMRN_FIFO_CTRL_STAT \ | ||
2537 | GG82563_REG(194, 16) /* FIFO's Control/Status */ | ||
2538 | #define GG82563_PHY_KMRN_CTRL \ | ||
2539 | GG82563_REG(194, 17) /* Control */ | ||
2540 | #define GG82563_PHY_INBAND_CTRL \ | ||
2541 | GG82563_REG(194, 18) /* Inband Control */ | ||
2542 | #define GG82563_PHY_KMRN_DIAGNOSTIC \ | ||
2543 | GG82563_REG(194, 19) /* Diagnostic */ | ||
2544 | #define GG82563_PHY_ACK_TIMEOUTS \ | ||
2545 | GG82563_REG(194, 20) /* Acknowledge Timeouts */ | ||
2546 | #define GG82563_PHY_ADV_ABILITY \ | ||
2547 | GG82563_REG(194, 21) /* Advertised Ability */ | ||
2548 | #define GG82563_PHY_LINK_PARTNER_ADV_ABILITY \ | ||
2549 | GG82563_REG(194, 23) /* Link Partner Advertised Ability */ | ||
2550 | #define GG82563_PHY_ADV_NEXT_PAGE \ | ||
2551 | GG82563_REG(194, 24) /* Advertised Next Page */ | ||
2552 | #define GG82563_PHY_LINK_PARTNER_ADV_NEXT_PAGE \ | ||
2553 | GG82563_REG(194, 25) /* Link Partner Advertised Next page */ | ||
2554 | #define GG82563_PHY_KMRN_MISC \ | ||
2555 | GG82563_REG(194, 26) /* Misc. */ | ||
2377 | 2556 | ||
2378 | /* PHY Control Register */ | 2557 | /* PHY Control Register */ |
2379 | #define MII_CR_SPEED_SELECT_MSB 0x0040 /* bits 6,13: 10=1000, 01=100, 00=10 */ | 2558 | #define MII_CR_SPEED_SELECT_MSB 0x0040 /* bits 6,13: 10=1000, 01=100, 00=10 */ |
@@ -2687,6 +2866,113 @@ struct e1000_host_command_info { | |||
2687 | #define IGP01E1000_ANALOG_FUSE_FINE_1 0x0080 | 2866 | #define IGP01E1000_ANALOG_FUSE_FINE_1 0x0080 |
2688 | #define IGP01E1000_ANALOG_FUSE_FINE_10 0x0500 | 2867 | #define IGP01E1000_ANALOG_FUSE_FINE_10 0x0500 |
2689 | 2868 | ||
2869 | /* GG82563 PHY Specific Status Register (Page 0, Register 16 */ | ||
2870 | #define GG82563_PSCR_DISABLE_JABBER 0x0001 /* 1=Disable Jabber */ | ||
2871 | #define GG82563_PSCR_POLARITY_REVERSAL_DISABLE 0x0002 /* 1=Polarity Reversal Disabled */ | ||
2872 | #define GG82563_PSCR_POWER_DOWN 0x0004 /* 1=Power Down */ | ||
2873 | #define GG82563_PSCR_COPPER_TRANSMITER_DISABLE 0x0008 /* 1=Transmitter Disabled */ | ||
2874 | #define GG82563_PSCR_CROSSOVER_MODE_MASK 0x0060 | ||
2875 | #define GG82563_PSCR_CROSSOVER_MODE_MDI 0x0000 /* 00=Manual MDI configuration */ | ||
2876 | #define GG82563_PSCR_CROSSOVER_MODE_MDIX 0x0020 /* 01=Manual MDIX configuration */ | ||
2877 | #define GG82563_PSCR_CROSSOVER_MODE_AUTO 0x0060 /* 11=Automatic crossover */ | ||
2878 | #define GG82563_PSCR_ENALBE_EXTENDED_DISTANCE 0x0080 /* 1=Enable Extended Distance */ | ||
2879 | #define GG82563_PSCR_ENERGY_DETECT_MASK 0x0300 | ||
2880 | #define GG82563_PSCR_ENERGY_DETECT_OFF 0x0000 /* 00,01=Off */ | ||
2881 | #define GG82563_PSCR_ENERGY_DETECT_RX 0x0200 /* 10=Sense on Rx only (Energy Detect) */ | ||
2882 | #define GG82563_PSCR_ENERGY_DETECT_RX_TM 0x0300 /* 11=Sense and Tx NLP */ | ||
2883 | #define GG82563_PSCR_FORCE_LINK_GOOD 0x0400 /* 1=Force Link Good */ | ||
2884 | #define GG82563_PSCR_DOWNSHIFT_ENABLE 0x0800 /* 1=Enable Downshift */ | ||
2885 | #define GG82563_PSCR_DOWNSHIFT_COUNTER_MASK 0x7000 | ||
2886 | #define GG82563_PSCR_DOWNSHIFT_COUNTER_SHIFT 12 | ||
2887 | |||
2888 | /* PHY Specific Status Register (Page 0, Register 17) */ | ||
2889 | #define GG82563_PSSR_JABBER 0x0001 /* 1=Jabber */ | ||
2890 | #define GG82563_PSSR_POLARITY 0x0002 /* 1=Polarity Reversed */ | ||
2891 | #define GG82563_PSSR_LINK 0x0008 /* 1=Link is Up */ | ||
2892 | #define GG82563_PSSR_ENERGY_DETECT 0x0010 /* 1=Sleep, 0=Active */ | ||
2893 | #define GG82563_PSSR_DOWNSHIFT 0x0020 /* 1=Downshift */ | ||
2894 | #define GG82563_PSSR_CROSSOVER_STATUS 0x0040 /* 1=MDIX, 0=MDI */ | ||
2895 | #define GG82563_PSSR_RX_PAUSE_ENABLED 0x0100 /* 1=Receive Pause Enabled */ | ||
2896 | #define GG82563_PSSR_TX_PAUSE_ENABLED 0x0200 /* 1=Transmit Pause Enabled */ | ||
2897 | #define GG82563_PSSR_LINK_UP 0x0400 /* 1=Link Up */ | ||
2898 | #define GG82563_PSSR_SPEED_DUPLEX_RESOLVED 0x0800 /* 1=Resolved */ | ||
2899 | #define GG82563_PSSR_PAGE_RECEIVED 0x1000 /* 1=Page Received */ | ||
2900 | #define GG82563_PSSR_DUPLEX 0x2000 /* 1-Full-Duplex */ | ||
2901 | #define GG82563_PSSR_SPEED_MASK 0xC000 | ||
2902 | #define GG82563_PSSR_SPEED_10MBPS 0x0000 /* 00=10Mbps */ | ||
2903 | #define GG82563_PSSR_SPEED_100MBPS 0x4000 /* 01=100Mbps */ | ||
2904 | #define GG82563_PSSR_SPEED_1000MBPS 0x8000 /* 10=1000Mbps */ | ||
2905 | |||
2906 | /* PHY Specific Status Register 2 (Page 0, Register 19) */ | ||
2907 | #define GG82563_PSSR2_JABBER 0x0001 /* 1=Jabber */ | ||
2908 | #define GG82563_PSSR2_POLARITY_CHANGED 0x0002 /* 1=Polarity Changed */ | ||
2909 | #define GG82563_PSSR2_ENERGY_DETECT_CHANGED 0x0010 /* 1=Energy Detect Changed */ | ||
2910 | #define GG82563_PSSR2_DOWNSHIFT_INTERRUPT 0x0020 /* 1=Downshift Detected */ | ||
2911 | #define GG82563_PSSR2_MDI_CROSSOVER_CHANGE 0x0040 /* 1=Crossover Changed */ | ||
2912 | #define GG82563_PSSR2_FALSE_CARRIER 0x0100 /* 1=False Carrier */ | ||
2913 | #define GG82563_PSSR2_SYMBOL_ERROR 0x0200 /* 1=Symbol Error */ | ||
2914 | #define GG82563_PSSR2_LINK_STATUS_CHANGED 0x0400 /* 1=Link Status Changed */ | ||
2915 | #define GG82563_PSSR2_AUTO_NEG_COMPLETED 0x0800 /* 1=Auto-Neg Completed */ | ||
2916 | #define GG82563_PSSR2_PAGE_RECEIVED 0x1000 /* 1=Page Received */ | ||
2917 | #define GG82563_PSSR2_DUPLEX_CHANGED 0x2000 /* 1=Duplex Changed */ | ||
2918 | #define GG82563_PSSR2_SPEED_CHANGED 0x4000 /* 1=Speed Changed */ | ||
2919 | #define GG82563_PSSR2_AUTO_NEG_ERROR 0x8000 /* 1=Auto-Neg Error */ | ||
2920 | |||
2921 | /* PHY Specific Control Register 2 (Page 0, Register 26) */ | ||
2922 | #define GG82563_PSCR2_10BT_POLARITY_FORCE 0x0002 /* 1=Force Negative Polarity */ | ||
2923 | #define GG82563_PSCR2_1000MB_TEST_SELECT_MASK 0x000C | ||
2924 | #define GG82563_PSCR2_1000MB_TEST_SELECT_NORMAL 0x0000 /* 00,01=Normal Operation */ | ||
2925 | #define GG82563_PSCR2_1000MB_TEST_SELECT_112NS 0x0008 /* 10=Select 112ns Sequence */ | ||
2926 | #define GG82563_PSCR2_1000MB_TEST_SELECT_16NS 0x000C /* 11=Select 16ns Sequence */ | ||
2927 | #define GG82563_PSCR2_REVERSE_AUTO_NEG 0x2000 /* 1=Reverse Auto-Negotiation */ | ||
2928 | #define GG82563_PSCR2_1000BT_DISABLE 0x4000 /* 1=Disable 1000BASE-T */ | ||
2929 | #define GG82563_PSCR2_TRANSMITER_TYPE_MASK 0x8000 | ||
2930 | #define GG82563_PSCR2_TRANSMITTER_TYPE_CLASS_B 0x0000 /* 0=Class B */ | ||
2931 | #define GG82563_PSCR2_TRANSMITTER_TYPE_CLASS_A 0x8000 /* 1=Class A */ | ||
2932 | |||
2933 | /* MAC Specific Control Register (Page 2, Register 21) */ | ||
2934 | /* Tx clock speed for Link Down and 1000BASE-T for the following speeds */ | ||
2935 | #define GG82563_MSCR_TX_CLK_MASK 0x0007 | ||
2936 | #define GG82563_MSCR_TX_CLK_10MBPS_2_5MHZ 0x0004 | ||
2937 | #define GG82563_MSCR_TX_CLK_100MBPS_25MHZ 0x0005 | ||
2938 | #define GG82563_MSCR_TX_CLK_1000MBPS_2_5MHZ 0x0006 | ||
2939 | #define GG82563_MSCR_TX_CLK_1000MBPS_25MHZ 0x0007 | ||
2940 | |||
2941 | #define GG82563_MSCR_ASSERT_CRS_ON_TX 0x0010 /* 1=Assert */ | ||
2942 | |||
2943 | /* DSP Distance Register (Page 5, Register 26) */ | ||
2944 | #define GG82563_DSPD_CABLE_LENGTH 0x0007 /* 0 = <50M; | ||
2945 | 1 = 50-80M; | ||
2946 | 2 = 80-110M; | ||
2947 | 3 = 110-140M; | ||
2948 | 4 = >140M */ | ||
2949 | |||
2950 | /* Kumeran Mode Control Register (Page 193, Register 16) */ | ||
2951 | #define GG82563_KMCR_PHY_LEDS_EN 0x0020 /* 1=PHY LEDs, 0=Kumeran Inband LEDs */ | ||
2952 | #define GG82563_KMCR_FORCE_LINK_UP 0x0040 /* 1=Force Link Up */ | ||
2953 | #define GG82563_KMCR_SUPPRESS_SGMII_EPD_EXT 0x0080 | ||
2954 | #define GG82563_KMCR_MDIO_BUS_SPEED_SELECT_MASK 0x0400 | ||
2955 | #define GG82563_KMCR_MDIO_BUS_SPEED_SELECT 0x0400 /* 1=6.25MHz, 0=0.8MHz */ | ||
2956 | #define GG82563_KMCR_PASS_FALSE_CARRIER 0x0800 | ||
2957 | |||
2958 | /* Power Management Control Register (Page 193, Register 20) */ | ||
2959 | #define GG82563_PMCR_ENABLE_ELECTRICAL_IDLE 0x0001 /* 1=Enalbe SERDES Electrical Idle */ | ||
2960 | #define GG82563_PMCR_DISABLE_PORT 0x0002 /* 1=Disable Port */ | ||
2961 | #define GG82563_PMCR_DISABLE_SERDES 0x0004 /* 1=Disable SERDES */ | ||
2962 | #define GG82563_PMCR_REVERSE_AUTO_NEG 0x0008 /* 1=Enable Reverse Auto-Negotiation */ | ||
2963 | #define GG82563_PMCR_DISABLE_1000_NON_D0 0x0010 /* 1=Disable 1000Mbps Auto-Neg in non D0 */ | ||
2964 | #define GG82563_PMCR_DISABLE_1000 0x0020 /* 1=Disable 1000Mbps Auto-Neg Always */ | ||
2965 | #define GG82563_PMCR_REVERSE_AUTO_NEG_D0A 0x0040 /* 1=Enable D0a Reverse Auto-Negotiation */ | ||
2966 | #define GG82563_PMCR_FORCE_POWER_STATE 0x0080 /* 1=Force Power State */ | ||
2967 | #define GG82563_PMCR_PROGRAMMED_POWER_STATE_MASK 0x0300 | ||
2968 | #define GG82563_PMCR_PROGRAMMED_POWER_STATE_DR 0x0000 /* 00=Dr */ | ||
2969 | #define GG82563_PMCR_PROGRAMMED_POWER_STATE_D0U 0x0100 /* 01=D0u */ | ||
2970 | #define GG82563_PMCR_PROGRAMMED_POWER_STATE_D0A 0x0200 /* 10=D0a */ | ||
2971 | #define GG82563_PMCR_PROGRAMMED_POWER_STATE_D3 0x0300 /* 11=D3 */ | ||
2972 | |||
2973 | /* In-Band Control Register (Page 194, Register 18) */ | ||
2974 | #define GG82563_ICR_DIS_PADDING 0x0010 /* Disable Padding Use */ | ||
2975 | |||
2690 | 2976 | ||
2691 | /* Bit definitions for valid PHY IDs. */ | 2977 | /* Bit definitions for valid PHY IDs. */ |
2692 | /* I = Integrated | 2978 | /* I = Integrated |
@@ -2701,6 +2987,7 @@ struct e1000_host_command_info { | |||
2701 | #define M88E1011_I_REV_4 0x04 | 2987 | #define M88E1011_I_REV_4 0x04 |
2702 | #define M88E1111_I_PHY_ID 0x01410CC0 | 2988 | #define M88E1111_I_PHY_ID 0x01410CC0 |
2703 | #define L1LXT971A_PHY_ID 0x001378E0 | 2989 | #define L1LXT971A_PHY_ID 0x001378E0 |
2990 | #define GG82563_E_PHY_ID 0x01410CA0 | ||
2704 | 2991 | ||
2705 | /* Miscellaneous PHY bit definitions. */ | 2992 | /* Miscellaneous PHY bit definitions. */ |
2706 | #define PHY_PREAMBLE 0xFFFFFFFF | 2993 | #define PHY_PREAMBLE 0xFFFFFFFF |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index e80378a220d4..3acbffd5bde3 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -157,9 +157,12 @@ static struct pci_device_id e1000_pci_tbl[] = { | |||
157 | INTEL_E1000_ETHERNET_DEVICE(0x108A), | 157 | INTEL_E1000_ETHERNET_DEVICE(0x108A), |
158 | INTEL_E1000_ETHERNET_DEVICE(0x108B), | 158 | INTEL_E1000_ETHERNET_DEVICE(0x108B), |
159 | INTEL_E1000_ETHERNET_DEVICE(0x108C), | 159 | INTEL_E1000_ETHERNET_DEVICE(0x108C), |
160 | INTEL_E1000_ETHERNET_DEVICE(0x1096), | ||
161 | INTEL_E1000_ETHERNET_DEVICE(0x1098), | ||
160 | INTEL_E1000_ETHERNET_DEVICE(0x1099), | 162 | INTEL_E1000_ETHERNET_DEVICE(0x1099), |
161 | INTEL_E1000_ETHERNET_DEVICE(0x109A), | 163 | INTEL_E1000_ETHERNET_DEVICE(0x109A), |
162 | INTEL_E1000_ETHERNET_DEVICE(0x10B5), | 164 | INTEL_E1000_ETHERNET_DEVICE(0x10B5), |
165 | INTEL_E1000_ETHERNET_DEVICE(0x10B9), | ||
163 | /* required last entry */ | 166 | /* required last entry */ |
164 | {0,} | 167 | {0,} |
165 | }; | 168 | }; |
@@ -575,6 +578,7 @@ e1000_reset(struct e1000_adapter *adapter) | |||
575 | break; | 578 | break; |
576 | case e1000_82571: | 579 | case e1000_82571: |
577 | case e1000_82572: | 580 | case e1000_82572: |
581 | case e1000_80003es2lan: | ||
578 | pba = E1000_PBA_38K; | 582 | pba = E1000_PBA_38K; |
579 | break; | 583 | break; |
580 | case e1000_82573: | 584 | case e1000_82573: |
@@ -852,6 +856,7 @@ e1000_probe(struct pci_dev *pdev, | |||
852 | case e1000_82546: | 856 | case e1000_82546: |
853 | case e1000_82546_rev_3: | 857 | case e1000_82546_rev_3: |
854 | case e1000_82571: | 858 | case e1000_82571: |
859 | case e1000_80003es2lan: | ||
855 | if (E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_FUNC_1){ | 860 | if (E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_FUNC_1){ |
856 | e1000_read_eeprom(&adapter->hw, | 861 | e1000_read_eeprom(&adapter->hw, |
857 | EEPROM_INIT_CONTROL3_PORT_B, 1, &eeprom_data); | 862 | EEPROM_INIT_CONTROL3_PORT_B, 1, &eeprom_data); |