diff options
author | Alan Cox <alan@linux.intel.com> | 2010-01-18 10:34:24 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 19:42:51 -0500 |
commit | 69ea5fcb5e33b785f3f554db0ab0c2694da3f22f (patch) | |
tree | 12376acfb1e687dfa77b74147fd84a1756a24fc3 | |
parent | ec7d9f61012b9ab902810d63c4b5a7c796e4ceed (diff) |
Staging: et131x: Collapse all the function definitions into one place
We have lots of tiny files right now that could be one
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
23 files changed, 242 insertions, 777 deletions
diff --git a/drivers/staging/et131x/et1310_eeprom.c b/drivers/staging/et131x/et1310_eeprom.c index bcca1f86f51..3ca253672ba 100644 --- a/drivers/staging/et131x/et1310_eeprom.c +++ b/drivers/staging/et131x/et1310_eeprom.c | |||
@@ -84,17 +84,42 @@ | |||
84 | #include <linux/ioport.h> | 84 | #include <linux/ioport.h> |
85 | 85 | ||
86 | #include "et1310_phy.h" | 86 | #include "et1310_phy.h" |
87 | #include "et1310_pm.h" | ||
88 | #include "et1310_jagcore.h" | ||
89 | #include "et1310_eeprom.h" | ||
90 | |||
91 | #include "et131x_adapter.h" | 87 | #include "et131x_adapter.h" |
92 | #include "et131x_initpci.h" | 88 | #include "et131x.h" |
93 | #include "et131x_isr.h" | ||
94 | |||
95 | #include "et1310_tx.h" | ||
96 | 89 | ||
90 | /* | ||
91 | * EEPROM Defines | ||
92 | */ | ||
97 | 93 | ||
94 | /* LBCIF Register Groups (addressed via 32-bit offsets) */ | ||
95 | #define LBCIF_DWORD0_GROUP 0xAC | ||
96 | #define LBCIF_DWORD1_GROUP 0xB0 | ||
97 | |||
98 | /* LBCIF Registers (addressed via 8-bit offsets) */ | ||
99 | #define LBCIF_ADDRESS_REGISTER 0xAC | ||
100 | #define LBCIF_DATA_REGISTER 0xB0 | ||
101 | #define LBCIF_CONTROL_REGISTER 0xB1 | ||
102 | #define LBCIF_STATUS_REGISTER 0xB2 | ||
103 | |||
104 | /* LBCIF Control Register Bits */ | ||
105 | #define LBCIF_CONTROL_SEQUENTIAL_READ 0x01 | ||
106 | #define LBCIF_CONTROL_PAGE_WRITE 0x02 | ||
107 | #define LBCIF_CONTROL_EEPROM_RELOAD 0x08 | ||
108 | #define LBCIF_CONTROL_TWO_BYTE_ADDR 0x20 | ||
109 | #define LBCIF_CONTROL_I2C_WRITE 0x40 | ||
110 | #define LBCIF_CONTROL_LBCIF_ENABLE 0x80 | ||
111 | |||
112 | /* LBCIF Status Register Bits */ | ||
113 | #define LBCIF_STATUS_PHY_QUEUE_AVAIL 0x01 | ||
114 | #define LBCIF_STATUS_I2C_IDLE 0x02 | ||
115 | #define LBCIF_STATUS_ACK_ERROR 0x04 | ||
116 | #define LBCIF_STATUS_GENERAL_ERROR 0x08 | ||
117 | #define LBCIF_STATUS_CHECKSUM_ERROR 0x40 | ||
118 | #define LBCIF_STATUS_EEPROM_PRESENT 0x80 | ||
119 | |||
120 | /* Miscellaneous Constraints */ | ||
121 | #define MAX_NUM_REGISTER_POLLS 1000 | ||
122 | #define MAX_NUM_WRITE_RETRIES 2 | ||
98 | 123 | ||
99 | static int eeprom_wait_ready(struct pci_dev *pdev, u32 *status) | 124 | static int eeprom_wait_ready(struct pci_dev *pdev, u32 *status) |
100 | { | 125 | { |
diff --git a/drivers/staging/et131x/et1310_eeprom.h b/drivers/staging/et131x/et1310_eeprom.h deleted file mode 100644 index 6a6c6a632a8..00000000000 --- a/drivers/staging/et131x/et1310_eeprom.h +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | /* | ||
2 | * Agere Systems Inc. | ||
3 | * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs | ||
4 | * | ||
5 | * Copyright © 2005 Agere Systems Inc. | ||
6 | * All rights reserved. | ||
7 | * http://www.agere.com | ||
8 | * | ||
9 | *------------------------------------------------------------------------------ | ||
10 | * | ||
11 | * et1310_eeprom.h - Defines, structs, enums, prototypes, etc. used for EEPROM | ||
12 | * access routines | ||
13 | * | ||
14 | *------------------------------------------------------------------------------ | ||
15 | * | ||
16 | * SOFTWARE LICENSE | ||
17 | * | ||
18 | * This software is provided subject to the following terms and conditions, | ||
19 | * which you should read carefully before using the software. Using this | ||
20 | * software indicates your acceptance of these terms and conditions. If you do | ||
21 | * not agree with these terms and conditions, do not use the software. | ||
22 | * | ||
23 | * Copyright © 2005 Agere Systems Inc. | ||
24 | * All rights reserved. | ||
25 | * | ||
26 | * Redistribution and use in source or binary forms, with or without | ||
27 | * modifications, are permitted provided that the following conditions are met: | ||
28 | * | ||
29 | * . Redistributions of source code must retain the above copyright notice, this | ||
30 | * list of conditions and the following Disclaimer as comments in the code as | ||
31 | * well as in the documentation and/or other materials provided with the | ||
32 | * distribution. | ||
33 | * | ||
34 | * . Redistributions in binary form must reproduce the above copyright notice, | ||
35 | * this list of conditions and the following Disclaimer in the documentation | ||
36 | * and/or other materials provided with the distribution. | ||
37 | * | ||
38 | * . Neither the name of Agere Systems Inc. nor the names of the contributors | ||
39 | * may be used to endorse or promote products derived from this software | ||
40 | * without specific prior written permission. | ||
41 | * | ||
42 | * Disclaimer | ||
43 | * | ||
44 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
45 | * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF | ||
46 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY | ||
47 | * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN | ||
48 | * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY | ||
49 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
50 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
51 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
52 | * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT | ||
53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
54 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
55 | * DAMAGE. | ||
56 | * | ||
57 | */ | ||
58 | |||
59 | #ifndef __ET1310_EEPROM_H__ | ||
60 | #define __ET1310_EEPROM_H__ | ||
61 | |||
62 | #include "et1310_address_map.h" | ||
63 | |||
64 | /* | ||
65 | * EEPROM Defines | ||
66 | */ | ||
67 | |||
68 | /* LBCIF Register Groups (addressed via 32-bit offsets) */ | ||
69 | #define LBCIF_DWORD0_GROUP 0xAC | ||
70 | #define LBCIF_DWORD1_GROUP 0xB0 | ||
71 | |||
72 | /* LBCIF Registers (addressed via 8-bit offsets) */ | ||
73 | #define LBCIF_ADDRESS_REGISTER 0xAC | ||
74 | #define LBCIF_DATA_REGISTER 0xB0 | ||
75 | #define LBCIF_CONTROL_REGISTER 0xB1 | ||
76 | #define LBCIF_STATUS_REGISTER 0xB2 | ||
77 | |||
78 | /* LBCIF Control Register Bits */ | ||
79 | #define LBCIF_CONTROL_SEQUENTIAL_READ 0x01 | ||
80 | #define LBCIF_CONTROL_PAGE_WRITE 0x02 | ||
81 | #define LBCIF_CONTROL_EEPROM_RELOAD 0x08 | ||
82 | #define LBCIF_CONTROL_TWO_BYTE_ADDR 0x20 | ||
83 | #define LBCIF_CONTROL_I2C_WRITE 0x40 | ||
84 | #define LBCIF_CONTROL_LBCIF_ENABLE 0x80 | ||
85 | |||
86 | /* LBCIF Status Register Bits */ | ||
87 | #define LBCIF_STATUS_PHY_QUEUE_AVAIL 0x01 | ||
88 | #define LBCIF_STATUS_I2C_IDLE 0x02 | ||
89 | #define LBCIF_STATUS_ACK_ERROR 0x04 | ||
90 | #define LBCIF_STATUS_GENERAL_ERROR 0x08 | ||
91 | #define LBCIF_STATUS_CHECKSUM_ERROR 0x40 | ||
92 | #define LBCIF_STATUS_EEPROM_PRESENT 0x80 | ||
93 | |||
94 | /* Miscellaneous Constraints */ | ||
95 | #define MAX_NUM_REGISTER_POLLS 1000 | ||
96 | #define MAX_NUM_WRITE_RETRIES 2 | ||
97 | |||
98 | /* Forward declaration of the private adapter structure */ | ||
99 | struct et131x_adapter; | ||
100 | |||
101 | int et131x_init_eeprom(struct et131x_adapter *etdev); | ||
102 | |||
103 | #endif /* _ET1310_EEPROM_H_ */ | ||
diff --git a/drivers/staging/et131x/et1310_jagcore.h b/drivers/staging/et131x/et1310_jagcore.h deleted file mode 100644 index 0807a01d88a..00000000000 --- a/drivers/staging/et131x/et1310_jagcore.h +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | /* | ||
2 | * Agere Systems Inc. | ||
3 | * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs | ||
4 | * | ||
5 | * Copyright © 2005 Agere Systems Inc. | ||
6 | * All rights reserved. | ||
7 | * http://www.agere.com | ||
8 | * | ||
9 | *------------------------------------------------------------------------------ | ||
10 | * | ||
11 | * et1310_jagcore.h - Defines, structs, enums, prototypes, etc. pertaining to | ||
12 | * the JAGCore | ||
13 | * | ||
14 | *------------------------------------------------------------------------------ | ||
15 | * | ||
16 | * SOFTWARE LICENSE | ||
17 | * | ||
18 | * This software is provided subject to the following terms and conditions, | ||
19 | * which you should read carefully before using the software. Using this | ||
20 | * software indicates your acceptance of these terms and conditions. If you do | ||
21 | * not agree with these terms and conditions, do not use the software. | ||
22 | * | ||
23 | * Copyright © 2005 Agere Systems Inc. | ||
24 | * All rights reserved. | ||
25 | * | ||
26 | * Redistribution and use in source or binary forms, with or without | ||
27 | * modifications, are permitted provided that the following conditions are met: | ||
28 | * | ||
29 | * . Redistributions of source code must retain the above copyright notice, this | ||
30 | * list of conditions and the following Disclaimer as comments in the code as | ||
31 | * well as in the documentation and/or other materials provided with the | ||
32 | * distribution. | ||
33 | * | ||
34 | * . Redistributions in binary form must reproduce the above copyright notice, | ||
35 | * this list of conditions and the following Disclaimer in the documentation | ||
36 | * and/or other materials provided with the distribution. | ||
37 | * | ||
38 | * . Neither the name of Agere Systems Inc. nor the names of the contributors | ||
39 | * may be used to endorse or promote products derived from this software | ||
40 | * without specific prior written permission. | ||
41 | * | ||
42 | * Disclaimer | ||
43 | * | ||
44 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
45 | * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF | ||
46 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY | ||
47 | * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN | ||
48 | * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY | ||
49 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
50 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
51 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
52 | * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT | ||
53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
54 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
55 | * DAMAGE. | ||
56 | * | ||
57 | */ | ||
58 | |||
59 | #ifndef __ET1310_JAGCORE_H__ | ||
60 | #define __ET1310_JAGCORE_H__ | ||
61 | |||
62 | #include "et1310_address_map.h" | ||
63 | |||
64 | |||
65 | #define INTERNAL_MEM_SIZE 0x400 /* 1024 of internal memory */ | ||
66 | #define INTERNAL_MEM_RX_OFFSET 0x1FF /* 50% Tx, 50% Rx */ | ||
67 | |||
68 | /* | ||
69 | * For interrupts, normal running is: | ||
70 | * rxdma_xfr_done, phy_interrupt, mac_stat_interrupt, | ||
71 | * watchdog_interrupt & txdma_xfer_done | ||
72 | * | ||
73 | * In both cases, when flow control is enabled for either Tx or bi-direction, | ||
74 | * we additional enable rx_fbr0_low and rx_fbr1_low, so we know when the | ||
75 | * buffer rings are running low. | ||
76 | */ | ||
77 | #define INT_MASK_DISABLE 0xffffffff | ||
78 | |||
79 | /* NOTE: Masking out MAC_STAT Interrupt for now... | ||
80 | * #define INT_MASK_ENABLE 0xfff6bf17 | ||
81 | * #define INT_MASK_ENABLE_NO_FLOW 0xfff6bfd7 | ||
82 | */ | ||
83 | #define INT_MASK_ENABLE 0xfffebf17 | ||
84 | #define INT_MASK_ENABLE_NO_FLOW 0xfffebfd7 | ||
85 | |||
86 | /* Forward declaration of the private adapter structure */ | ||
87 | struct et131x_adapter; | ||
88 | |||
89 | void ConfigGlobalRegs(struct et131x_adapter *pAdapter); | ||
90 | void ConfigMMCRegs(struct et131x_adapter *pAdapter); | ||
91 | void et131x_enable_interrupts(struct et131x_adapter *adapter); | ||
92 | void et131x_disable_interrupts(struct et131x_adapter *adapter); | ||
93 | |||
94 | #endif /* __ET1310_JAGCORE_H__ */ | ||
diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index a02bce0c280..6515f50a95d 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c | |||
@@ -85,12 +85,19 @@ | |||
85 | #include <linux/crc32.h> | 85 | #include <linux/crc32.h> |
86 | 86 | ||
87 | #include "et1310_phy.h" | 87 | #include "et1310_phy.h" |
88 | #include "et1310_pm.h" | ||
89 | #include "et1310_jagcore.h" | ||
90 | #include "et1310_mac.h" | ||
91 | |||
92 | #include "et131x_adapter.h" | 88 | #include "et131x_adapter.h" |
93 | #include "et131x_initpci.h" | 89 | #include "et131x.h" |
90 | |||
91 | |||
92 | #define COUNTER_WRAP_28_BIT 0x10000000 | ||
93 | #define COUNTER_WRAP_22_BIT 0x400000 | ||
94 | #define COUNTER_WRAP_16_BIT 0x10000 | ||
95 | #define COUNTER_WRAP_12_BIT 0x1000 | ||
96 | |||
97 | #define COUNTER_MASK_28_BIT (COUNTER_WRAP_28_BIT - 1) | ||
98 | #define COUNTER_MASK_22_BIT (COUNTER_WRAP_22_BIT - 1) | ||
99 | #define COUNTER_MASK_16_BIT (COUNTER_WRAP_16_BIT - 1) | ||
100 | #define COUNTER_MASK_12_BIT (COUNTER_WRAP_12_BIT - 1) | ||
94 | 101 | ||
95 | /** | 102 | /** |
96 | * ConfigMacRegs1 - Initialize the first part of MAC regs | 103 | * ConfigMacRegs1 - Initialize the first part of MAC regs |
diff --git a/drivers/staging/et131x/et1310_mac.h b/drivers/staging/et131x/et1310_mac.h deleted file mode 100644 index 2c385959453..00000000000 --- a/drivers/staging/et131x/et1310_mac.h +++ /dev/null | |||
@@ -1,93 +0,0 @@ | |||
1 | /* | ||
2 | * Agere Systems Inc. | ||
3 | * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs | ||
4 | * | ||
5 | * Copyright © 2005 Agere Systems Inc. | ||
6 | * All rights reserved. | ||
7 | * http://www.agere.com | ||
8 | * | ||
9 | *------------------------------------------------------------------------------ | ||
10 | * | ||
11 | * et1310_mac.h - Defines, structs, enums, prototypes, etc. pertaining to the | ||
12 | * MAC. | ||
13 | * | ||
14 | *------------------------------------------------------------------------------ | ||
15 | * | ||
16 | * SOFTWARE LICENSE | ||
17 | * | ||
18 | * This software is provided subject to the following terms and conditions, | ||
19 | * which you should read carefully before using the software. Using this | ||
20 | * software indicates your acceptance of these terms and conditions. If you do | ||
21 | * not agree with these terms and conditions, do not use the software. | ||
22 | * | ||
23 | * Copyright © 2005 Agere Systems Inc. | ||
24 | * All rights reserved. | ||
25 | * | ||
26 | * Redistribution and use in source or binary forms, with or without | ||
27 | * modifications, are permitted provided that the following conditions are met: | ||
28 | * | ||
29 | * . Redistributions of source code must retain the above copyright notice, this | ||
30 | * list of conditions and the following Disclaimer as comments in the code as | ||
31 | * well as in the documentation and/or other materials provided with the | ||
32 | * distribution. | ||
33 | * | ||
34 | * . Redistributions in binary form must reproduce the above copyright notice, | ||
35 | * this list of conditions and the following Disclaimer in the documentation | ||
36 | * and/or other materials provided with the distribution. | ||
37 | * | ||
38 | * . Neither the name of Agere Systems Inc. nor the names of the contributors | ||
39 | * may be used to endorse or promote products derived from this software | ||
40 | * without specific prior written permission. | ||
41 | * | ||
42 | * Disclaimer | ||
43 | * | ||
44 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
45 | * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF | ||
46 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY | ||
47 | * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN | ||
48 | * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY | ||
49 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
50 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
51 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
52 | * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT | ||
53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
54 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
55 | * DAMAGE. | ||
56 | * | ||
57 | */ | ||
58 | |||
59 | #ifndef _ET1310_MAC_H_ | ||
60 | #define _ET1310_MAC_H_ | ||
61 | |||
62 | |||
63 | #include "et1310_address_map.h" | ||
64 | |||
65 | |||
66 | #define COUNTER_WRAP_28_BIT 0x10000000 | ||
67 | #define COUNTER_WRAP_22_BIT 0x400000 | ||
68 | #define COUNTER_WRAP_16_BIT 0x10000 | ||
69 | #define COUNTER_WRAP_12_BIT 0x1000 | ||
70 | |||
71 | #define COUNTER_MASK_28_BIT (COUNTER_WRAP_28_BIT - 1) | ||
72 | #define COUNTER_MASK_22_BIT (COUNTER_WRAP_22_BIT - 1) | ||
73 | #define COUNTER_MASK_16_BIT (COUNTER_WRAP_16_BIT - 1) | ||
74 | #define COUNTER_MASK_12_BIT (COUNTER_WRAP_12_BIT - 1) | ||
75 | |||
76 | #define UPDATE_COUNTER(HostCnt, DevCnt) \ | ||
77 | HostCnt = HostCnt + DevCnt; | ||
78 | |||
79 | /* Forward declaration of the private adapter structure */ | ||
80 | struct et131x_adapter; | ||
81 | |||
82 | void ConfigMACRegs1(struct et131x_adapter *adapter); | ||
83 | void ConfigMACRegs2(struct et131x_adapter *adapter); | ||
84 | void ConfigRxMacRegs(struct et131x_adapter *adapter); | ||
85 | void ConfigTxMacRegs(struct et131x_adapter *adapter); | ||
86 | void ConfigMacStatRegs(struct et131x_adapter *adapter); | ||
87 | void ConfigFlowControl(struct et131x_adapter *adapter); | ||
88 | void UpdateMacStatHostCounters(struct et131x_adapter *adapter); | ||
89 | void HandleMacStatInterrupt(struct et131x_adapter *adapter); | ||
90 | void SetupDeviceForMulticast(struct et131x_adapter *adapter); | ||
91 | void SetupDeviceForUnicast(struct et131x_adapter *adapter); | ||
92 | |||
93 | #endif /* _ET1310_MAC_H_ */ | ||
diff --git a/drivers/staging/et131x/et1310_phy.c b/drivers/staging/et131x/et1310_phy.c index 6ecad619f77..4a55fbfbd59 100644 --- a/drivers/staging/et131x/et1310_phy.c +++ b/drivers/staging/et131x/et1310_phy.c | |||
@@ -85,17 +85,14 @@ | |||
85 | #include <linux/random.h> | 85 | #include <linux/random.h> |
86 | 86 | ||
87 | #include "et1310_phy.h" | 87 | #include "et1310_phy.h" |
88 | #include "et1310_pm.h" | ||
89 | #include "et1310_jagcore.h" | ||
90 | 88 | ||
91 | #include "et131x_adapter.h" | 89 | #include "et131x_adapter.h" |
92 | #include "et131x_netdev.h" | ||
93 | #include "et131x_initpci.h" | ||
94 | 90 | ||
95 | #include "et1310_address_map.h" | 91 | #include "et1310_address_map.h" |
96 | #include "et1310_tx.h" | 92 | #include "et1310_tx.h" |
97 | #include "et1310_rx.h" | 93 | #include "et1310_rx.h" |
98 | #include "et1310_mac.h" | 94 | |
95 | #include "et131x.h" | ||
99 | 96 | ||
100 | /* Prototypes for functions with local scope */ | 97 | /* Prototypes for functions with local scope */ |
101 | static void et131x_xcvr_init(struct et131x_adapter *etdev); | 98 | static void et131x_xcvr_init(struct et131x_adapter *etdev); |
diff --git a/drivers/staging/et131x/et1310_phy.h b/drivers/staging/et131x/et1310_phy.h index 758b9b25171..47907ba7601 100644 --- a/drivers/staging/et131x/et1310_phy.h +++ b/drivers/staging/et131x/et1310_phy.h | |||
@@ -736,32 +736,8 @@ typedef union _MI_LCR2_t { | |||
736 | 736 | ||
737 | /* MI Register 29 - 31: Reserved Reg(0x1D - 0x1E) */ | 737 | /* MI Register 29 - 31: Reserved Reg(0x1D - 0x1E) */ |
738 | 738 | ||
739 | /* Forward declaration of the private adapter structure */ | ||
740 | struct et131x_adapter; | ||
741 | 739 | ||
742 | /* Prototypes for ET1310_phy.c */ | 740 | /* Prototypes for ET1310_phy.c */ |
743 | int et131x_xcvr_find(struct et131x_adapter *adapter); | ||
744 | void et131x_setphy_normal(struct et131x_adapter *adapter); | ||
745 | |||
746 | /* static inline function does not work because et131x_adapter is not always | ||
747 | * defined | ||
748 | */ | ||
749 | int PhyMiRead(struct et131x_adapter *adapter, u8 xcvrAddr, | ||
750 | u8 xcvrReg, u16 *value); | ||
751 | #define MiRead(adapter, xcvrReg, value) \ | ||
752 | PhyMiRead((adapter), (adapter)->Stats.xcvr_addr, (xcvrReg), (value)) | ||
753 | |||
754 | int32_t MiWrite(struct et131x_adapter *adapter, | ||
755 | u8 xcvReg, u16 value); | ||
756 | void et131x_Mii_check(struct et131x_adapter *pAdapter, | ||
757 | MI_BMSR_t bmsr, MI_BMSR_t bmsr_ints); | ||
758 | |||
759 | /* This last is not strictly required (the driver could call the TPAL | ||
760 | * version instead), but this sets the adapter up correctly, and calls the | ||
761 | * access routine indirectly. This protects the driver from changes in TPAL. | ||
762 | */ | ||
763 | void SetPhy_10BaseTHalfDuplex(struct et131x_adapter *adapter); | ||
764 | |||
765 | /* Defines for PHY access routines */ | 741 | /* Defines for PHY access routines */ |
766 | 742 | ||
767 | /* Define bit operation flags */ | 743 | /* Define bit operation flags */ |
@@ -843,14 +819,4 @@ void SetPhy_10BaseTHalfDuplex(struct et131x_adapter *adapter); | |||
843 | /* #define TRU_VMI_LINK_CONTROL_REGISTER 29 */ | 819 | /* #define TRU_VMI_LINK_CONTROL_REGISTER 29 */ |
844 | /* #define TRU_VMI_TIMING_CONTROL_REGISTER */ | 820 | /* #define TRU_VMI_TIMING_CONTROL_REGISTER */ |
845 | 821 | ||
846 | /* Prototypes for PHY access routines */ | ||
847 | void ET1310_PhyInit(struct et131x_adapter *adapter); | ||
848 | void ET1310_PhyReset(struct et131x_adapter *adapter); | ||
849 | void ET1310_PhyPowerDown(struct et131x_adapter *adapter, bool down); | ||
850 | void ET1310_PhyAdvertise1000BaseT(struct et131x_adapter *adapter, | ||
851 | u16 duplex); | ||
852 | void ET1310_PhyAccessMiBit(struct et131x_adapter *adapter, | ||
853 | u16 action, | ||
854 | u16 regnum, u16 bitnum, u8 *value); | ||
855 | |||
856 | #endif /* _ET1310_PHY_H_ */ | 822 | #endif /* _ET1310_PHY_H_ */ |
diff --git a/drivers/staging/et131x/et1310_pm.c b/drivers/staging/et131x/et1310_pm.c index 7d077235929..41019e390af 100644 --- a/drivers/staging/et131x/et1310_pm.c +++ b/drivers/staging/et131x/et1310_pm.c | |||
@@ -83,13 +83,9 @@ | |||
83 | #include <linux/ioport.h> | 83 | #include <linux/ioport.h> |
84 | 84 | ||
85 | #include "et1310_phy.h" | 85 | #include "et1310_phy.h" |
86 | #include "et1310_pm.h" | ||
87 | #include "et1310_jagcore.h" | ||
88 | #include "et1310_mac.h" | ||
89 | #include "et1310_rx.h" | 86 | #include "et1310_rx.h" |
90 | |||
91 | #include "et131x_adapter.h" | 87 | #include "et131x_adapter.h" |
92 | #include "et131x_initpci.h" | 88 | #include "et131x.h" |
93 | 89 | ||
94 | /** | 90 | /** |
95 | * EnablePhyComa - called when network cable is unplugged | 91 | * EnablePhyComa - called when network cable is unplugged |
diff --git a/drivers/staging/et131x/et1310_pm.h b/drivers/staging/et131x/et1310_pm.h deleted file mode 100644 index 295f3ab132f..00000000000 --- a/drivers/staging/et131x/et1310_pm.h +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /* | ||
2 | * Agere Systems Inc. | ||
3 | * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs | ||
4 | * | ||
5 | * Copyright © 2005 Agere Systems Inc. | ||
6 | * All rights reserved. | ||
7 | * http://www.agere.com | ||
8 | * | ||
9 | *------------------------------------------------------------------------------ | ||
10 | * | ||
11 | * et1310_pm.h - Defines, structs, enums, prototypes, etc. pertaining to power | ||
12 | * management. | ||
13 | * | ||
14 | *------------------------------------------------------------------------------ | ||
15 | * | ||
16 | * SOFTWARE LICENSE | ||
17 | * | ||
18 | * This software is provided subject to the following terms and conditions, | ||
19 | * which you should read carefully before using the software. Using this | ||
20 | * software indicates your acceptance of these terms and conditions. If you do | ||
21 | * not agree with these terms and conditions, do not use the software. | ||
22 | * | ||
23 | * Copyright © 2005 Agere Systems Inc. | ||
24 | * All rights reserved. | ||
25 | * | ||
26 | * Redistribution and use in source or binary forms, with or without | ||
27 | * modifications, are permitted provided that the following conditions are met: | ||
28 | * | ||
29 | * . Redistributions of source code must retain the above copyright notice, this | ||
30 | * list of conditions and the following Disclaimer as comments in the code as | ||
31 | * well as in the documentation and/or other materials provided with the | ||
32 | * distribution. | ||
33 | * | ||
34 | * . Redistributions in binary form must reproduce the above copyright notice, | ||
35 | * this list of conditions and the following Disclaimer in the documentation | ||
36 | * and/or other materials provided with the distribution. | ||
37 | * | ||
38 | * . Neither the name of Agere Systems Inc. nor the names of the contributors | ||
39 | * may be used to endorse or promote products derived from this software | ||
40 | * without specific prior written permission. | ||
41 | * | ||
42 | * Disclaimer | ||
43 | * | ||
44 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
45 | * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF | ||
46 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY | ||
47 | * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN | ||
48 | * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY | ||
49 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
50 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
51 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
52 | * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT | ||
53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
54 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
55 | * DAMAGE. | ||
56 | * | ||
57 | */ | ||
58 | |||
59 | #ifndef _ET1310_PM_H_ | ||
60 | #define _ET1310_PM_H_ | ||
61 | |||
62 | #include "et1310_address_map.h" | ||
63 | |||
64 | typedef struct _MP_POWER_MGMT { | ||
65 | /* variable putting the phy into coma mode when boot up with no cable | ||
66 | * plugged in after 5 seconds | ||
67 | */ | ||
68 | u8 TransPhyComaModeOnBoot; | ||
69 | |||
70 | /* Next two used to save power information at power down. This | ||
71 | * information will be used during power up to set up parts of Power | ||
72 | * Management in JAGCore | ||
73 | */ | ||
74 | u16 PowerDownSpeed; | ||
75 | u8 PowerDownDuplex; | ||
76 | } MP_POWER_MGMT, *PMP_POWER_MGMT; | ||
77 | |||
78 | /* Forward declaration of the private adapter structure | ||
79 | */ | ||
80 | struct et131x_adapter; | ||
81 | |||
82 | void EnablePhyComa(struct et131x_adapter *adapter); | ||
83 | void DisablePhyComa(struct et131x_adapter *adapter); | ||
84 | |||
85 | #endif /* _ET1310_PM_H_ */ | ||
diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index 232ceb60339..54686e2ace6 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c | |||
@@ -84,14 +84,9 @@ | |||
84 | #include <linux/ioport.h> | 84 | #include <linux/ioport.h> |
85 | 85 | ||
86 | #include "et1310_phy.h" | 86 | #include "et1310_phy.h" |
87 | #include "et1310_pm.h" | ||
88 | #include "et1310_jagcore.h" | ||
89 | |||
90 | #include "et131x_adapter.h" | 87 | #include "et131x_adapter.h" |
91 | #include "et131x_initpci.h" | ||
92 | |||
93 | #include "et1310_rx.h" | 88 | #include "et1310_rx.h" |
94 | 89 | #include "et131x.h" | |
95 | 90 | ||
96 | void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD pMpRfd); | 91 | void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD pMpRfd); |
97 | 92 | ||
diff --git a/drivers/staging/et131x/et1310_rx.h b/drivers/staging/et131x/et1310_rx.h index de5487ecedd..ca84a9146d6 100644 --- a/drivers/staging/et131x/et1310_rx.h +++ b/drivers/staging/et131x/et1310_rx.h | |||
@@ -241,28 +241,4 @@ struct rx_ring { | |||
241 | struct kmem_cache *RecvLookaside; | 241 | struct kmem_cache *RecvLookaside; |
242 | }; | 242 | }; |
243 | 243 | ||
244 | /* Forward reference of RFD */ | ||
245 | struct _MP_RFD; | ||
246 | |||
247 | /* Forward declaration of the private adapter structure */ | ||
248 | struct et131x_adapter; | ||
249 | |||
250 | /* PROTOTYPES for Initialization */ | ||
251 | int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter); | ||
252 | void et131x_rx_dma_memory_free(struct et131x_adapter *adapter); | ||
253 | int et131x_rfd_resources_alloc(struct et131x_adapter *adapter, | ||
254 | struct _MP_RFD *pMpRfd); | ||
255 | void et131x_rfd_resources_free(struct et131x_adapter *adapter, | ||
256 | struct _MP_RFD *pMpRfd); | ||
257 | int et131x_init_recv(struct et131x_adapter *adapter); | ||
258 | |||
259 | void ConfigRxDmaRegs(struct et131x_adapter *adapter); | ||
260 | void SetRxDmaTimer(struct et131x_adapter *adapter); | ||
261 | void et131x_rx_dma_disable(struct et131x_adapter *adapter); | ||
262 | void et131x_rx_dma_enable(struct et131x_adapter *adapter); | ||
263 | |||
264 | void et131x_reset_recv(struct et131x_adapter *adapter); | ||
265 | |||
266 | void et131x_handle_recv_interrupt(struct et131x_adapter *adapter); | ||
267 | |||
268 | #endif /* __ET1310_RX_H__ */ | 244 | #endif /* __ET1310_RX_H__ */ |
diff --git a/drivers/staging/et131x/et1310_tx.c b/drivers/staging/et131x/et1310_tx.c index b0cb0579026..b6ff20f47de 100644 --- a/drivers/staging/et131x/et1310_tx.c +++ b/drivers/staging/et131x/et1310_tx.c | |||
@@ -84,15 +84,9 @@ | |||
84 | #include <linux/ioport.h> | 84 | #include <linux/ioport.h> |
85 | 85 | ||
86 | #include "et1310_phy.h" | 86 | #include "et1310_phy.h" |
87 | #include "et1310_pm.h" | ||
88 | #include "et1310_jagcore.h" | ||
89 | |||
90 | #include "et131x_adapter.h" | 87 | #include "et131x_adapter.h" |
91 | #include "et131x_initpci.h" | ||
92 | #include "et131x_isr.h" | ||
93 | |||
94 | #include "et1310_tx.h" | 88 | #include "et1310_tx.h" |
95 | 89 | #include "et131x.h" | |
96 | 90 | ||
97 | static inline void et131x_free_send_packet(struct et131x_adapter *etdev, | 91 | static inline void et131x_free_send_packet(struct et131x_adapter *etdev, |
98 | struct tcb *tcb); | 92 | struct tcb *tcb); |
diff --git a/drivers/staging/et131x/et1310_tx.h b/drivers/staging/et131x/et1310_tx.h index 4f0ea81978f..82d06e9870d 100644 --- a/drivers/staging/et131x/et1310_tx.h +++ b/drivers/staging/et131x/et1310_tx.h | |||
@@ -147,18 +147,4 @@ struct tx_ring { | |||
147 | int since_irq; | 147 | int since_irq; |
148 | }; | 148 | }; |
149 | 149 | ||
150 | /* Forward declaration of the private adapter structure */ | ||
151 | struct et131x_adapter; | ||
152 | |||
153 | /* PROTOTYPES for et1310_tx.c */ | ||
154 | int et131x_tx_dma_memory_alloc(struct et131x_adapter *adapter); | ||
155 | void et131x_tx_dma_memory_free(struct et131x_adapter *adapter); | ||
156 | void ConfigTxDmaRegs(struct et131x_adapter *adapter); | ||
157 | void et131x_init_send(struct et131x_adapter *adapter); | ||
158 | void et131x_tx_dma_disable(struct et131x_adapter *adapter); | ||
159 | void et131x_tx_dma_enable(struct et131x_adapter *adapter); | ||
160 | void et131x_handle_send_interrupt(struct et131x_adapter *adapter); | ||
161 | void et131x_free_busy_send_packets(struct et131x_adapter *adapter); | ||
162 | int et131x_send_packets(struct sk_buff *skb, struct net_device *netdev); | ||
163 | |||
164 | #endif /* __ET1310_TX_H__ */ | 150 | #endif /* __ET1310_TX_H__ */ |
diff --git a/drivers/staging/et131x/et131x.h b/drivers/staging/et131x/et131x.h new file mode 100644 index 00000000000..a8abfe6ca81 --- /dev/null +++ b/drivers/staging/et131x/et131x.h | |||
@@ -0,0 +1,153 @@ | |||
1 | /* | ||
2 | * Merged from files | ||
3 | * | ||
4 | * Copyright © 2005 Agere Systems Inc. | ||
5 | * All rights reserved. | ||
6 | * http://www.agere.com | ||
7 | * | ||
8 | * SOFTWARE LICENSE | ||
9 | * | ||
10 | * This software is provided subject to the following terms and conditions, | ||
11 | * which you should read carefully before using the software. Using this | ||
12 | * software indicates your acceptance of these terms and conditions. If you do | ||
13 | * not agree with these terms and conditions, do not use the software. | ||
14 | * | ||
15 | * Copyright © 2005 Agere Systems Inc. | ||
16 | * All rights reserved. | ||
17 | * | ||
18 | * Redistribution and use in source or binary forms, with or without | ||
19 | * modifications, are permitted provided that the following conditions are met: | ||
20 | * | ||
21 | * . Redistributions of source code must retain the above copyright notice, this | ||
22 | * list of conditions and the following Disclaimer as comments in the code as | ||
23 | * well as in the documentation and/or other materials provided with the | ||
24 | * distribution. | ||
25 | * | ||
26 | * . Redistributions in binary form must reproduce the above copyright notice, | ||
27 | * this list of conditions and the following Disclaimer in the documentation | ||
28 | * and/or other materials provided with the distribution. | ||
29 | * | ||
30 | * . Neither the name of Agere Systems Inc. nor the names of the contributors | ||
31 | * may be used to endorse or promote products derived from this software | ||
32 | * without specific prior written permission. | ||
33 | * | ||
34 | * Disclaimer | ||
35 | * | ||
36 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
37 | * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF | ||
38 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY | ||
39 | * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN | ||
40 | * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY | ||
41 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
42 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
44 | * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT | ||
45 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
46 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
47 | * DAMAGE. | ||
48 | * | ||
49 | */ | ||
50 | |||
51 | /* et131x_eeprom.c */ | ||
52 | int et131x_init_eeprom(struct et131x_adapter *etdev); | ||
53 | |||
54 | /* et131x_initpci.c */ | ||
55 | void ConfigGlobalRegs(struct et131x_adapter *pAdapter); | ||
56 | void ConfigMMCRegs(struct et131x_adapter *pAdapter); | ||
57 | void et131x_enable_interrupts(struct et131x_adapter *adapter); | ||
58 | void et131x_disable_interrupts(struct et131x_adapter *adapter); | ||
59 | void et131x_align_allocated_memory(struct et131x_adapter *adapter, | ||
60 | u64 *phys_addr, | ||
61 | u64 *offset, u64 mask); | ||
62 | |||
63 | int et131x_adapter_setup(struct et131x_adapter *adapter); | ||
64 | int et131x_adapter_memory_alloc(struct et131x_adapter *adapter); | ||
65 | void et131x_adapter_memory_free(struct et131x_adapter *adapter); | ||
66 | void et131x_hwaddr_init(struct et131x_adapter *adapter); | ||
67 | void et131x_soft_reset(struct et131x_adapter *adapter); | ||
68 | |||
69 | /* et131x_isr.c */ | ||
70 | irqreturn_t et131x_isr(int irq, void *dev_id); | ||
71 | void et131x_isr_handler(struct work_struct *work); | ||
72 | |||
73 | /* et1310_mac.c */ | ||
74 | void ConfigMACRegs1(struct et131x_adapter *adapter); | ||
75 | void ConfigMACRegs2(struct et131x_adapter *adapter); | ||
76 | void ConfigRxMacRegs(struct et131x_adapter *adapter); | ||
77 | void ConfigTxMacRegs(struct et131x_adapter *adapter); | ||
78 | void ConfigMacStatRegs(struct et131x_adapter *adapter); | ||
79 | void ConfigFlowControl(struct et131x_adapter *adapter); | ||
80 | void UpdateMacStatHostCounters(struct et131x_adapter *adapter); | ||
81 | void HandleMacStatInterrupt(struct et131x_adapter *adapter); | ||
82 | void SetupDeviceForMulticast(struct et131x_adapter *adapter); | ||
83 | void SetupDeviceForUnicast(struct et131x_adapter *adapter); | ||
84 | |||
85 | /* et131x_netdev.c */ | ||
86 | struct net_device *et131x_device_alloc(void); | ||
87 | |||
88 | /* et131x_pm.c */ | ||
89 | void EnablePhyComa(struct et131x_adapter *adapter); | ||
90 | void DisablePhyComa(struct et131x_adapter *adapter); | ||
91 | |||
92 | /* et131x_phy.c */ | ||
93 | void ET1310_PhyInit(struct et131x_adapter *adapter); | ||
94 | void ET1310_PhyReset(struct et131x_adapter *adapter); | ||
95 | void ET1310_PhyPowerDown(struct et131x_adapter *adapter, bool down); | ||
96 | void ET1310_PhyAdvertise1000BaseT(struct et131x_adapter *adapter, | ||
97 | u16 duplex); | ||
98 | void ET1310_PhyAccessMiBit(struct et131x_adapter *adapter, | ||
99 | u16 action, | ||
100 | u16 regnum, u16 bitnum, u8 *value); | ||
101 | |||
102 | int et131x_xcvr_find(struct et131x_adapter *adapter); | ||
103 | void et131x_setphy_normal(struct et131x_adapter *adapter); | ||
104 | |||
105 | /* static inline function does not work because et131x_adapter is not always | ||
106 | * defined | ||
107 | */ | ||
108 | int PhyMiRead(struct et131x_adapter *adapter, u8 xcvrAddr, | ||
109 | u8 xcvrReg, u16 *value); | ||
110 | #define MiRead(adapter, xcvrReg, value) \ | ||
111 | PhyMiRead((adapter), (adapter)->Stats.xcvr_addr, (xcvrReg), (value)) | ||
112 | |||
113 | int32_t MiWrite(struct et131x_adapter *adapter, | ||
114 | u8 xcvReg, u16 value); | ||
115 | void et131x_Mii_check(struct et131x_adapter *pAdapter, | ||
116 | MI_BMSR_t bmsr, MI_BMSR_t bmsr_ints); | ||
117 | |||
118 | /* This last is not strictly required (the driver could call the TPAL | ||
119 | * version instead), but this sets the adapter up correctly, and calls the | ||
120 | * access routine indirectly. This protects the driver from changes in TPAL. | ||
121 | */ | ||
122 | void SetPhy_10BaseTHalfDuplex(struct et131x_adapter *adapter); | ||
123 | |||
124 | |||
125 | /* et1310_rx.c */ | ||
126 | int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter); | ||
127 | void et131x_rx_dma_memory_free(struct et131x_adapter *adapter); | ||
128 | int et131x_rfd_resources_alloc(struct et131x_adapter *adapter, | ||
129 | struct _MP_RFD *pMpRfd); | ||
130 | void et131x_rfd_resources_free(struct et131x_adapter *adapter, | ||
131 | struct _MP_RFD *pMpRfd); | ||
132 | int et131x_init_recv(struct et131x_adapter *adapter); | ||
133 | |||
134 | void ConfigRxDmaRegs(struct et131x_adapter *adapter); | ||
135 | void SetRxDmaTimer(struct et131x_adapter *adapter); | ||
136 | void et131x_rx_dma_disable(struct et131x_adapter *adapter); | ||
137 | void et131x_rx_dma_enable(struct et131x_adapter *adapter); | ||
138 | |||
139 | void et131x_reset_recv(struct et131x_adapter *adapter); | ||
140 | |||
141 | void et131x_handle_recv_interrupt(struct et131x_adapter *adapter); | ||
142 | |||
143 | /* et131x_tx.c */ | ||
144 | int et131x_tx_dma_memory_alloc(struct et131x_adapter *adapter); | ||
145 | void et131x_tx_dma_memory_free(struct et131x_adapter *adapter); | ||
146 | void ConfigTxDmaRegs(struct et131x_adapter *adapter); | ||
147 | void et131x_init_send(struct et131x_adapter *adapter); | ||
148 | void et131x_tx_dma_disable(struct et131x_adapter *adapter); | ||
149 | void et131x_tx_dma_enable(struct et131x_adapter *adapter); | ||
150 | void et131x_handle_send_interrupt(struct et131x_adapter *adapter); | ||
151 | void et131x_free_busy_send_packets(struct et131x_adapter *adapter); | ||
152 | int et131x_send_packets(struct sk_buff *skb, struct net_device *netdev); | ||
153 | |||
diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h index 6f7bb2dff5a..64a678fcb60 100644 --- a/drivers/staging/et131x/et131x_adapter.h +++ b/drivers/staging/et131x/et131x_adapter.h | |||
@@ -147,6 +147,20 @@ typedef struct _ce_stats_t { | |||
147 | u32 InterruptStatus; | 147 | u32 InterruptStatus; |
148 | } CE_STATS_t, *PCE_STATS_t; | 148 | } CE_STATS_t, *PCE_STATS_t; |
149 | 149 | ||
150 | typedef struct _MP_POWER_MGMT { | ||
151 | /* variable putting the phy into coma mode when boot up with no cable | ||
152 | * plugged in after 5 seconds | ||
153 | */ | ||
154 | u8 TransPhyComaModeOnBoot; | ||
155 | |||
156 | /* Next two used to save power information at power down. This | ||
157 | * information will be used during power up to set up parts of Power | ||
158 | * Management in JAGCore | ||
159 | */ | ||
160 | u16 PowerDownSpeed; | ||
161 | u8 PowerDownDuplex; | ||
162 | } MP_POWER_MGMT, *PMP_POWER_MGMT; | ||
163 | |||
150 | /* The private adapter structure */ | 164 | /* The private adapter structure */ |
151 | struct et131x_adapter { | 165 | struct et131x_adapter { |
152 | struct net_device *netdev; | 166 | struct net_device *netdev; |
diff --git a/drivers/staging/et131x/et131x_config.h b/drivers/staging/et131x/et131x_config.h deleted file mode 100644 index 642c0f6dd6f..00000000000 --- a/drivers/staging/et131x/et131x_config.h +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | /* | ||
2 | * Agere Systems Inc. | ||
3 | * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs | ||
4 | * | ||
5 | * Copyright © 2005 Agere Systems Inc. | ||
6 | * All rights reserved. | ||
7 | * http://www.agere.com | ||
8 | * | ||
9 | *------------------------------------------------------------------------------ | ||
10 | * | ||
11 | * et131x_config.h - Defines, structs, enums, prototypes, etc. to support | ||
12 | * et131x_config.c | ||
13 | * | ||
14 | *------------------------------------------------------------------------------ | ||
15 | * | ||
16 | * SOFTWARE LICENSE | ||
17 | * | ||
18 | * This software is provided subject to the following terms and conditions, | ||
19 | * which you should read carefully before using the software. Using this | ||
20 | * software indicates your acceptance of these terms and conditions. If you do | ||
21 | * not agree with these terms and conditions, do not use the software. | ||
22 | * | ||
23 | * Copyright © 2005 Agere Systems Inc. | ||
24 | * All rights reserved. | ||
25 | * | ||
26 | * Redistribution and use in source or binary forms, with or without | ||
27 | * modifications, are permitted provided that the following conditions are met: | ||
28 | * | ||
29 | * . Redistributions of source code must retain the above copyright notice, this | ||
30 | * list of conditions and the following Disclaimer as comments in the code as | ||
31 | * well as in the documentation and/or other materials provided with the | ||
32 | * distribution. | ||
33 | * | ||
34 | * . Redistributions in binary form must reproduce the above copyright notice, | ||
35 | * this list of conditions and the following Disclaimer in the documentation | ||
36 | * and/or other materials provided with the distribution. | ||
37 | * | ||
38 | * . Neither the name of Agere Systems Inc. nor the names of the contributors | ||
39 | * may be used to endorse or promote products derived from this software | ||
40 | * without specific prior written permission. | ||
41 | * | ||
42 | * Disclaimer | ||
43 | * | ||
44 | * THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
45 | * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF | ||
46 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY | ||
47 | * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN | ||
48 | * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY | ||
49 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
50 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
51 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
52 | * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT | ||
53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
54 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
55 | * DAMAGE. | ||
56 | * | ||
57 | */ | ||
58 | |||
59 | #ifndef __ET131X_CONFIG_H__ | ||
60 | #define __ET131X_CONFIG_H__ | ||
61 | |||
62 | /* Forward declaration of the private adapter structure */ | ||
63 | struct et131x_adapter; | ||
64 | |||
65 | void et131x_config_parse(struct et131x_adapter *adapter); | ||
66 | |||
67 | #endif /* __ET131X_CONFIG_H__ */ | ||
diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c index e02b1cd98f5..5ad7e5a6f63 100644 --- a/drivers/staging/et131x/et131x_initpci.c +++ b/drivers/staging/et131x/et131x_initpci.c | |||
@@ -87,20 +87,16 @@ | |||
87 | #include <linux/random.h> | 87 | #include <linux/random.h> |
88 | 88 | ||
89 | #include "et1310_phy.h" | 89 | #include "et1310_phy.h" |
90 | #include "et1310_pm.h" | ||
91 | #include "et1310_jagcore.h" | ||
92 | 90 | ||
93 | #include "et131x_adapter.h" | 91 | #include "et131x_adapter.h" |
94 | #include "et131x_netdev.h" | ||
95 | #include "et131x_config.h" | ||
96 | #include "et131x_isr.h" | ||
97 | 92 | ||
98 | #include "et1310_address_map.h" | 93 | #include "et1310_address_map.h" |
99 | #include "et1310_tx.h" | 94 | #include "et1310_tx.h" |
100 | #include "et1310_rx.h" | 95 | #include "et1310_rx.h" |
101 | #include "et1310_mac.h" | 96 | #include "et131x.h" |
102 | #include "et1310_eeprom.h" | ||
103 | 97 | ||
98 | #define INTERNAL_MEM_SIZE 0x400 /* 1024 of internal memory */ | ||
99 | #define INTERNAL_MEM_RX_OFFSET 0x1FF /* 50% Tx, 50% Rx */ | ||
104 | 100 | ||
105 | /* Defines for Parameter Default/Min/Max vaules */ | 101 | /* Defines for Parameter Default/Min/Max vaules */ |
106 | #define PARM_SPEED_DUPLEX_MIN 0 | 102 | #define PARM_SPEED_DUPLEX_MIN 0 |
diff --git a/drivers/staging/et131x/et131x_initpci.h b/drivers/staging/et131x/et131x_initpci.h deleted file mode 100644 index 7269569a874..00000000000 --- a/drivers/staging/et131x/et131x_initpci.h +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | /* | ||
2 | * Agere Systems Inc. | ||
3 | * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs | ||
4 | * | ||
5 | * Copyright © 2005 Agere Systems Inc. | ||
6 | * All rights reserved. | ||
7 | * http://www.agere.com | ||
8 | * | ||
9 | *------------------------------------------------------------------------------ | ||
10 | * | ||
11 | * et131x_initpci.h - Header which includes common data and function prototypes | ||
12 | * related to the driver's PCI (and PCI Express) information. | ||
13 | * | ||
14 | *------------------------------------------------------------------------------ | ||
15 | * | ||
16 | * SOFTWARE LICENSE | ||
17 | * | ||
18 | * This software is provided subject to the following terms and conditions, | ||
19 | * which you should read carefully before using the software. Using this | ||
20 | * software indicates your acceptance of these terms and conditions. If you do | ||
21 | * not agree with these terms and conditions, do not use the software. | ||
22 | * | ||
23 | * Copyright © 2005 Agere Systems Inc. | ||
24 | * All rights reserved. | ||
25 | * | ||
26 | * Redistribution and use in source or binary forms, with or without | ||
27 | * modifications, are permitted provided that the following conditions are met: | ||
28 | * | ||
29 | * . Redistributions of source code must retain the above copyright notice, this | ||
30 | * list of conditions and the following Disclaimer as comments in the code as | ||
31 | * well as in the documentation and/or other materials provided with the | ||
32 | * distribution. | ||
33 | * | ||
34 | * . Redistributions in binary form must reproduce the above copyright notice, | ||
35 | * this list of conditions and the following Disclaimer in the documentation | ||
36 | * and/or other materials provided with the distribution. | ||
37 | * | ||
38 | * . Neither the name of Agere Systems Inc. nor the names of the contributors | ||
39 | * may be used to endorse or promote products derived from this software | ||
40 | * without specific prior written permission. | ||
41 | * | ||
42 | * Disclaimer | ||
43 | * | ||
44 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
45 | * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF | ||
46 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY | ||
47 | * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN | ||
48 | * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY | ||
49 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
50 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
51 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
52 | * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT | ||
53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
54 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
55 | * DAMAGE. | ||
56 | * | ||
57 | */ | ||
58 | |||
59 | #ifndef __ET131X_INITPCI_H__ | ||
60 | #define __ET131X_INITPCI_H__ | ||
61 | |||
62 | /* Function Prototypes */ | ||
63 | void et131x_align_allocated_memory(struct et131x_adapter *adapter, | ||
64 | u64 *phys_addr, | ||
65 | u64 *offset, u64 mask); | ||
66 | |||
67 | int et131x_adapter_setup(struct et131x_adapter *adapter); | ||
68 | int et131x_adapter_memory_alloc(struct et131x_adapter *adapter); | ||
69 | void et131x_adapter_memory_free(struct et131x_adapter *adapter); | ||
70 | void et131x_hwaddr_init(struct et131x_adapter *adapter); | ||
71 | void et131x_soft_reset(struct et131x_adapter *adapter); | ||
72 | |||
73 | #endif /* __ET131X_INITPCI_H__ */ | ||
diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c index e297739fb86..c35a564de3c 100644 --- a/drivers/staging/et131x/et131x_isr.c +++ b/drivers/staging/et131x/et131x_isr.c | |||
@@ -85,11 +85,27 @@ | |||
85 | #include <linux/ioport.h> | 85 | #include <linux/ioport.h> |
86 | 86 | ||
87 | #include "et1310_phy.h" | 87 | #include "et1310_phy.h" |
88 | #include "et1310_pm.h" | ||
89 | #include "et1310_jagcore.h" | ||
90 | #include "et1310_mac.h" | ||
91 | |||
92 | #include "et131x_adapter.h" | 88 | #include "et131x_adapter.h" |
89 | #include "et131x.h" | ||
90 | |||
91 | /* | ||
92 | * For interrupts, normal running is: | ||
93 | * rxdma_xfr_done, phy_interrupt, mac_stat_interrupt, | ||
94 | * watchdog_interrupt & txdma_xfer_done | ||
95 | * | ||
96 | * In both cases, when flow control is enabled for either Tx or bi-direction, | ||
97 | * we additional enable rx_fbr0_low and rx_fbr1_low, so we know when the | ||
98 | * buffer rings are running low. | ||
99 | */ | ||
100 | #define INT_MASK_DISABLE 0xffffffff | ||
101 | |||
102 | /* NOTE: Masking out MAC_STAT Interrupt for now... | ||
103 | * #define INT_MASK_ENABLE 0xfff6bf17 | ||
104 | * #define INT_MASK_ENABLE_NO_FLOW 0xfff6bfd7 | ||
105 | */ | ||
106 | #define INT_MASK_ENABLE 0xfffebf17 | ||
107 | #define INT_MASK_ENABLE_NO_FLOW 0xfffebfd7 | ||
108 | |||
93 | 109 | ||
94 | /** | 110 | /** |
95 | * et131x_enable_interrupts - enable interrupt | 111 | * et131x_enable_interrupts - enable interrupt |
diff --git a/drivers/staging/et131x/et131x_isr.h b/drivers/staging/et131x/et131x_isr.h deleted file mode 100644 index 906d57727e2..00000000000 --- a/drivers/staging/et131x/et131x_isr.h +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | /* | ||
2 | * Agere Systems Inc. | ||
3 | * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs | ||
4 | * | ||
5 | * Copyright © 2005 Agere Systems Inc. | ||
6 | * All rights reserved. | ||
7 | * http://www.agere.com | ||
8 | * | ||
9 | *------------------------------------------------------------------------------ | ||
10 | * | ||
11 | * et131x_isr.h - Defines, structs, enums, prototypes, etc. pertaining to the | ||
12 | * ISR processing code. | ||
13 | * | ||
14 | *------------------------------------------------------------------------------ | ||
15 | * | ||
16 | * SOFTWARE LICENSE | ||
17 | * | ||
18 | * This software is provided subject to the following terms and conditions, | ||
19 | * which you should read carefully before using the software. Using this | ||
20 | * software indicates your acceptance of these terms and conditions. If you do | ||
21 | * not agree with these terms and conditions, do not use the software. | ||
22 | * | ||
23 | * Copyright © 2005 Agere Systems Inc. | ||
24 | * All rights reserved. | ||
25 | * | ||
26 | * Redistribution and use in source or binary forms, with or without | ||
27 | * modifications, are permitted provided that the following conditions are met: | ||
28 | * | ||
29 | * . Redistributions of source code must retain the above copyright notice, this | ||
30 | * list of conditions and the following Disclaimer as comments in the code as | ||
31 | * well as in the documentation and/or other materials provided with the | ||
32 | * distribution. | ||
33 | * | ||
34 | * . Redistributions in binary form must reproduce the above copyright notice, | ||
35 | * this list of conditions and the following Disclaimer in the documentation | ||
36 | * and/or other materials provided with the distribution. | ||
37 | * | ||
38 | * . Neither the name of Agere Systems Inc. nor the names of the contributors | ||
39 | * may be used to endorse or promote products derived from this software | ||
40 | * without specific prior written permission. | ||
41 | * | ||
42 | * Disclaimer | ||
43 | * | ||
44 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
45 | * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF | ||
46 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY | ||
47 | * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN | ||
48 | * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY | ||
49 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
50 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
51 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
52 | * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT | ||
53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
54 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
55 | * DAMAGE. | ||
56 | * | ||
57 | */ | ||
58 | |||
59 | #ifndef __ET131X_ISR_H__ | ||
60 | #define __ET131X_ISR_H__ | ||
61 | |||
62 | irqreturn_t et131x_isr(int irq, void *dev_id); | ||
63 | void et131x_isr_handler(struct work_struct *work); | ||
64 | |||
65 | #endif /* __ET131X_ISR_H__ */ | ||
diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c index c63032fa88c..6d9f9be7a84 100644 --- a/drivers/staging/et131x/et131x_netdev.c +++ b/drivers/staging/et131x/et131x_netdev.c | |||
@@ -85,14 +85,9 @@ | |||
85 | #include <linux/ioport.h> | 85 | #include <linux/ioport.h> |
86 | 86 | ||
87 | #include "et1310_phy.h" | 87 | #include "et1310_phy.h" |
88 | #include "et1310_pm.h" | ||
89 | #include "et1310_jagcore.h" | ||
90 | #include "et1310_mac.h" | ||
91 | #include "et1310_tx.h" | 88 | #include "et1310_tx.h" |
92 | |||
93 | #include "et131x_adapter.h" | 89 | #include "et131x_adapter.h" |
94 | #include "et131x_isr.h" | 90 | #include "et131x.h" |
95 | #include "et131x_initpci.h" | ||
96 | 91 | ||
97 | struct net_device_stats *et131x_stats(struct net_device *netdev); | 92 | struct net_device_stats *et131x_stats(struct net_device *netdev); |
98 | int et131x_open(struct net_device *netdev); | 93 | int et131x_open(struct net_device *netdev); |
diff --git a/drivers/staging/et131x/et131x_netdev.h b/drivers/staging/et131x/et131x_netdev.h deleted file mode 100644 index 1eb4a922c01..00000000000 --- a/drivers/staging/et131x/et131x_netdev.h +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | /* | ||
2 | * Agere Systems Inc. | ||
3 | * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs | ||
4 | * | ||
5 | * Copyright © 2005 Agere Systems Inc. | ||
6 | * All rights reserved. | ||
7 | * http://www.agere.com | ||
8 | * | ||
9 | *------------------------------------------------------------------------------ | ||
10 | * | ||
11 | * et131x_netdev.h - Defines, structs, enums, prototypes, etc. related to the | ||
12 | * driver's net_device support. | ||
13 | * | ||
14 | *------------------------------------------------------------------------------ | ||
15 | * | ||
16 | * SOFTWARE LICENSE | ||
17 | * | ||
18 | * This software is provided subject to the following terms and conditions, | ||
19 | * which you should read carefully before using the software. Using this | ||
20 | * software indicates your acceptance of these terms and conditions. If you do | ||
21 | * not agree with these terms and conditions, do not use the software. | ||
22 | * | ||
23 | * Copyright © 2005 Agere Systems Inc. | ||
24 | * All rights reserved. | ||
25 | * | ||
26 | * Redistribution and use in source or binary forms, with or without | ||
27 | * modifications, are permitted provided that the following conditions are met: | ||
28 | * | ||
29 | * . Redistributions of source code must retain the above copyright notice, this | ||
30 | * list of conditions and the following Disclaimer as comments in the code as | ||
31 | * well as in the documentation and/or other materials provided with the | ||
32 | * distribution. | ||
33 | * | ||
34 | * . Redistributions in binary form must reproduce the above copyright notice, | ||
35 | * this list of conditions and the following Disclaimer in the documentation | ||
36 | * and/or other materials provided with the distribution. | ||
37 | * | ||
38 | * . Neither the name of Agere Systems Inc. nor the names of the contributors | ||
39 | * may be used to endorse or promote products derived from this software | ||
40 | * without specific prior written permission. | ||
41 | * | ||
42 | * Disclaimer | ||
43 | * | ||
44 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
45 | * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF | ||
46 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY | ||
47 | * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN | ||
48 | * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY | ||
49 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
50 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
51 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
52 | * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT | ||
53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
54 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
55 | * DAMAGE. | ||
56 | * | ||
57 | */ | ||
58 | |||
59 | #ifndef __ET131X_NETDEV_H__ | ||
60 | #define __ET131X_NETDEV_H__ | ||
61 | |||
62 | struct net_device *et131x_device_alloc(void); | ||
63 | |||
64 | #endif /* __ET131X_NETDEV_H__ */ | ||
diff --git a/drivers/staging/et131x/et131x_version.h b/drivers/staging/et131x/et131x_version.h index 568f6c8c34f..2aa9bda44ac 100644 --- a/drivers/staging/et131x/et131x_version.h +++ b/drivers/staging/et131x/et131x_version.h | |||
@@ -62,20 +62,13 @@ | |||
62 | #define DRIVER_LICENSE "Dual BSD/GPL" | 62 | #define DRIVER_LICENSE "Dual BSD/GPL" |
63 | #define DRIVER_DEVICE_STRING "ET1310" | 63 | #define DRIVER_DEVICE_STRING "ET1310" |
64 | #define DRIVER_NAME "et131x" | 64 | #define DRIVER_NAME "et131x" |
65 | #define DRIVER_MAJOR_VERSION 1 | 65 | #define DRIVER_VERSION_STRING "1.2.3-lk" |
66 | #define DRIVER_MINOR_VERSION 2 | ||
67 | #define DRIVER_PATCH_VERSION 3 | ||
68 | #define DRIVER_VERSION_STRING "1.2.3" | ||
69 | #define DRIVER_VENDOR "Agere Systems, http://www.agere.com" | 66 | #define DRIVER_VENDOR "Agere Systems, http://www.agere.com" |
70 | #define DRIVER_DESC "10/100/1000 Base-T Ethernet Driver" | 67 | #define DRIVER_DESC "10/100/1000 Base-T Ethernet Driver" |
71 | 68 | ||
72 | #define STRUCT_MODULE "net" /* blux: missed by the kernel */ | ||
73 | |||
74 | #define DRIVER_INFO DRIVER_DESC " for the "\ | 69 | #define DRIVER_INFO DRIVER_DESC " for the "\ |
75 | DRIVER_DEVICE_STRING ", v" \ | 70 | DRIVER_DEVICE_STRING ", v" \ |
76 | DRIVER_VERSION_STRING " by " \ | 71 | DRIVER_VERSION_STRING " by " \ |
77 | DRIVER_VENDOR | 72 | DRIVER_VENDOR |
78 | 73 | ||
79 | #define DRIVER_NAME_EXT "et131x.ko" | ||
80 | |||
81 | #endif /* __ET131X_VERSION_H__ */ | 74 | #endif /* __ET131X_VERSION_H__ */ |