if_ed.c (1073) | if_ed.c (1075) |
---|---|
1/* 2 * Device driver for National Semiconductor DS8390/WD83C690 based ethernet 3 * adapters. By David Greenman, 29-April-1993 4 * 5 * Copyright (C) 1993, David Greenman. This software may be used, modified, 6 * copied, distributed, and sold, in both source and binary form provided 7 * that the above copyright and these terms are retained. Under no 8 * circumstances is the author responsible for the proper functioning --- 6 unchanged lines hidden (view full) --- 15 * 16 * Thanks to Charles Hannum for proving to me with example code that the 17 * NE1000/2000 support could be added with minimal impact. Without 18 * this, I wouldn't have proceeded in this direction. 19 * 20 */ 21 22/* | 1/* 2 * Device driver for National Semiconductor DS8390/WD83C690 based ethernet 3 * adapters. By David Greenman, 29-April-1993 4 * 5 * Copyright (C) 1993, David Greenman. This software may be used, modified, 6 * copied, distributed, and sold, in both source and binary form provided 7 * that the above copyright and these terms are retained. Under no 8 * circumstances is the author responsible for the proper functioning --- 6 unchanged lines hidden (view full) --- 15 * 16 * Thanks to Charles Hannum for proving to me with example code that the 17 * NE1000/2000 support could be added with minimal impact. Without 18 * this, I wouldn't have proceeded in this direction. 19 * 20 */ 21 22/* |
23 * $Id: if_ed.c,v 1.30 1994/01/31 07:34:20 davidg Exp $ | 23 * $Id: if_ed.c,v 1.31 1994/02/02 02:24:38 davidg Exp $ |
24 */ 25 26#include "ed.h" 27#if NED > 0 28/* bpfilter included here in case it is needed in future net includes */ 29#include "bpfilter.h" 30 31#include "param.h" --- 261 unchanged lines hidden (view full) --- 293 DELAY(5000); 294 295 sc->vendor = ED_VENDOR_WD_SMC; 296 sc->type = inb(sc->asic_addr + ED_WD_CARD_ID); 297 298 /* 299 * Set initial values for width/size. 300 */ | 24 */ 25 26#include "ed.h" 27#if NED > 0 28/* bpfilter included here in case it is needed in future net includes */ 29#include "bpfilter.h" 30 31#include "param.h" --- 261 unchanged lines hidden (view full) --- 293 DELAY(5000); 294 295 sc->vendor = ED_VENDOR_WD_SMC; 296 sc->type = inb(sc->asic_addr + ED_WD_CARD_ID); 297 298 /* 299 * Set initial values for width/size. 300 */ |
301 memsize = 8192; 302 isa16bit = 0; |
|
301 switch (sc->type) { 302 case ED_TYPE_WD8003S: 303 sc->type_str = "WD8003S"; | 303 switch (sc->type) { 304 case ED_TYPE_WD8003S: 305 sc->type_str = "WD8003S"; |
304 memsize = 8192; 305 isa16bit = 0; | |
306 break; 307 case ED_TYPE_WD8003E: 308 sc->type_str = "WD8003E"; | 306 break; 307 case ED_TYPE_WD8003E: 308 sc->type_str = "WD8003E"; |
309 memsize = 8192; 310 isa16bit = 0; | |
311 break; | 309 break; |
310 case ED_TYPE_WD8003EB: 311 sc->type_str = "WD8003EB"; 312 break; |
|
312 case ED_TYPE_WD8003W: 313 sc->type_str = "WD8003W"; | 313 case ED_TYPE_WD8003W: 314 sc->type_str = "WD8003W"; |
314 memsize = 8192; 315 isa16bit = 0; | |
316 break; 317 case ED_TYPE_WD8013EBT: 318 sc->type_str = "WD8013EBT"; 319 memsize = 16384; 320 isa16bit = 1; 321 break; 322 case ED_TYPE_WD8013W: 323 sc->type_str = "WD8013W"; 324 memsize = 16384; 325 isa16bit = 1; 326 break; 327 case ED_TYPE_WD8013EP: /* also WD8003EP */ 328 if (inb(sc->asic_addr + ED_WD_ICR) 329 & ED_WD_ICR_16BIT) { 330 isa16bit = 1; 331 memsize = 16384; 332 sc->type_str = "WD8013EP"; 333 } else { | 315 break; 316 case ED_TYPE_WD8013EBT: 317 sc->type_str = "WD8013EBT"; 318 memsize = 16384; 319 isa16bit = 1; 320 break; 321 case ED_TYPE_WD8013W: 322 sc->type_str = "WD8013W"; 323 memsize = 16384; 324 isa16bit = 1; 325 break; 326 case ED_TYPE_WD8013EP: /* also WD8003EP */ 327 if (inb(sc->asic_addr + ED_WD_ICR) 328 & ED_WD_ICR_16BIT) { 329 isa16bit = 1; 330 memsize = 16384; 331 sc->type_str = "WD8013EP"; 332 } else { |
334 isa16bit = 0; 335 memsize = 8192; | |
336 sc->type_str = "WD8003EP"; 337 } 338 break; 339 case ED_TYPE_WD8013WC: 340 sc->type_str = "WD8013WC"; 341 memsize = 16384; 342 isa16bit = 1; 343 break; --- 28 unchanged lines hidden (view full) --- 372 case ED_TYPE_TOSHIBA4: 373 sc->type_str = "Toshiba4"; 374 memsize = 32768; 375 isa16bit = 1; 376 break; 377#endif 378 default: 379 sc->type_str = ""; | 333 sc->type_str = "WD8003EP"; 334 } 335 break; 336 case ED_TYPE_WD8013WC: 337 sc->type_str = "WD8013WC"; 338 memsize = 16384; 339 isa16bit = 1; 340 break; --- 28 unchanged lines hidden (view full) --- 369 case ED_TYPE_TOSHIBA4: 370 sc->type_str = "Toshiba4"; 371 memsize = 32768; 372 isa16bit = 1; 373 break; 374#endif 375 default: 376 sc->type_str = ""; |
380 memsize = 8192; 381 isa16bit = 0; | |
382 break; 383 } 384 /* 385 * Make some adjustments to initial values depending on what is 386 * found in the ICR. 387 */ 388 if (isa16bit && (sc->type != ED_TYPE_WD8013EBT) 389#ifdef TOSH_ETHER --- 2071 unchanged lines hidden --- | 377 break; 378 } 379 /* 380 * Make some adjustments to initial values depending on what is 381 * found in the ICR. 382 */ 383 if (isa16bit && (sc->type != ED_TYPE_WD8013EBT) 384#ifdef TOSH_ETHER --- 2071 unchanged lines hidden --- |