]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From cfb739b459a4d982b75f5b92cbe7d2631999e206 Mon Sep 17 00:00:00 2001 |
2 | From: Greg Kroah-Hartman <gregkh@suse.de> | |
3 | Date: Thu, 3 Apr 2008 17:30:53 -0700 | |
4 | Subject: [PATCH 05/23] Staging: add et131x network driver | |
5 | Patch-mainline: 2.6.28 | |
6 | ||
7 | This is a driver for the ET1310 network device. | |
8 | ||
9 | Based on the driver found at https://sourceforge.net/projects/et131x/ | |
10 | ||
11 | Cleaned up immensely by Olaf Hartman <o.hartmann@telovital.com> and Christoph | |
12 | Hellwig <hch@infradead.org> | |
13 | ||
14 | Note, the powermanagement options were removed from the vendor provided | |
15 | driver as they did not build properly at the time. | |
16 | ||
17 | TODO: | |
18 | - kernel coding style cleanups | |
19 | - forward port for latest network driver changes | |
20 | - kill useless typecasts (e.g. in et1310_phy.c) | |
21 | - alloc_etherdev is initializing memory with zero?!? | |
22 | - add_timer call in et131x_netdev.c is correct? | |
23 | - Add power saving functionality (suspend, sleep, resume) | |
24 | - Implement a few more kernel Parameter (set mac ) | |
25 | ||
26 | Cc: Olaf Hartmann <o.hartmann@telovital.com> | |
27 | Cc: Christoph Hellwig <hch@infradead.org> | |
28 | Cc: Dean Adams <dadams1969@gmail.com> | |
29 | Cc: Victor Soriano <vjsoriano@agere.com> | |
30 | Cc: Andre-Sebastian Liebe <andre@lianse.eu> | |
31 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
32 | --- | |
33 | drivers/staging/Kconfig | 1 + | |
34 | drivers/staging/Makefile | 1 + | |
35 | drivers/staging/et131x/Kconfig | 18 + | |
36 | drivers/staging/et131x/Makefile | 18 + | |
37 | drivers/staging/et131x/README | 25 + | |
38 | drivers/staging/et131x/et1310_address_map.h | 2399 +++++++++++++++++++++++++++ | |
39 | drivers/staging/et131x/et1310_eeprom.c | 480 ++++++ | |
40 | drivers/staging/et131x/et1310_eeprom.h | 89 + | |
41 | drivers/staging/et131x/et1310_jagcore.c | 220 +++ | |
42 | drivers/staging/et131x/et1310_jagcore.h | 112 ++ | |
43 | drivers/staging/et131x/et1310_mac.c | 792 +++++++++ | |
44 | drivers/staging/et131x/et1310_mac.h | 93 + | |
45 | drivers/staging/et131x/et1310_phy.c | 1281 ++++++++++++++ | |
46 | drivers/staging/et131x/et1310_phy.h | 910 ++++++++++ | |
47 | drivers/staging/et131x/et1310_pm.c | 207 +++ | |
48 | drivers/staging/et131x/et1310_pm.h | 125 ++ | |
49 | drivers/staging/et131x/et1310_rx.c | 1391 ++++++++++++++++ | |
50 | drivers/staging/et131x/et1310_rx.h | 373 +++++ | |
51 | drivers/staging/et131x/et1310_tx.c | 1525 +++++++++++++++++ | |
52 | drivers/staging/et131x/et1310_tx.h | 242 +++ | |
53 | drivers/staging/et131x/et131x_adapter.h | 347 ++++ | |
54 | drivers/staging/et131x/et131x_config.c | 325 ++++ | |
55 | drivers/staging/et131x/et131x_config.h | 67 + | |
56 | drivers/staging/et131x/et131x_debug.c | 218 +++ | |
57 | drivers/staging/et131x/et131x_debug.h | 201 +++ | |
58 | drivers/staging/et131x/et131x_defs.h | 128 ++ | |
59 | drivers/staging/et131x/et131x_initpci.c | 1046 ++++++++++++ | |
60 | drivers/staging/et131x/et131x_initpci.h | 73 + | |
61 | drivers/staging/et131x/et131x_isr.c | 488 ++++++ | |
62 | drivers/staging/et131x/et131x_isr.h | 65 + | |
63 | drivers/staging/et131x/et131x_netdev.c | 856 ++++++++++ | |
64 | drivers/staging/et131x/et131x_netdev.h | 64 + | |
65 | drivers/staging/et131x/et131x_version.h | 81 + | |
66 | 33 files changed, 14261 insertions(+), 0 deletions(-) | |
67 | create mode 100644 drivers/staging/et131x/Kconfig | |
68 | create mode 100644 drivers/staging/et131x/Makefile | |
69 | create mode 100644 drivers/staging/et131x/README | |
70 | create mode 100644 drivers/staging/et131x/et1310_address_map.h | |
71 | create mode 100644 drivers/staging/et131x/et1310_eeprom.c | |
72 | create mode 100644 drivers/staging/et131x/et1310_eeprom.h | |
73 | create mode 100644 drivers/staging/et131x/et1310_jagcore.c | |
74 | create mode 100644 drivers/staging/et131x/et1310_jagcore.h | |
75 | create mode 100644 drivers/staging/et131x/et1310_mac.c | |
76 | create mode 100644 drivers/staging/et131x/et1310_mac.h | |
77 | create mode 100644 drivers/staging/et131x/et1310_phy.c | |
78 | create mode 100644 drivers/staging/et131x/et1310_phy.h | |
79 | create mode 100644 drivers/staging/et131x/et1310_pm.c | |
80 | create mode 100644 drivers/staging/et131x/et1310_pm.h | |
81 | create mode 100644 drivers/staging/et131x/et1310_rx.c | |
82 | create mode 100644 drivers/staging/et131x/et1310_rx.h | |
83 | create mode 100644 drivers/staging/et131x/et1310_tx.c | |
84 | create mode 100644 drivers/staging/et131x/et1310_tx.h | |
85 | create mode 100644 drivers/staging/et131x/et131x_adapter.h | |
86 | create mode 100644 drivers/staging/et131x/et131x_config.c | |
87 | create mode 100644 drivers/staging/et131x/et131x_config.h | |
88 | create mode 100644 drivers/staging/et131x/et131x_debug.c | |
89 | create mode 100644 drivers/staging/et131x/et131x_debug.h | |
90 | create mode 100644 drivers/staging/et131x/et131x_defs.h | |
91 | create mode 100644 drivers/staging/et131x/et131x_initpci.c | |
92 | create mode 100644 drivers/staging/et131x/et131x_initpci.h | |
93 | create mode 100644 drivers/staging/et131x/et131x_isr.c | |
94 | create mode 100644 drivers/staging/et131x/et131x_isr.h | |
95 | create mode 100644 drivers/staging/et131x/et131x_netdev.c | |
96 | create mode 100644 drivers/staging/et131x/et131x_netdev.h | |
97 | create mode 100644 drivers/staging/et131x/et131x_version.h | |
98 | ||
99 | diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig | |
100 | index 84832fe..4c3789d 100644 | |
101 | --- a/drivers/staging/Kconfig | |
102 | +++ b/drivers/staging/Kconfig | |
103 | @@ -23,5 +23,6 @@ menuconfig STAGING | |
104 | ||
105 | if STAGING | |
106 | ||
107 | +source "drivers/staging/et131x/Kconfig" | |
108 | ||
109 | endif # STAGING | |
110 | diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile | |
111 | index ceb0328..933b984 100644 | |
112 | --- a/drivers/staging/Makefile | |
113 | +++ b/drivers/staging/Makefile | |
114 | @@ -1,2 +1,3 @@ | |
115 | # Makefile for staging directory | |
116 | ||
117 | +obj-$(CONFIG_ET131X) += et131x/ | |
118 | diff --git a/drivers/staging/et131x/Kconfig b/drivers/staging/et131x/Kconfig | |
119 | new file mode 100644 | |
120 | index 0000000..e11cf34 | |
121 | --- /dev/null | |
122 | +++ b/drivers/staging/et131x/Kconfig | |
123 | @@ -0,0 +1,18 @@ | |
124 | +config ET131X | |
125 | + tristate "Agere ET-1310 Gigabit Ethernet support" | |
126 | + depends on NETDEV_1000 && PCI | |
127 | + default n | |
128 | + ---help--- | |
129 | + This driver supports Agere ET-1310 ethernet adapters. | |
130 | + | |
131 | + To compile this driver as a module, choose M here. The module | |
132 | + will be called et131x. | |
133 | + | |
134 | +config ET131X_DEBUG | |
135 | + bool "Enable et131x debugging" | |
136 | + depends on ET131X | |
137 | + default n | |
138 | + ---help--- | |
139 | + Say Y for detailed debug information. | |
140 | + | |
141 | + If in doubt, say N. | |
142 | diff --git a/drivers/staging/et131x/Makefile b/drivers/staging/et131x/Makefile | |
143 | new file mode 100644 | |
144 | index 0000000..3ad571d | |
145 | --- /dev/null | |
146 | +++ b/drivers/staging/et131x/Makefile | |
147 | @@ -0,0 +1,18 @@ | |
148 | +# | |
149 | +# Makefile for the Agere ET-131x ethernet driver | |
150 | +# | |
151 | + | |
152 | +obj-$(CONFIG_ET131X) += et131x.o | |
153 | + | |
154 | +et131x-objs := et1310_eeprom.o \ | |
155 | + et1310_jagcore.o \ | |
156 | + et1310_mac.o \ | |
157 | + et1310_phy.o \ | |
158 | + et1310_pm.o \ | |
159 | + et1310_rx.o \ | |
160 | + et1310_tx.o \ | |
161 | + et131x_config.o \ | |
162 | + et131x_debug.o \ | |
163 | + et131x_initpci.o \ | |
164 | + et131x_isr.o \ | |
165 | + et131x_netdev.o | |
166 | diff --git a/drivers/staging/et131x/README b/drivers/staging/et131x/README | |
167 | new file mode 100644 | |
168 | index 0000000..28752a5 | |
169 | --- /dev/null | |
170 | +++ b/drivers/staging/et131x/README | |
171 | @@ -0,0 +1,25 @@ | |
172 | +This is a driver for the ET1310 network device. | |
173 | + | |
174 | +Based on the driver found at https://sourceforge.net/projects/et131x/ | |
175 | + | |
176 | +Cleaned up immensely by Olaf Hartman <o.hartmann@telovital.com> and Christoph | |
177 | +Hellwig <hch@infradead.org> | |
178 | + | |
179 | +Note, the powermanagement options were removed from the vendor provided | |
180 | +driver as they did not build properly at the time. | |
181 | + | |
182 | +TODO: | |
183 | + - kernel coding style cleanups | |
184 | + - forward port for latest network driver changes | |
185 | + - kill useless typecasts (e.g. in et1310_phy.c) | |
186 | + - alloc_etherdev is initializing memory with zero?!? | |
187 | + - add_timer call in et131x_netdev.c is correct? | |
188 | + - Add power saving functionality (suspend, sleep, resume) | |
189 | + - Implement a few more kernel Parameter (set mac ) | |
190 | + | |
191 | +Please send patches to: | |
192 | + Greg Kroah-Hartman <gregkh@suse.de> | |
193 | + | |
194 | +And Cc: Olaf Hartmann <o.hartmann@telovital.com> as he has this device and can | |
195 | +test any changes. | |
196 | + | |
197 | diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h | |
198 | new file mode 100644 | |
199 | index 0000000..3c85999 | |
200 | --- /dev/null | |
201 | +++ b/drivers/staging/et131x/et1310_address_map.h | |
202 | @@ -0,0 +1,2399 @@ | |
203 | +/* | |
204 | + * Agere Systems Inc. | |
205 | + * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs | |
206 | + * | |
207 |