diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2013-02-19 23:06:43 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-03-08 04:53:29 -0500 |
commit | 3ffcf2cb1e1b68eb48011158a023ee1d0bb4b1fc (patch) | |
tree | 3ba564ba06eca932cc36e8aec572b80969eacf01 | |
parent | bbf441271b3c0e631f3687fef398c8a47fe0e3cd (diff) |
e1000e: cleanup - move defines to appropriate header file
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/82571.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/defines.h | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ethtool.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/netdev.c | 5 |
4 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/82571.h b/drivers/net/ethernet/intel/e1000e/82571.h index 85cb1a3b7cd4..08e24dc3dc0e 100644 --- a/drivers/net/ethernet/intel/e1000e/82571.h +++ b/drivers/net/ethernet/intel/e1000e/82571.h | |||
@@ -44,6 +44,8 @@ | |||
44 | #define E1000_EIAC_82574 0x000DC /* Ext. Interrupt Auto Clear - RW */ | 44 | #define E1000_EIAC_82574 0x000DC /* Ext. Interrupt Auto Clear - RW */ |
45 | #define E1000_EIAC_MASK_82574 0x01F00000 | 45 | #define E1000_EIAC_MASK_82574 0x01F00000 |
46 | 46 | ||
47 | #define E1000_IVAR_INT_ALLOC_VALID 0x8 | ||
48 | |||
47 | /* Manageability Operation Mode mask */ | 49 | /* Manageability Operation Mode mask */ |
48 | #define E1000_NVM_INIT_CTRL2_MNGM 0x6000 | 50 | #define E1000_NVM_INIT_CTRL2_MNGM 0x6000 |
49 | 51 | ||
diff --git a/drivers/net/ethernet/intel/e1000e/defines.h b/drivers/net/ethernet/intel/e1000e/defines.h index e6fe09096c34..b7c664f2a95f 100644 --- a/drivers/net/ethernet/intel/e1000e/defines.h +++ b/drivers/net/ethernet/intel/e1000e/defines.h | |||
@@ -216,6 +216,8 @@ | |||
216 | #define E1000_CTRL_MEHE 0x00080000 /* Memory Error Handling Enable */ | 216 | #define E1000_CTRL_MEHE 0x00080000 /* Memory Error Handling Enable */ |
217 | #define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */ | 217 | #define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */ |
218 | #define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */ | 218 | #define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */ |
219 | #define E1000_CTRL_ADVD3WUC 0x00100000 /* D3 WUC */ | ||
220 | #define E1000_CTRL_EN_PHY_PWR_MGMT 0x00200000 /* PHY PM enable */ | ||
219 | #define E1000_CTRL_SWDPIO0 0x00400000 /* SWDPIN 0 Input or output */ | 221 | #define E1000_CTRL_SWDPIO0 0x00400000 /* SWDPIN 0 Input or output */ |
220 | #define E1000_CTRL_RST 0x04000000 /* Global reset */ | 222 | #define E1000_CTRL_RST 0x04000000 /* Global reset */ |
221 | #define E1000_CTRL_RFCE 0x08000000 /* Receive Flow Control enable */ | 223 | #define E1000_CTRL_RFCE 0x08000000 /* Receive Flow Control enable */ |
@@ -310,6 +312,7 @@ | |||
310 | 312 | ||
311 | /* SerDes Control */ | 313 | /* SerDes Control */ |
312 | #define E1000_SCTL_DISABLE_SERDES_LOOPBACK 0x0400 | 314 | #define E1000_SCTL_DISABLE_SERDES_LOOPBACK 0x0400 |
315 | #define E1000_SCTL_ENABLE_SERDES_LOOPBACK 0x0410 | ||
313 | 316 | ||
314 | /* Receive Checksum Control */ | 317 | /* Receive Checksum Control */ |
315 | #define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */ | 318 | #define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */ |
diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c index 23d5d9051113..8f5832c606e1 100644 --- a/drivers/net/ethernet/intel/e1000e/ethtool.c +++ b/drivers/net/ethernet/intel/e1000e/ethtool.c | |||
@@ -1432,8 +1432,7 @@ static int e1000_set_82571_fiber_loopback(struct e1000_adapter *adapter) | |||
1432 | /* special write to serdes control register to enable SerDes analog | 1432 | /* special write to serdes control register to enable SerDes analog |
1433 | * loopback | 1433 | * loopback |
1434 | */ | 1434 | */ |
1435 | #define E1000_SERDES_LB_ON 0x410 | 1435 | ew32(SCTL, E1000_SCTL_ENABLE_SERDES_LOOPBACK); |
1436 | ew32(SCTL, E1000_SERDES_LB_ON); | ||
1437 | e1e_flush(); | 1436 | e1e_flush(); |
1438 | usleep_range(10000, 20000); | 1437 | usleep_range(10000, 20000); |
1439 | 1438 | ||
@@ -1527,8 +1526,7 @@ static void e1000_loopback_cleanup(struct e1000_adapter *adapter) | |||
1527 | case e1000_82572: | 1526 | case e1000_82572: |
1528 | if (hw->phy.media_type == e1000_media_type_fiber || | 1527 | if (hw->phy.media_type == e1000_media_type_fiber || |
1529 | hw->phy.media_type == e1000_media_type_internal_serdes) { | 1528 | hw->phy.media_type == e1000_media_type_internal_serdes) { |
1530 | #define E1000_SERDES_LB_OFF 0x400 | 1529 | ew32(SCTL, E1000_SCTL_DISABLE_SERDES_LOOPBACK); |
1531 | ew32(SCTL, E1000_SERDES_LB_OFF); | ||
1532 | e1e_flush(); | 1530 | e1e_flush(); |
1533 | usleep_range(10000, 20000); | 1531 | usleep_range(10000, 20000); |
1534 | break; | 1532 | break; |
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index b085ce1d4546..b4eab18e1c16 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | |||
@@ -1957,7 +1957,6 @@ static void e1000_configure_msix(struct e1000_adapter *adapter) | |||
1957 | ew32(RFCTL, rfctl); | 1957 | ew32(RFCTL, rfctl); |
1958 | } | 1958 | } |
1959 | 1959 | ||
1960 | #define E1000_IVAR_INT_ALLOC_VALID 0x8 | ||
1961 | /* Configure Rx vector */ | 1960 | /* Configure Rx vector */ |
1962 | rx_ring->ims_val = E1000_IMS_RXQ0; | 1961 | rx_ring->ims_val = E1000_IMS_RXQ0; |
1963 | adapter->eiac_mask |= rx_ring->ims_val; | 1962 | adapter->eiac_mask |= rx_ring->ims_val; |
@@ -5911,10 +5910,6 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake, | |||
5911 | } | 5910 | } |
5912 | 5911 | ||
5913 | ctrl = er32(CTRL); | 5912 | ctrl = er32(CTRL); |
5914 | /* advertise wake from D3Cold */ | ||
5915 | #define E1000_CTRL_ADVD3WUC 0x00100000 | ||
5916 | /* phy power management enable */ | ||
5917 | #define E1000_CTRL_EN_PHY_PWR_MGMT 0x00200000 | ||
5918 | ctrl |= E1000_CTRL_ADVD3WUC; | 5913 | ctrl |= E1000_CTRL_ADVD3WUC; |
5919 | if (!(adapter->flags2 & FLAG2_HAS_PHY_WAKEUP)) | 5914 | if (!(adapter->flags2 & FLAG2_HAS_PHY_WAKEUP)) |
5920 | ctrl |= E1000_CTRL_EN_PHY_PWR_MGMT; | 5915 | ctrl |= E1000_CTRL_EN_PHY_PWR_MGMT; |