aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mac8390.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-13 13:24:59 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-13 13:24:59 -0400
commit6aa20a2235535605db6d6d2bd850298b2fe7f31e (patch)
treedf0b855043407b831d57f2f2c271f8aab48444f4 /drivers/net/mac8390.c
parent7a291083225af6e22ffaa46b3d91cfc1a1ccaab4 (diff)
drivers/net: Trim trailing whitespace
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/mac8390.c')
-rw-r--r--drivers/net/mac8390.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c
index 06cb460361a8..ade6ff852e1a 100644
--- a/drivers/net/mac8390.c
+++ b/drivers/net/mac8390.c
@@ -7,12 +7,12 @@
7 This software may be used and distributed according to the terms of 7 This software may be used and distributed according to the terms of
8 the GNU Public License, incorporated herein by reference. */ 8 the GNU Public License, incorporated herein by reference. */
9 9
10/* 2000-02-28: support added for Dayna and Kinetics cards by 10/* 2000-02-28: support added for Dayna and Kinetics cards by
11 A.G.deWijn@phys.uu.nl */ 11 A.G.deWijn@phys.uu.nl */
12/* 2000-04-04: support added for Dayna2 by bart@etpmod.phys.tue.nl */ 12/* 2000-04-04: support added for Dayna2 by bart@etpmod.phys.tue.nl */
13/* 2001-04-18: support for DaynaPort E/LC-M by rayk@knightsmanor.org */ 13/* 2001-04-18: support for DaynaPort E/LC-M by rayk@knightsmanor.org */
14/* 2001-05-15: support for Cabletron ported from old daynaport driver 14/* 2001-05-15: support for Cabletron ported from old daynaport driver
15 * and fixed access to Sonic Sys card which masquerades as a Farallon 15 * and fixed access to Sonic Sys card which masquerades as a Farallon
16 * by rayk@knightsmanor.org */ 16 * by rayk@knightsmanor.org */
17 17
18#include <linux/module.h> 18#include <linux/module.h>
@@ -55,7 +55,7 @@
55#define KINETICS_8390_BASE 0x80000 55#define KINETICS_8390_BASE 0x80000
56#define KINETICS_8390_MEM 0x00000 56#define KINETICS_8390_MEM 0x00000
57 57
58#define CABLETRON_8390_BASE 0x90000 58#define CABLETRON_8390_BASE 0x90000
59#define CABLETRON_8390_MEM 0x00000 59#define CABLETRON_8390_MEM 0x00000
60 60
61enum mac8390_type { 61enum mac8390_type {
@@ -118,7 +118,7 @@ static int useresources[] = {
118 118
119static char version[] __initdata = 119static char version[] __initdata =
120 "mac8390.c: v0.4 2001-05-15 David Huggins-Daines <dhd@debian.org> and others\n"; 120 "mac8390.c: v0.4 2001-05-15 David Huggins-Daines <dhd@debian.org> and others\n";
121 121
122extern enum mac8390_type mac8390_ident(struct nubus_dev * dev); 122extern enum mac8390_type mac8390_ident(struct nubus_dev * dev);
123extern int mac8390_memsize(unsigned long membase); 123extern int mac8390_memsize(unsigned long membase);
124extern int mac8390_memtest(struct net_device * dev); 124extern int mac8390_memtest(struct net_device * dev);
@@ -168,7 +168,7 @@ enum mac8390_type __init mac8390_ident(struct nubus_dev * dev)
168{ 168{
169 if (dev->dr_sw == NUBUS_DRSW_ASANTE) 169 if (dev->dr_sw == NUBUS_DRSW_ASANTE)
170 return MAC8390_ASANTE; 170 return MAC8390_ASANTE;
171 if (dev->dr_sw == NUBUS_DRSW_FARALLON) 171 if (dev->dr_sw == NUBUS_DRSW_FARALLON)
172 return MAC8390_FARALLON; 172 return MAC8390_FARALLON;
173 if (dev->dr_sw == NUBUS_DRSW_KINETICS) 173 if (dev->dr_sw == NUBUS_DRSW_KINETICS)
174 return MAC8390_KINETICS; 174 return MAC8390_KINETICS;
@@ -187,7 +187,7 @@ int __init mac8390_memsize(unsigned long membase)
187{ 187{
188 unsigned long flags; 188 unsigned long flags;
189 int i, j; 189 int i, j;
190 190
191 local_irq_save(flags); 191 local_irq_save(flags);
192 /* Check up to 32K in 4K increments */ 192 /* Check up to 32K in 4K increments */
193 for (i = 0; i < 8; i++) { 193 for (i = 0; i < 8; i++) {
@@ -197,7 +197,7 @@ int __init mac8390_memsize(unsigned long membase)
197 RAM end located */ 197 RAM end located */
198 if (hwreg_present(m) == 0) 198 if (hwreg_present(m) == 0)
199 break; 199 break;
200 200
201 /* write a distinctive byte */ 201 /* write a distinctive byte */
202 *m = 0xA5A0 | i; 202 *m = 0xA5A0 | i;
203 /* check that we read back what we wrote */ 203 /* check that we read back what we wrote */
@@ -224,7 +224,7 @@ struct net_device * __init mac8390_probe(int unit)
224 int version_disp = 0; 224 int version_disp = 0;
225 struct nubus_dev * ndev = NULL; 225 struct nubus_dev * ndev = NULL;
226 int err = -ENODEV; 226 int err = -ENODEV;
227 227
228 struct nubus_dir dir; 228 struct nubus_dir dir;
229 struct nubus_dirent ent; 229 struct nubus_dirent ent;
230 int offset; 230 int offset;
@@ -273,7 +273,7 @@ struct net_device * __init mac8390_probe(int unit)
273 dev->name, ndev->board->slot); 273 dev->name, ndev->board->slot);
274 continue; 274 continue;
275 } 275 }
276 276
277 /* Get the MAC address */ 277 /* Get the MAC address */
278 if ((nubus_find_rsrc(&dir, NUBUS_RESID_MAC_ADDRESS, &ent)) == -1) { 278 if ((nubus_find_rsrc(&dir, NUBUS_RESID_MAC_ADDRESS, &ent)) == -1) {
279 printk(KERN_INFO "%s: Couldn't get MAC address!\n", 279 printk(KERN_INFO "%s: Couldn't get MAC address!\n",
@@ -282,7 +282,7 @@ struct net_device * __init mac8390_probe(int unit)
282 } else { 282 } else {
283 nubus_get_rsrc_mem(dev->dev_addr, &ent, 6); 283 nubus_get_rsrc_mem(dev->dev_addr, &ent, 6);
284 /* Some Sonic Sys cards masquerade as Farallon */ 284 /* Some Sonic Sys cards masquerade as Farallon */
285 if (cardtype == MAC8390_FARALLON && 285 if (cardtype == MAC8390_FARALLON &&
286 dev->dev_addr[0] == 0x0 && 286 dev->dev_addr[0] == 0x0 &&
287 dev->dev_addr[1] == 0x40 && 287 dev->dev_addr[1] == 0x40 &&
288 dev->dev_addr[2] == 0x10) { 288 dev->dev_addr[2] == 0x10) {
@@ -290,7 +290,7 @@ struct net_device * __init mac8390_probe(int unit)
290 cardtype = MAC8390_SONICSYS; 290 cardtype = MAC8390_SONICSYS;
291 } 291 }
292 } 292 }
293 293
294 if (useresources[cardtype] == 1) { 294 if (useresources[cardtype] == 1) {
295 nubus_rewinddir(&dir); 295 nubus_rewinddir(&dir);
296 if (nubus_find_rsrc(&dir, NUBUS_RESID_MINOR_BASEOS, &ent) == -1) { 296 if (nubus_find_rsrc(&dir, NUBUS_RESID_MINOR_BASEOS, &ent) == -1) {
@@ -318,10 +318,10 @@ struct net_device * __init mac8390_probe(int unit)
318 switch (cardtype) { 318 switch (cardtype) {
319 case MAC8390_KINETICS: 319 case MAC8390_KINETICS:
320 case MAC8390_DAYNA: /* it's the same */ 320 case MAC8390_DAYNA: /* it's the same */
321 dev->base_addr = 321 dev->base_addr =
322 (int)(ndev->board->slot_addr + 322 (int)(ndev->board->slot_addr +
323 DAYNA_8390_BASE); 323 DAYNA_8390_BASE);
324 dev->mem_start = 324 dev->mem_start =
325 (int)(ndev->board->slot_addr + 325 (int)(ndev->board->slot_addr +
326 DAYNA_8390_MEM); 326 DAYNA_8390_MEM);
327 dev->mem_end = 327 dev->mem_end =
@@ -343,11 +343,11 @@ struct net_device * __init mac8390_probe(int unit)
343 */ 343 */
344 i = (void *)dev->base_addr; 344 i = (void *)dev->base_addr;
345 *i = 0x21; 345 *i = 0x21;
346 dev->mem_end = 346 dev->mem_end =
347 dev->mem_start + 347 dev->mem_start +
348 mac8390_memsize(dev->mem_start); 348 mac8390_memsize(dev->mem_start);
349 break; 349 break;
350 350
351 default: 351 default:
352 printk(KERN_ERR "Card type %s is" 352 printk(KERN_ERR "Card type %s is"
353 " unsupported, sorry\n", 353 " unsupported, sorry\n",
@@ -433,7 +433,7 @@ static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * nd
433 }; 433 };
434 434
435 int access_bitmode; 435 int access_bitmode;
436 436
437 /* Now fill in our stuff */ 437 /* Now fill in our stuff */
438 dev->open = &mac8390_open; 438 dev->open = &mac8390_open;
439 dev->stop = &mac8390_close; 439 dev->stop = &mac8390_close;
@@ -459,7 +459,7 @@ static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * nd
459 ei_status.rmem_start = dev->mem_start + TX_PAGES*256; 459 ei_status.rmem_start = dev->mem_start + TX_PAGES*256;
460 ei_status.rmem_end = dev->mem_end; 460 ei_status.rmem_end = dev->mem_end;
461 } 461 }
462 462
463 /* Fill in model-specific information and functions */ 463 /* Fill in model-specific information and functions */
464 switch(type) { 464 switch(type) {
465 case MAC8390_SONICSYS: 465 case MAC8390_SONICSYS:
@@ -509,7 +509,7 @@ static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * nd
509 printk(KERN_ERR "Card type %s is unsupported, sorry\n", cardname[type]); 509 printk(KERN_ERR "Card type %s is unsupported, sorry\n", cardname[type]);
510 return -ENODEV; 510 return -ENODEV;
511 } 511 }
512 512
513 NS8390_init(dev, 0); 513 NS8390_init(dev, 0);
514 514
515 /* Good, done, now spit out some messages */ 515 /* Good, done, now spit out some messages */
@@ -525,7 +525,7 @@ static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * nd
525 } 525 }
526 } 526 }
527 printk(" IRQ %d, shared memory at %#lx-%#lx, %d-bit access.\n", 527 printk(" IRQ %d, shared memory at %#lx-%#lx, %d-bit access.\n",
528 dev->irq, dev->mem_start, dev->mem_end-1, 528 dev->irq, dev->mem_start, dev->mem_end-1,
529 access_bitmode?32:16); 529 access_bitmode?32:16);
530 return 0; 530 return 0;
531} 531}
@@ -536,7 +536,7 @@ static int mac8390_open(struct net_device *dev)
536 if (request_irq(dev->irq, ei_interrupt, 0, "8390 Ethernet", dev)) { 536 if (request_irq(dev->irq, ei_interrupt, 0, "8390 Ethernet", dev)) {
537 printk ("%s: unable to get IRQ %d.\n", dev->name, dev->irq); 537 printk ("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
538 return -EAGAIN; 538 return -EAGAIN;
539 } 539 }
540 return 0; 540 return 0;
541} 541}
542 542
@@ -639,7 +639,7 @@ static void sane_block_output(struct net_device *dev, int count,
639 const unsigned char *buf, int start_page) 639 const unsigned char *buf, int start_page)
640{ 640{
641 long shmem = (start_page - WD_START_PG)<<8; 641 long shmem = (start_page - WD_START_PG)<<8;
642 642
643 memcpy_toio((char *)dev->mem_start + shmem, buf, count); 643 memcpy_toio((char *)dev->mem_start + shmem, buf, count);
644} 644}
645 645
@@ -681,12 +681,12 @@ static void dayna_block_output(struct net_device *dev, int count, const unsigned
681 int start_page) 681 int start_page)
682{ 682{
683 long shmem = (start_page - WD_START_PG)<<8; 683 long shmem = (start_page - WD_START_PG)<<8;
684 684
685 dayna_memcpy_tocard(dev, shmem, buf, count); 685 dayna_memcpy_tocard(dev, shmem, buf, count);
686} 686}
687 687
688/* Cabletron block I/O */ 688/* Cabletron block I/O */
689static void slow_sane_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, 689static void slow_sane_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
690 int ring_page) 690 int ring_page)
691{ 691{
692 unsigned long hdr_start = (ring_page - WD_START_PG)<<8; 692 unsigned long hdr_start = (ring_page - WD_START_PG)<<8;
@@ -750,4 +750,4 @@ static void word_memcpy_fromcard(void *tp, const void *fp, int count)
750 *to++=*from++; 750 *to++=*from++;
751} 751}
752 752
753 753