diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 2 | ||||
-rw-r--r-- | arch/c6x/kernel/soc.c | 2 | ||||
-rw-r--r-- | arch/m68k/include/asm/mcf8390.h (renamed from arch/m68k/include/asm/mcfne.h) | 137 | ||||
-rw-r--r-- | arch/mips/ar7/platform.c | 4 | ||||
-rw-r--r-- | arch/mips/powertv/powertv_setup.c | 6 | ||||
-rw-r--r-- | arch/sparc/net/bpf_jit_comp.c | 4 | ||||
-rw-r--r-- | arch/um/drivers/net_kern.c | 2 | ||||
-rw-r--r-- | arch/x86/net/bpf_jit_comp.c | 4 |
8 files changed, 29 insertions, 132 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index c9d9473a5ab2..5ed654ae66e1 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -873,7 +873,7 @@ static struct adf702x_platform_data adf7021_platform_data = { | |||
873 | }; | 873 | }; |
874 | static inline void adf702x_mac_init(void) | 874 | static inline void adf702x_mac_init(void) |
875 | { | 875 | { |
876 | random_ether_addr(adf7021_platform_data.mac_addr); | 876 | eth_random_addr(adf7021_platform_data.mac_addr); |
877 | } | 877 | } |
878 | #else | 878 | #else |
879 | static inline void adf702x_mac_init(void) {} | 879 | static inline void adf702x_mac_init(void) {} |
diff --git a/arch/c6x/kernel/soc.c b/arch/c6x/kernel/soc.c index 0748c94ebef6..3ac74080fded 100644 --- a/arch/c6x/kernel/soc.c +++ b/arch/c6x/kernel/soc.c | |||
@@ -80,7 +80,7 @@ int soc_mac_addr(unsigned int index, u8 *addr) | |||
80 | if (have_fuse_mac) | 80 | if (have_fuse_mac) |
81 | memcpy(addr, c6x_fuse_mac, 6); | 81 | memcpy(addr, c6x_fuse_mac, 6); |
82 | else | 82 | else |
83 | random_ether_addr(addr); | 83 | eth_random_addr(addr); |
84 | } | 84 | } |
85 | 85 | ||
86 | /* adjust for specific EMAC device */ | 86 | /* adjust for specific EMAC device */ |
diff --git a/arch/m68k/include/asm/mcfne.h b/arch/m68k/include/asm/mcf8390.h index bf638be0958c..a72a20819a54 100644 --- a/arch/m68k/include/asm/mcfne.h +++ b/arch/m68k/include/asm/mcf8390.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /****************************************************************************/ | 1 | /****************************************************************************/ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * mcfne.h -- NE2000 in ColdFire eval boards. | 4 | * mcf8390.h -- NS8390 support for ColdFire eval boards. |
5 | * | 5 | * |
6 | * (C) Copyright 1999-2000, Greg Ungerer (gerg@snapgear.com) | 6 | * (C) Copyright 1999-2000, Greg Ungerer (gerg@snapgear.com) |
7 | * (C) Copyright 2000, Lineo (www.lineo.com) | 7 | * (C) Copyright 2000, Lineo (www.lineo.com) |
@@ -14,8 +14,8 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | /****************************************************************************/ | 16 | /****************************************************************************/ |
17 | #ifndef mcfne_h | 17 | #ifndef mcf8390_h |
18 | #define mcfne_h | 18 | #define mcf8390_h |
19 | /****************************************************************************/ | 19 | /****************************************************************************/ |
20 | 20 | ||
21 | 21 | ||
@@ -37,6 +37,7 @@ | |||
37 | #if defined(CONFIG_ARN5206) | 37 | #if defined(CONFIG_ARN5206) |
38 | #define NE2000_ADDR 0x40000300 | 38 | #define NE2000_ADDR 0x40000300 |
39 | #define NE2000_ODDOFFSET 0x00010000 | 39 | #define NE2000_ODDOFFSET 0x00010000 |
40 | #define NE2000_ADDRSIZE 0x00020000 | ||
40 | #define NE2000_IRQ_VECTOR 0xf0 | 41 | #define NE2000_IRQ_VECTOR 0xf0 |
41 | #define NE2000_IRQ_PRIORITY 2 | 42 | #define NE2000_IRQ_PRIORITY 2 |
42 | #define NE2000_IRQ_LEVEL 4 | 43 | #define NE2000_IRQ_LEVEL 4 |
@@ -46,6 +47,7 @@ | |||
46 | #if defined(CONFIG_M5206eC3) | 47 | #if defined(CONFIG_M5206eC3) |
47 | #define NE2000_ADDR 0x40000300 | 48 | #define NE2000_ADDR 0x40000300 |
48 | #define NE2000_ODDOFFSET 0x00010000 | 49 | #define NE2000_ODDOFFSET 0x00010000 |
50 | #define NE2000_ADDRSIZE 0x00020000 | ||
49 | #define NE2000_IRQ_VECTOR 0x1c | 51 | #define NE2000_IRQ_VECTOR 0x1c |
50 | #define NE2000_IRQ_PRIORITY 2 | 52 | #define NE2000_IRQ_PRIORITY 2 |
51 | #define NE2000_IRQ_LEVEL 4 | 53 | #define NE2000_IRQ_LEVEL 4 |
@@ -54,6 +56,7 @@ | |||
54 | 56 | ||
55 | #if defined(CONFIG_M5206e) && defined(CONFIG_NETtel) | 57 | #if defined(CONFIG_M5206e) && defined(CONFIG_NETtel) |
56 | #define NE2000_ADDR 0x30000300 | 58 | #define NE2000_ADDR 0x30000300 |
59 | #define NE2000_ADDRSIZE 0x00001000 | ||
57 | #define NE2000_IRQ_VECTOR 25 | 60 | #define NE2000_IRQ_VECTOR 25 |
58 | #define NE2000_IRQ_PRIORITY 1 | 61 | #define NE2000_IRQ_PRIORITY 1 |
59 | #define NE2000_IRQ_LEVEL 3 | 62 | #define NE2000_IRQ_LEVEL 3 |
@@ -63,6 +66,7 @@ | |||
63 | #if defined(CONFIG_M5307C3) | 66 | #if defined(CONFIG_M5307C3) |
64 | #define NE2000_ADDR 0x40000300 | 67 | #define NE2000_ADDR 0x40000300 |
65 | #define NE2000_ODDOFFSET 0x00010000 | 68 | #define NE2000_ODDOFFSET 0x00010000 |
69 | #define NE2000_ADDRSIZE 0x00020000 | ||
66 | #define NE2000_IRQ_VECTOR 0x1b | 70 | #define NE2000_IRQ_VECTOR 0x1b |
67 | #define NE2000_BYTE volatile unsigned short | 71 | #define NE2000_BYTE volatile unsigned short |
68 | #endif | 72 | #endif |
@@ -70,6 +74,7 @@ | |||
70 | #if defined(CONFIG_M5272) && defined(CONFIG_NETtel) | 74 | #if defined(CONFIG_M5272) && defined(CONFIG_NETtel) |
71 | #define NE2000_ADDR 0x30600300 | 75 | #define NE2000_ADDR 0x30600300 |
72 | #define NE2000_ODDOFFSET 0x00008000 | 76 | #define NE2000_ODDOFFSET 0x00008000 |
77 | #define NE2000_ADDRSIZE 0x00010000 | ||
73 | #define NE2000_IRQ_VECTOR 67 | 78 | #define NE2000_IRQ_VECTOR 67 |
74 | #undef BSWAP | 79 | #undef BSWAP |
75 | #define BSWAP(w) (w) | 80 | #define BSWAP(w) (w) |
@@ -82,6 +87,7 @@ | |||
82 | #define NE2000_ADDR0 0x30600300 | 87 | #define NE2000_ADDR0 0x30600300 |
83 | #define NE2000_ADDR1 0x30800300 | 88 | #define NE2000_ADDR1 0x30800300 |
84 | #define NE2000_ODDOFFSET 0x00008000 | 89 | #define NE2000_ODDOFFSET 0x00008000 |
90 | #define NE2000_ADDRSIZE 0x00010000 | ||
85 | #define NE2000_IRQ_VECTOR0 27 | 91 | #define NE2000_IRQ_VECTOR0 27 |
86 | #define NE2000_IRQ_VECTOR1 29 | 92 | #define NE2000_IRQ_VECTOR1 29 |
87 | #undef BSWAP | 93 | #undef BSWAP |
@@ -94,6 +100,7 @@ | |||
94 | #if defined(CONFIG_M5307) && defined(CONFIG_SECUREEDGEMP3) | 100 | #if defined(CONFIG_M5307) && defined(CONFIG_SECUREEDGEMP3) |
95 | #define NE2000_ADDR 0x30600300 | 101 | #define NE2000_ADDR 0x30600300 |
96 | #define NE2000_ODDOFFSET 0x00008000 | 102 | #define NE2000_ODDOFFSET 0x00008000 |
103 | #define NE2000_ADDRSIZE 0x00010000 | ||
97 | #define NE2000_IRQ_VECTOR 27 | 104 | #define NE2000_IRQ_VECTOR 27 |
98 | #undef BSWAP | 105 | #undef BSWAP |
99 | #define BSWAP(w) (w) | 106 | #define BSWAP(w) (w) |
@@ -105,6 +112,7 @@ | |||
105 | #if defined(CONFIG_ARN5307) | 112 | #if defined(CONFIG_ARN5307) |
106 | #define NE2000_ADDR 0xfe600300 | 113 | #define NE2000_ADDR 0xfe600300 |
107 | #define NE2000_ODDOFFSET 0x00010000 | 114 | #define NE2000_ODDOFFSET 0x00010000 |
115 | #define NE2000_ADDRSIZE 0x00020000 | ||
108 | #define NE2000_IRQ_VECTOR 0x1b | 116 | #define NE2000_IRQ_VECTOR 0x1b |
109 | #define NE2000_IRQ_PRIORITY 2 | 117 | #define NE2000_IRQ_PRIORITY 2 |
110 | #define NE2000_IRQ_LEVEL 3 | 118 | #define NE2000_IRQ_LEVEL 3 |
@@ -114,129 +122,10 @@ | |||
114 | #if defined(CONFIG_M5407C3) | 122 | #if defined(CONFIG_M5407C3) |
115 | #define NE2000_ADDR 0x40000300 | 123 | #define NE2000_ADDR 0x40000300 |
116 | #define NE2000_ODDOFFSET 0x00010000 | 124 | #define NE2000_ODDOFFSET 0x00010000 |
125 | #define NE2000_ADDRSIZE 0x00020000 | ||
117 | #define NE2000_IRQ_VECTOR 0x1b | 126 | #define NE2000_IRQ_VECTOR 0x1b |
118 | #define NE2000_BYTE volatile unsigned short | 127 | #define NE2000_BYTE volatile unsigned short |
119 | #endif | 128 | #endif |
120 | 129 | ||
121 | /****************************************************************************/ | 130 | /****************************************************************************/ |
122 | 131 | #endif /* mcf8390_h */ | |
123 | /* | ||
124 | * Side-band address space for odd address requires re-mapping | ||
125 | * many of the standard ISA access functions. | ||
126 | */ | ||
127 | #ifdef NE2000_ODDOFFSET | ||
128 | |||
129 | #undef outb | ||
130 | #undef outb_p | ||
131 | #undef inb | ||
132 | #undef inb_p | ||
133 | #undef outsb | ||
134 | #undef outsw | ||
135 | #undef insb | ||
136 | #undef insw | ||
137 | |||
138 | #define outb ne2000_outb | ||
139 | #define inb ne2000_inb | ||
140 | #define outb_p ne2000_outb | ||
141 | #define inb_p ne2000_inb | ||
142 | #define outsb ne2000_outsb | ||
143 | #define outsw ne2000_outsw | ||
144 | #define insb ne2000_insb | ||
145 | #define insw ne2000_insw | ||
146 | |||
147 | |||
148 | #ifndef COLDFIRE_NE2000_FUNCS | ||
149 | |||
150 | void ne2000_outb(unsigned int val, unsigned int addr); | ||
151 | int ne2000_inb(unsigned int addr); | ||
152 | void ne2000_insb(unsigned int addr, void *vbuf, int unsigned long len); | ||
153 | void ne2000_insw(unsigned int addr, void *vbuf, unsigned long len); | ||
154 | void ne2000_outsb(unsigned int addr, void *vbuf, unsigned long len); | ||
155 | void ne2000_outsw(unsigned int addr, void *vbuf, unsigned long len); | ||
156 | |||
157 | #else | ||
158 | |||
159 | /* | ||
160 | * This macro converts a conventional register address into the | ||
161 | * real memory pointer of the mapped NE2000 device. | ||
162 | * On most NE2000 implementations on ColdFire boards the chip is | ||
163 | * mapped in kinda funny, due to its ISA heritage. | ||
164 | */ | ||
165 | #define NE2000_PTR(addr) ((addr&0x1)?(NE2000_ODDOFFSET+addr-1):(addr)) | ||
166 | #define NE2000_DATA_PTR(addr) (addr) | ||
167 | |||
168 | |||
169 | void ne2000_outb(unsigned int val, unsigned int addr) | ||
170 | { | ||
171 | NE2000_BYTE *rp; | ||
172 | |||
173 | rp = (NE2000_BYTE *) NE2000_PTR(addr); | ||
174 | *rp = RSWAP(val); | ||
175 | } | ||
176 | |||
177 | int ne2000_inb(unsigned int addr) | ||
178 | { | ||
179 | NE2000_BYTE *rp, val; | ||
180 | |||
181 | rp = (NE2000_BYTE *) NE2000_PTR(addr); | ||
182 | val = *rp; | ||
183 | return((int) ((NE2000_BYTE) RSWAP(val))); | ||
184 | } | ||
185 | |||
186 | void ne2000_insb(unsigned int addr, void *vbuf, int unsigned long len) | ||
187 | { | ||
188 | NE2000_BYTE *rp, val; | ||
189 | unsigned char *buf; | ||
190 | |||
191 | buf = (unsigned char *) vbuf; | ||
192 | rp = (NE2000_BYTE *) NE2000_DATA_PTR(addr); | ||
193 | for (; (len > 0); len--) { | ||
194 | val = *rp; | ||
195 | *buf++ = RSWAP(val); | ||
196 | } | ||
197 | } | ||
198 | |||
199 | void ne2000_insw(unsigned int addr, void *vbuf, unsigned long len) | ||
200 | { | ||
201 | volatile unsigned short *rp; | ||
202 | unsigned short w, *buf; | ||
203 | |||
204 | buf = (unsigned short *) vbuf; | ||
205 | rp = (volatile unsigned short *) NE2000_DATA_PTR(addr); | ||
206 | for (; (len > 0); len--) { | ||
207 | w = *rp; | ||
208 | *buf++ = BSWAP(w); | ||
209 | } | ||
210 | } | ||
211 | |||
212 | void ne2000_outsb(unsigned int addr, const void *vbuf, unsigned long len) | ||
213 | { | ||
214 | NE2000_BYTE *rp, val; | ||
215 | unsigned char *buf; | ||
216 | |||
217 | buf = (unsigned char *) vbuf; | ||
218 | rp = (NE2000_BYTE *) NE2000_DATA_PTR(addr); | ||
219 | for (; (len > 0); len--) { | ||
220 | val = *buf++; | ||
221 | *rp = RSWAP(val); | ||
222 | } | ||
223 | } | ||
224 | |||
225 | void ne2000_outsw(unsigned int addr, const void *vbuf, unsigned long len) | ||
226 | { | ||
227 | volatile unsigned short *rp; | ||
228 | unsigned short w, *buf; | ||
229 | |||
230 | buf = (unsigned short *) vbuf; | ||
231 | rp = (volatile unsigned short *) NE2000_DATA_PTR(addr); | ||
232 | for (; (len > 0); len--) { | ||
233 | w = *buf++; | ||
234 | *rp = BSWAP(w); | ||
235 | } | ||
236 | } | ||
237 | |||
238 | #endif /* COLDFIRE_NE2000_FUNCS */ | ||
239 | #endif /* NE2000_OFFOFFSET */ | ||
240 | |||
241 | /****************************************************************************/ | ||
242 | #endif /* mcfne_h */ | ||
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index 1a24d317e7a3..1bbc24b08685 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c | |||
@@ -310,10 +310,10 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr) | |||
310 | &dev_addr[4], &dev_addr[5]) != 6) { | 310 | &dev_addr[4], &dev_addr[5]) != 6) { |
311 | pr_warning("cannot parse mac address, " | 311 | pr_warning("cannot parse mac address, " |
312 | "using random address\n"); | 312 | "using random address\n"); |
313 | random_ether_addr(dev_addr); | 313 | eth_random_addr(dev_addr); |
314 | } | 314 | } |
315 | } else | 315 | } else |
316 | random_ether_addr(dev_addr); | 316 | eth_random_addr(dev_addr); |
317 | } | 317 | } |
318 | 318 | ||
319 | /***************************************************************************** | 319 | /***************************************************************************** |
diff --git a/arch/mips/powertv/powertv_setup.c b/arch/mips/powertv/powertv_setup.c index 3933c373a438..820b8480f222 100644 --- a/arch/mips/powertv/powertv_setup.c +++ b/arch/mips/powertv/powertv_setup.c | |||
@@ -254,7 +254,7 @@ early_param("rfmac", rfmac_param); | |||
254 | * Generates an Ethernet MAC address that is highly likely to be unique for | 254 | * Generates an Ethernet MAC address that is highly likely to be unique for |
255 | * this particular system on a network with other systems of the same type. | 255 | * this particular system on a network with other systems of the same type. |
256 | * | 256 | * |
257 | * The problem we are solving is that, when random_ether_addr() is used to | 257 | * The problem we are solving is that, when eth_random_addr() is used to |
258 | * generate MAC addresses at startup, there isn't much entropy for the random | 258 | * generate MAC addresses at startup, there isn't much entropy for the random |
259 | * number generator to use and the addresses it produces are fairly likely to | 259 | * number generator to use and the addresses it produces are fairly likely to |
260 | * be the same as those of other identical systems on the same local network. | 260 | * be the same as those of other identical systems on the same local network. |
@@ -269,7 +269,7 @@ early_param("rfmac", rfmac_param); | |||
269 | * Still, this does give us something to work with. | 269 | * Still, this does give us something to work with. |
270 | * | 270 | * |
271 | * The approach we take is: | 271 | * The approach we take is: |
272 | * 1. If we can't get the RF MAC Address, just call random_ether_addr. | 272 | * 1. If we can't get the RF MAC Address, just call eth_random_addr. |
273 | * 2. Use the 24-bit NIC-specific bits of the RF MAC address as the last 24 | 273 | * 2. Use the 24-bit NIC-specific bits of the RF MAC address as the last 24 |
274 | * bits of the new address. This is very likely to be unique, except for | 274 | * bits of the new address. This is very likely to be unique, except for |
275 | * the current box. | 275 | * the current box. |
@@ -299,7 +299,7 @@ void platform_random_ether_addr(u8 addr[ETH_ALEN]) | |||
299 | if (!have_rfmac) { | 299 | if (!have_rfmac) { |
300 | pr_warning("rfmac not available on command line; " | 300 | pr_warning("rfmac not available on command line; " |
301 | "generating random MAC address\n"); | 301 | "generating random MAC address\n"); |
302 | random_ether_addr(addr); | 302 | eth_random_addr(addr); |
303 | } | 303 | } |
304 | 304 | ||
305 | else { | 305 | else { |
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c index 1a69244e785b..e9073e9501b3 100644 --- a/arch/sparc/net/bpf_jit_comp.c +++ b/arch/sparc/net/bpf_jit_comp.c | |||
@@ -96,6 +96,7 @@ static void bpf_flush_icache(void *start_, void *end_) | |||
96 | #define AND F3(2, 0x01) | 96 | #define AND F3(2, 0x01) |
97 | #define ANDCC F3(2, 0x11) | 97 | #define ANDCC F3(2, 0x11) |
98 | #define OR F3(2, 0x02) | 98 | #define OR F3(2, 0x02) |
99 | #define XOR F3(2, 0x03) | ||
99 | #define SUB F3(2, 0x04) | 100 | #define SUB F3(2, 0x04) |
100 | #define SUBCC F3(2, 0x14) | 101 | #define SUBCC F3(2, 0x14) |
101 | #define MUL F3(2, 0x0a) /* umul */ | 102 | #define MUL F3(2, 0x0a) /* umul */ |
@@ -462,6 +463,9 @@ void bpf_jit_compile(struct sk_filter *fp) | |||
462 | case BPF_S_ALU_OR_K: /* A |= K */ | 463 | case BPF_S_ALU_OR_K: /* A |= K */ |
463 | emit_alu_K(OR, K); | 464 | emit_alu_K(OR, K); |
464 | break; | 465 | break; |
466 | case BPF_S_ANC_ALU_XOR_X: /* A ^= X; */ | ||
467 | emit_alu_X(XOR); | ||
468 | break; | ||
465 | case BPF_S_ALU_LSH_X: /* A <<= X */ | 469 | case BPF_S_ALU_LSH_X: /* A <<= X */ |
466 | emit_alu_X(SLL); | 470 | emit_alu_X(SLL); |
467 | break; | 471 | break; |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 0d60c5685c26..458d324f062d 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -339,7 +339,7 @@ static int setup_etheraddr(char *str, unsigned char *addr, char *name) | |||
339 | random: | 339 | random: |
340 | printk(KERN_INFO | 340 | printk(KERN_INFO |
341 | "Choosing a random ethernet address for device %s\n", name); | 341 | "Choosing a random ethernet address for device %s\n", name); |
342 | random_ether_addr(addr); | 342 | eth_random_addr(addr); |
343 | return 1; | 343 | return 1; |
344 | } | 344 | } |
345 | 345 | ||
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index 0597f95b6da6..33643a8bcbbb 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c | |||
@@ -309,6 +309,10 @@ void bpf_jit_compile(struct sk_filter *fp) | |||
309 | else | 309 | else |
310 | EMIT1_off32(0x0d, K); /* or imm32,%eax */ | 310 | EMIT1_off32(0x0d, K); /* or imm32,%eax */ |
311 | break; | 311 | break; |
312 | case BPF_S_ANC_ALU_XOR_X: /* A ^= X; */ | ||
313 | seen |= SEEN_XREG; | ||
314 | EMIT2(0x31, 0xd8); /* xor %ebx,%eax */ | ||
315 | break; | ||
312 | case BPF_S_ALU_LSH_X: /* A <<= X; */ | 316 | case BPF_S_ALU_LSH_X: /* A <<= X; */ |
313 | seen |= SEEN_XREG; | 317 | seen |= SEEN_XREG; |
314 | EMIT4(0x89, 0xd9, 0xd3, 0xe0); /* mov %ebx,%ecx; shl %cl,%eax */ | 318 | EMIT4(0x89, 0xd9, 0xd3, 0xe0); /* mov %ebx,%ecx; shl %cl,%eax */ |