diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2013-01-22 03:44:35 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-02-05 03:12:27 -0500 |
commit | 948f97aca6700ea96647719185d83a0b7c312fc1 (patch) | |
tree | e87b3905aea47626c538a06fae94da608f68846e | |
parent | d22631134d86b15689e6fea907aa97fffd88dbf6 (diff) |
e1000e: cosmetic move of #defines and prototypes to the new manage.h
Move #defines, function prototypes and data types which are applicable to
all/most devices supported by the driver but are specific to the
manageability component of each device to the new manage.h header file.
These #defines, function prototypes and data types can be used by other
files in the driver and moving them to the manageability-specific file
makes it clearer to which component they are applicable.
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/e1000.h | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/hw.h | 23 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/manage.c | 13 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/manage.h | 72 |
4 files changed, 73 insertions, 41 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h index 00c2e8467b52..fcc758138b8a 100644 --- a/drivers/net/ethernet/intel/e1000e/e1000.h +++ b/drivers/net/ethernet/intel/e1000e/e1000.h | |||
@@ -510,8 +510,6 @@ extern const struct e1000_info e1000_pch2_info; | |||
510 | extern const struct e1000_info e1000_pch_lpt_info; | 510 | extern const struct e1000_info e1000_pch_lpt_info; |
511 | extern const struct e1000_info e1000_es2_info; | 511 | extern const struct e1000_info e1000_es2_info; |
512 | 512 | ||
513 | extern bool e1000e_enable_mng_pass_thru(struct e1000_hw *hw); | ||
514 | |||
515 | extern void e1000e_ptp_init(struct e1000_adapter *adapter); | 513 | extern void e1000e_ptp_init(struct e1000_adapter *adapter); |
516 | extern void e1000e_ptp_remove(struct e1000_adapter *adapter); | 514 | extern void e1000e_ptp_remove(struct e1000_adapter *adapter); |
517 | 515 | ||
@@ -575,10 +573,6 @@ static inline s32 e1000_get_phy_info(struct e1000_hw *hw) | |||
575 | return hw->phy.ops.get_info(hw); | 573 | return hw->phy.ops.get_info(hw); |
576 | } | 574 | } |
577 | 575 | ||
578 | extern bool e1000e_check_mng_mode_generic(struct e1000_hw *hw); | ||
579 | extern bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw); | ||
580 | extern s32 e1000e_mng_write_dhcp_info(struct e1000_hw *hw, u8 *buffer, u16 length); | ||
581 | |||
582 | static inline u32 __er32(struct e1000_hw *hw, unsigned long reg) | 576 | static inline u32 __er32(struct e1000_hw *hw, unsigned long reg) |
583 | { | 577 | { |
584 | return readl(hw->hw_addr + reg); | 578 | return readl(hw->hw_addr + reg); |
diff --git a/drivers/net/ethernet/intel/e1000e/hw.h b/drivers/net/ethernet/intel/e1000e/hw.h index 97b8746a08cd..de876bd85cdf 100644 --- a/drivers/net/ethernet/intel/e1000e/hw.h +++ b/drivers/net/ethernet/intel/e1000e/hw.h | |||
@@ -244,28 +244,6 @@ enum e1e_registers { | |||
244 | E1000_RXUDP = 0x0B638, /* Timesync Rx UDP Port - RW */ | 244 | E1000_RXUDP = 0x0B638, /* Timesync Rx UDP Port - RW */ |
245 | }; | 245 | }; |
246 | 246 | ||
247 | /* manage.c */ | ||
248 | #define E1000_VFTA_ENTRY_SHIFT 5 | ||
249 | #define E1000_VFTA_ENTRY_MASK 0x7F | ||
250 | #define E1000_VFTA_ENTRY_BIT_SHIFT_MASK 0x1F | ||
251 | |||
252 | #define E1000_HICR_EN 0x01 /* Enable bit - RO */ | ||
253 | /* Driver sets this bit when done to put command in RAM */ | ||
254 | #define E1000_HICR_C 0x02 | ||
255 | #define E1000_HICR_FW_RESET_ENABLE 0x40 | ||
256 | #define E1000_HICR_FW_RESET 0x80 | ||
257 | |||
258 | #define E1000_FWSM_MODE_MASK 0xE | ||
259 | #define E1000_FWSM_MODE_SHIFT 1 | ||
260 | |||
261 | #define E1000_MNG_IAMT_MODE 0x3 | ||
262 | #define E1000_MNG_DHCP_COOKIE_LENGTH 0x10 | ||
263 | #define E1000_MNG_DHCP_COOKIE_OFFSET 0x6F0 | ||
264 | #define E1000_MNG_DHCP_COMMAND_TIMEOUT 10 | ||
265 | #define E1000_MNG_DHCP_TX_PAYLOAD_CMD 64 | ||
266 | #define E1000_MNG_DHCP_COOKIE_STATUS_PARSING 0x1 | ||
267 | #define E1000_MNG_DHCP_COOKIE_STATUS_VLAN 0x2 | ||
268 | |||
269 | #define E1000_DEV_ID_82571EB_COPPER 0x105E | 247 | #define E1000_DEV_ID_82571EB_COPPER 0x105E |
270 | #define E1000_DEV_ID_82571EB_FIBER 0x105F | 248 | #define E1000_DEV_ID_82571EB_FIBER 0x105F |
271 | #define E1000_DEV_ID_82571EB_SERDES 0x1060 | 249 | #define E1000_DEV_ID_82571EB_SERDES 0x1060 |
@@ -675,6 +653,7 @@ struct e1000_host_mng_command_info { | |||
675 | #include "mac.h" | 653 | #include "mac.h" |
676 | #include "phy.h" | 654 | #include "phy.h" |
677 | #include "nvm.h" | 655 | #include "nvm.h" |
656 | #include "manage.h" | ||
678 | 657 | ||
679 | /* Function pointers for the MAC. */ | 658 | /* Function pointers for the MAC. */ |
680 | struct e1000_mac_operations { | 659 | struct e1000_mac_operations { |
diff --git a/drivers/net/ethernet/intel/e1000e/manage.c b/drivers/net/ethernet/intel/e1000e/manage.c index 4dae0dbda837..e4b0f1ef92f6 100644 --- a/drivers/net/ethernet/intel/e1000e/manage.c +++ b/drivers/net/ethernet/intel/e1000e/manage.c | |||
@@ -28,19 +28,6 @@ | |||
28 | 28 | ||
29 | #include "e1000.h" | 29 | #include "e1000.h" |
30 | 30 | ||
31 | enum e1000_mng_mode { | ||
32 | e1000_mng_mode_none = 0, | ||
33 | e1000_mng_mode_asf, | ||
34 | e1000_mng_mode_pt, | ||
35 | e1000_mng_mode_ipmi, | ||
36 | e1000_mng_mode_host_if_only | ||
37 | }; | ||
38 | |||
39 | #define E1000_FACTPS_MNGCG 0x20000000 | ||
40 | |||
41 | /* Intel(R) Active Management Technology signature */ | ||
42 | #define E1000_IAMT_SIGNATURE 0x544D4149 | ||
43 | |||
44 | /** | 31 | /** |
45 | * e1000_calculate_checksum - Calculate checksum for buffer | 32 | * e1000_calculate_checksum - Calculate checksum for buffer |
46 | * @buffer: pointer to EEPROM | 33 | * @buffer: pointer to EEPROM |
diff --git a/drivers/net/ethernet/intel/e1000e/manage.h b/drivers/net/ethernet/intel/e1000e/manage.h new file mode 100644 index 000000000000..326897c29ea8 --- /dev/null +++ b/drivers/net/ethernet/intel/e1000e/manage.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /******************************************************************************* | ||
2 | |||
3 | Intel PRO/1000 Linux driver | ||
4 | Copyright(c) 1999 - 2013 Intel Corporation. | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify it | ||
7 | under the terms and conditions of the GNU General Public License, | ||
8 | version 2, as published by the Free Software Foundation. | ||
9 | |||
10 | This program is distributed in the hope it will be useful, but WITHOUT | ||
11 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
13 | more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License along with | ||
16 | this program; if not, write to the Free Software Foundation, Inc., | ||
17 | 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | |||
19 | The full GNU General Public License is included in this distribution in | ||
20 | the file called "COPYING". | ||
21 | |||
22 | Contact Information: | ||
23 | Linux NICS <linux.nics@intel.com> | ||
24 | e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> | ||
25 | Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
26 | |||
27 | *******************************************************************************/ | ||
28 | |||
29 | #ifndef _E1000E_MANAGE_H_ | ||
30 | #define _E1000E_MANAGE_H_ | ||
31 | |||
32 | bool e1000e_check_mng_mode_generic(struct e1000_hw *hw); | ||
33 | bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw); | ||
34 | s32 e1000e_mng_write_dhcp_info(struct e1000_hw *hw, u8 *buffer, u16 length); | ||
35 | bool e1000e_enable_mng_pass_thru(struct e1000_hw *hw); | ||
36 | |||
37 | enum e1000_mng_mode { | ||
38 | e1000_mng_mode_none = 0, | ||
39 | e1000_mng_mode_asf, | ||
40 | e1000_mng_mode_pt, | ||
41 | e1000_mng_mode_ipmi, | ||
42 | e1000_mng_mode_host_if_only | ||
43 | }; | ||
44 | |||
45 | #define E1000_FACTPS_MNGCG 0x20000000 | ||
46 | |||
47 | #define E1000_FWSM_MODE_MASK 0xE | ||
48 | #define E1000_FWSM_MODE_SHIFT 1 | ||
49 | |||
50 | #define E1000_MNG_IAMT_MODE 0x3 | ||
51 | #define E1000_MNG_DHCP_COOKIE_LENGTH 0x10 | ||
52 | #define E1000_MNG_DHCP_COOKIE_OFFSET 0x6F0 | ||
53 | #define E1000_MNG_DHCP_COMMAND_TIMEOUT 10 | ||
54 | #define E1000_MNG_DHCP_TX_PAYLOAD_CMD 64 | ||
55 | #define E1000_MNG_DHCP_COOKIE_STATUS_PARSING 0x1 | ||
56 | #define E1000_MNG_DHCP_COOKIE_STATUS_VLAN 0x2 | ||
57 | |||
58 | #define E1000_VFTA_ENTRY_SHIFT 5 | ||
59 | #define E1000_VFTA_ENTRY_MASK 0x7F | ||
60 | #define E1000_VFTA_ENTRY_BIT_SHIFT_MASK 0x1F | ||
61 | |||
62 | #define E1000_HICR_EN 0x01 /* Enable bit - RO */ | ||
63 | /* Driver sets this bit when done to put command in RAM */ | ||
64 | #define E1000_HICR_C 0x02 | ||
65 | #define E1000_HICR_SV 0x04 /* Status Validity */ | ||
66 | #define E1000_HICR_FW_RESET_ENABLE 0x40 | ||
67 | #define E1000_HICR_FW_RESET 0x80 | ||
68 | |||
69 | /* Intel(R) Active Management Technology signature */ | ||
70 | #define E1000_IAMT_SIGNATURE 0x544D4149 | ||
71 | |||
72 | #endif | ||