aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/ethtool.c
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2009-06-02 07:29:18 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-03 05:46:34 -0400
commita4f58f5455ba0efda36fb33c37074922d1527a10 (patch)
tree98aa6d14824b7c1b7907e703abedd80219e0abda /drivers/net/e1000e/ethtool.c
parent2adc55c959940fc680074392eddbd5585a76f3d9 (diff)
e1000e: add support for 82577/82578 GbE LOM parts
This patch provides support for the next generation Intel desktop and mobile gigabit ethernet LOM adapters. These adapters are the follow-on parts to the LOMs tied to the prior ICH chipsets and are comprised of a MAC in the PCH chipset and an external PHY (82577 for mobile and 82578 for desktop versions). New features consist of PHY wakeup to save power by completely turning off the MAC while in Sx state, and 4K jumbo frames. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e/ethtool.c')
-rw-r--r--drivers/net/e1000e/ethtool.c37
1 files changed, 23 insertions, 14 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index 4d25ede88369..3d6435617527 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -776,6 +776,7 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data)
776 u32 after; 776 u32 after;
777 u32 i; 777 u32 i;
778 u32 toggle; 778 u32 toggle;
779 u32 mask;
779 780
780 /* 781 /*
781 * The status register is Read Only, so a write should fail. 782 * The status register is Read Only, so a write should fail.
@@ -788,17 +789,9 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data)
788 case e1000_80003es2lan: 789 case e1000_80003es2lan:
789 toggle = 0x7FFFF3FF; 790 toggle = 0x7FFFF3FF;
790 break; 791 break;
791 case e1000_82573: 792 default:
792 case e1000_82574:
793 case e1000_82583:
794 case e1000_ich8lan:
795 case e1000_ich9lan:
796 case e1000_ich10lan:
797 toggle = 0x7FFFF033; 793 toggle = 0x7FFFF033;
798 break; 794 break;
799 default:
800 toggle = 0xFFFFF833;
801 break;
802 } 795 }
803 796
804 before = er32(STATUS); 797 before = er32(STATUS);
@@ -844,11 +837,18 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data)
844 REG_PATTERN_TEST(E1000_TXCW, 0xC000FFFF, 0x0000FFFF); 837 REG_PATTERN_TEST(E1000_TXCW, 0xC000FFFF, 0x0000FFFF);
845 REG_PATTERN_TEST(E1000_TDBAL, 0xFFFFFFF0, 0xFFFFFFFF); 838 REG_PATTERN_TEST(E1000_TDBAL, 0xFFFFFFF0, 0xFFFFFFFF);
846 REG_PATTERN_TEST(E1000_TIDV, 0x0000FFFF, 0x0000FFFF); 839 REG_PATTERN_TEST(E1000_TIDV, 0x0000FFFF, 0x0000FFFF);
840 mask = 0x8003FFFF;
841 switch (mac->type) {
842 case e1000_ich10lan:
843 case e1000_pchlan:
844 mask |= (1 << 18);
845 break;
846 default:
847 break;
848 }
847 for (i = 0; i < mac->rar_entry_count; i++) 849 for (i = 0; i < mac->rar_entry_count; i++)
848 REG_PATTERN_TEST_ARRAY(E1000_RA, ((i << 1) + 1), 850 REG_PATTERN_TEST_ARRAY(E1000_RA, ((i << 1) + 1),
849 ((mac->type == e1000_ich10lan) ? 851 mask, 0xFFFFFFFF);
850 0x8007FFFF : 0x8003FFFF),
851 0xFFFFFFFF);
852 852
853 for (i = 0; i < mac->mta_reg_count; i++) 853 for (i = 0; i < mac->mta_reg_count; i++)
854 REG_PATTERN_TEST_ARRAY(E1000_MTA, i, 0xFFFFFFFF, 0xFFFFFFFF); 854 REG_PATTERN_TEST_ARRAY(E1000_MTA, i, 0xFFFFFFFF, 0xFFFFFFFF);
@@ -1786,15 +1786,22 @@ static int e1000_set_wol(struct net_device *netdev,
1786/* bit defines for adapter->led_status */ 1786/* bit defines for adapter->led_status */
1787#define E1000_LED_ON 0 1787#define E1000_LED_ON 0
1788 1788
1789static void e1000_led_blink_callback(unsigned long data) 1789static void e1000e_led_blink_task(struct work_struct *work)
1790{ 1790{
1791 struct e1000_adapter *adapter = (struct e1000_adapter *) data; 1791 struct e1000_adapter *adapter = container_of(work,
1792 struct e1000_adapter, led_blink_task);
1792 1793
1793 if (test_and_change_bit(E1000_LED_ON, &adapter->led_status)) 1794 if (test_and_change_bit(E1000_LED_ON, &adapter->led_status))
1794 adapter->hw.mac.ops.led_off(&adapter->hw); 1795 adapter->hw.mac.ops.led_off(&adapter->hw);
1795 else 1796 else
1796 adapter->hw.mac.ops.led_on(&adapter->hw); 1797 adapter->hw.mac.ops.led_on(&adapter->hw);
1798}
1799
1800static void e1000_led_blink_callback(unsigned long data)
1801{
1802 struct e1000_adapter *adapter = (struct e1000_adapter *) data;
1797 1803
1804 schedule_work(&adapter->led_blink_task);
1798 mod_timer(&adapter->blink_timer, jiffies + E1000_ID_INTERVAL); 1805 mod_timer(&adapter->blink_timer, jiffies + E1000_ID_INTERVAL);
1799} 1806}
1800 1807
@@ -1807,7 +1814,9 @@ static int e1000_phys_id(struct net_device *netdev, u32 data)
1807 data = INT_MAX; 1814 data = INT_MAX;
1808 1815
1809 if ((hw->phy.type == e1000_phy_ife) || 1816 if ((hw->phy.type == e1000_phy_ife) ||
1817 (hw->mac.type == e1000_pchlan) ||
1810 (hw->mac.type == e1000_82574)) { 1818 (hw->mac.type == e1000_82574)) {
1819 INIT_WORK(&adapter->led_blink_task, e1000e_led_blink_task);
1811 if (!adapter->blink_timer.function) { 1820 if (!adapter->blink_timer.function) {
1812 init_timer(&adapter->blink_timer); 1821 init_timer(&adapter->blink_timer);
1813 adapter->blink_timer.function = 1822 adapter->blink_timer.function =