diff options
author | Auke Kok <auke\-jan.h.kok@intel.com> | 2006-11-01 11:47:30 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-02 00:11:58 -0500 |
commit | 90fb51358a264f2f7e0cabdca6fc229bbc40cd91 (patch) | |
tree | d473bdee8cc4588eb610c596e14effd329e86fe4 /drivers/net/e1000/e1000_ethtool.c | |
parent | a362bf57aa12835e4fa6af6960e5135b5626bc5b (diff) |
e1000: whitespace changes, comments, typos
Small whitespace changes, comment changes, typo fixes.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Diffstat (limited to 'drivers/net/e1000/e1000_ethtool.c')
-rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index c564adbd669b..82d2c78e1696 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -133,9 +133,7 @@ e1000_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) | |||
133 | 133 | ||
134 | if (hw->autoneg == 1) { | 134 | if (hw->autoneg == 1) { |
135 | ecmd->advertising |= ADVERTISED_Autoneg; | 135 | ecmd->advertising |= ADVERTISED_Autoneg; |
136 | |||
137 | /* the e1000 autoneg seems to match ethtool nicely */ | 136 | /* the e1000 autoneg seems to match ethtool nicely */ |
138 | |||
139 | ecmd->advertising |= hw->autoneg_advertised; | 137 | ecmd->advertising |= hw->autoneg_advertised; |
140 | } | 138 | } |
141 | 139 | ||
@@ -285,7 +283,7 @@ e1000_set_pauseparam(struct net_device *netdev, | |||
285 | e1000_reset(adapter); | 283 | e1000_reset(adapter); |
286 | } else | 284 | } else |
287 | retval = ((hw->media_type == e1000_media_type_fiber) ? | 285 | retval = ((hw->media_type == e1000_media_type_fiber) ? |
288 | e1000_setup_link(hw) : e1000_force_mac_fc(hw)); | 286 | e1000_setup_link(hw) : e1000_force_mac_fc(hw)); |
289 | 287 | ||
290 | clear_bit(__E1000_RESETTING, &adapter->flags); | 288 | clear_bit(__E1000_RESETTING, &adapter->flags); |
291 | return retval; | 289 | return retval; |
@@ -774,7 +772,7 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data) | |||
774 | /* The status register is Read Only, so a write should fail. | 772 | /* The status register is Read Only, so a write should fail. |
775 | * Some bits that get toggled are ignored. | 773 | * Some bits that get toggled are ignored. |
776 | */ | 774 | */ |
777 | switch (adapter->hw.mac_type) { | 775 | switch (adapter->hw.mac_type) { |
778 | /* there are several bits on newer hardware that are r/w */ | 776 | /* there are several bits on newer hardware that are r/w */ |
779 | case e1000_82571: | 777 | case e1000_82571: |
780 | case e1000_82572: | 778 | case e1000_82572: |
@@ -802,12 +800,14 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data) | |||
802 | } | 800 | } |
803 | /* restore previous status */ | 801 | /* restore previous status */ |
804 | E1000_WRITE_REG(&adapter->hw, STATUS, before); | 802 | E1000_WRITE_REG(&adapter->hw, STATUS, before); |
803 | |||
805 | if (adapter->hw.mac_type != e1000_ich8lan) { | 804 | if (adapter->hw.mac_type != e1000_ich8lan) { |
806 | REG_PATTERN_TEST(FCAL, 0xFFFFFFFF, 0xFFFFFFFF); | 805 | REG_PATTERN_TEST(FCAL, 0xFFFFFFFF, 0xFFFFFFFF); |
807 | REG_PATTERN_TEST(FCAH, 0x0000FFFF, 0xFFFFFFFF); | 806 | REG_PATTERN_TEST(FCAH, 0x0000FFFF, 0xFFFFFFFF); |
808 | REG_PATTERN_TEST(FCT, 0x0000FFFF, 0xFFFFFFFF); | 807 | REG_PATTERN_TEST(FCT, 0x0000FFFF, 0xFFFFFFFF); |
809 | REG_PATTERN_TEST(VET, 0x0000FFFF, 0xFFFFFFFF); | 808 | REG_PATTERN_TEST(VET, 0x0000FFFF, 0xFFFFFFFF); |
810 | } | 809 | } |
810 | |||
811 | REG_PATTERN_TEST(RDTR, 0x0000FFFF, 0xFFFFFFFF); | 811 | REG_PATTERN_TEST(RDTR, 0x0000FFFF, 0xFFFFFFFF); |
812 | REG_PATTERN_TEST(RDBAH, 0xFFFFFFFF, 0xFFFFFFFF); | 812 | REG_PATTERN_TEST(RDBAH, 0xFFFFFFFF, 0xFFFFFFFF); |
813 | REG_PATTERN_TEST(RDLEN, 0x000FFF80, 0x000FFFFF); | 813 | REG_PATTERN_TEST(RDLEN, 0x000FFF80, 0x000FFFFF); |
@@ -820,8 +820,9 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data) | |||
820 | REG_PATTERN_TEST(TDLEN, 0x000FFF80, 0x000FFFFF); | 820 | REG_PATTERN_TEST(TDLEN, 0x000FFF80, 0x000FFFFF); |
821 | 821 | ||
822 | REG_SET_AND_CHECK(RCTL, 0xFFFFFFFF, 0x00000000); | 822 | REG_SET_AND_CHECK(RCTL, 0xFFFFFFFF, 0x00000000); |
823 | |||
823 | before = (adapter->hw.mac_type == e1000_ich8lan ? | 824 | before = (adapter->hw.mac_type == e1000_ich8lan ? |
824 | 0x06C3B33E : 0x06DFB3FE); | 825 | 0x06C3B33E : 0x06DFB3FE); |
825 | REG_SET_AND_CHECK(RCTL, before, 0x003FFFFB); | 826 | REG_SET_AND_CHECK(RCTL, before, 0x003FFFFB); |
826 | REG_SET_AND_CHECK(TCTL, 0xFFFFFFFF, 0x00000000); | 827 | REG_SET_AND_CHECK(TCTL, 0xFFFFFFFF, 0x00000000); |
827 | 828 | ||
@@ -834,10 +835,10 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data) | |||
834 | REG_PATTERN_TEST(TDBAL, 0xFFFFFFF0, 0xFFFFFFFF); | 835 | REG_PATTERN_TEST(TDBAL, 0xFFFFFFF0, 0xFFFFFFFF); |
835 | REG_PATTERN_TEST(TIDV, 0x0000FFFF, 0x0000FFFF); | 836 | REG_PATTERN_TEST(TIDV, 0x0000FFFF, 0x0000FFFF); |
836 | value = (adapter->hw.mac_type == e1000_ich8lan ? | 837 | value = (adapter->hw.mac_type == e1000_ich8lan ? |
837 | E1000_RAR_ENTRIES_ICH8LAN : E1000_RAR_ENTRIES); | 838 | E1000_RAR_ENTRIES_ICH8LAN : E1000_RAR_ENTRIES); |
838 | for (i = 0; i < value; i++) { | 839 | for (i = 0; i < value; i++) { |
839 | REG_PATTERN_TEST(RA + (((i << 1) + 1) << 2), 0x8003FFFF, | 840 | REG_PATTERN_TEST(RA + (((i << 1) + 1) << 2), 0x8003FFFF, |
840 | 0xFFFFFFFF); | 841 | 0xFFFFFFFF); |
841 | } | 842 | } |
842 | 843 | ||
843 | } else { | 844 | } else { |
@@ -883,8 +884,7 @@ e1000_eeprom_test(struct e1000_adapter *adapter, uint64_t *data) | |||
883 | } | 884 | } |
884 | 885 | ||
885 | static irqreturn_t | 886 | static irqreturn_t |
886 | e1000_test_intr(int irq, | 887 | e1000_test_intr(int irq, void *data) |
887 | void *data) | ||
888 | { | 888 | { |
889 | struct net_device *netdev = (struct net_device *) data; | 889 | struct net_device *netdev = (struct net_device *) data; |
890 | struct e1000_adapter *adapter = netdev_priv(netdev); | 890 | struct e1000_adapter *adapter = netdev_priv(netdev); |
@@ -905,11 +905,11 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) | |||
905 | 905 | ||
906 | /* NOTE: we don't test MSI interrupts here, yet */ | 906 | /* NOTE: we don't test MSI interrupts here, yet */ |
907 | /* Hook up test interrupt handler just for this test */ | 907 | /* Hook up test interrupt handler just for this test */ |
908 | if (!request_irq(irq, &e1000_test_intr, IRQF_PROBE_SHARED, | 908 | if (!request_irq(irq, &e1000_test_intr, IRQF_PROBE_SHARED, netdev->name, |
909 | netdev->name, netdev)) | 909 | netdev)) |
910 | shared_int = FALSE; | 910 | shared_int = FALSE; |
911 | else if (request_irq(irq, &e1000_test_intr, IRQF_SHARED, | 911 | else if (request_irq(irq, &e1000_test_intr, IRQF_SHARED, |
912 | netdev->name, netdev)) { | 912 | netdev->name, netdev)) { |
913 | *data = 1; | 913 | *data = 1; |
914 | return -1; | 914 | return -1; |
915 | } | 915 | } |
@@ -925,6 +925,7 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) | |||
925 | 925 | ||
926 | if (adapter->hw.mac_type == e1000_ich8lan && i == 8) | 926 | if (adapter->hw.mac_type == e1000_ich8lan && i == 8) |
927 | continue; | 927 | continue; |
928 | |||
928 | /* Interrupt to test */ | 929 | /* Interrupt to test */ |
929 | mask = 1 << i; | 930 | mask = 1 << i; |
930 | 931 | ||
@@ -1674,7 +1675,7 @@ e1000_diag_test(struct net_device *netdev, | |||
1674 | if (e1000_link_test(adapter, &data[4])) | 1675 | if (e1000_link_test(adapter, &data[4])) |
1675 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1676 | eth_test->flags |= ETH_TEST_FL_FAILED; |
1676 | 1677 | ||
1677 | /* Offline tests aren't run; pass by default */ | 1678 | /* Online tests aren't run; pass by default */ |
1678 | data[0] = 0; | 1679 | data[0] = 0; |
1679 | data[1] = 0; | 1680 | data[1] = 0; |
1680 | data[2] = 0; | 1681 | data[2] = 0; |