aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/3c59x.c79
-rw-r--r--drivers/net/dl2k.h12
-rw-r--r--drivers/net/eepro100.c5
-rw-r--r--drivers/net/epic100.c20
-rw-r--r--drivers/net/fealnx.c10
-rw-r--r--drivers/net/pcnet32.c6
-rw-r--r--drivers/net/tulip/winbond-840.c26
-rw-r--r--drivers/net/yellowfin.c24
8 files changed, 58 insertions, 124 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index e27778926eba..b467c383ae60 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -375,8 +375,7 @@ limit of 4K.
375 of the drivers, and will likely be provided by some future kernel. 375 of the drivers, and will likely be provided by some future kernel.
376*/ 376*/
377enum pci_flags_bit { 377enum pci_flags_bit {
378 PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4, 378 PCI_USES_MASTER=4,
379 PCI_ADDR0=0x10<<0, PCI_ADDR1=0x10<<1, PCI_ADDR2=0x10<<2, PCI_ADDR3=0x10<<3,
380}; 379};
381 380
382enum { IS_VORTEX=1, IS_BOOMERANG=2, IS_CYCLONE=4, IS_TORNADO=8, 381enum { IS_VORTEX=1, IS_BOOMERANG=2, IS_CYCLONE=4, IS_TORNADO=8,
@@ -446,95 +445,95 @@ static struct vortex_chip_info {
446 int io_size; 445 int io_size;
447} vortex_info_tbl[] __devinitdata = { 446} vortex_info_tbl[] __devinitdata = {
448 {"3c590 Vortex 10Mbps", 447 {"3c590 Vortex 10Mbps",
449 PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, }, 448 PCI_USES_MASTER, IS_VORTEX, 32, },
450 {"3c592 EISA 10Mbps Demon/Vortex", /* AKPM: from Don's 3c59x_cb.c 0.49H */ 449 {"3c592 EISA 10Mbps Demon/Vortex", /* AKPM: from Don's 3c59x_cb.c 0.49H */
451 PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, }, 450 PCI_USES_MASTER, IS_VORTEX, 32, },
452 {"3c597 EISA Fast Demon/Vortex", /* AKPM: from Don's 3c59x_cb.c 0.49H */ 451 {"3c597 EISA Fast Demon/Vortex", /* AKPM: from Don's 3c59x_cb.c 0.49H */
453 PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, }, 452 PCI_USES_MASTER, IS_VORTEX, 32, },
454 {"3c595 Vortex 100baseTx", 453 {"3c595 Vortex 100baseTx",
455 PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, }, 454 PCI_USES_MASTER, IS_VORTEX, 32, },
456 {"3c595 Vortex 100baseT4", 455 {"3c595 Vortex 100baseT4",
457 PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, }, 456 PCI_USES_MASTER, IS_VORTEX, 32, },
458 457
459 {"3c595 Vortex 100base-MII", 458 {"3c595 Vortex 100base-MII",
460 PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, }, 459 PCI_USES_MASTER, IS_VORTEX, 32, },
461 {"3c900 Boomerang 10baseT", 460 {"3c900 Boomerang 10baseT",
462 PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|EEPROM_RESET, 64, }, 461 PCI_USES_MASTER, IS_BOOMERANG|EEPROM_RESET, 64, },
463 {"3c900 Boomerang 10Mbps Combo", 462 {"3c900 Boomerang 10Mbps Combo",
464 PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|EEPROM_RESET, 64, }, 463 PCI_USES_MASTER, IS_BOOMERANG|EEPROM_RESET, 64, },
465 {"3c900 Cyclone 10Mbps TPO", /* AKPM: from Don's 0.99M */ 464 {"3c900 Cyclone 10Mbps TPO", /* AKPM: from Don's 0.99M */
466 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, 465 PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
467 {"3c900 Cyclone 10Mbps Combo", 466 {"3c900 Cyclone 10Mbps Combo",
468 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, 467 PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
469 468
470 {"3c900 Cyclone 10Mbps TPC", /* AKPM: from Don's 0.99M */ 469 {"3c900 Cyclone 10Mbps TPC", /* AKPM: from Don's 0.99M */
471 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, 470 PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
472 {"3c900B-FL Cyclone 10base-FL", 471 {"3c900B-FL Cyclone 10base-FL",
473 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, 472 PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
474 {"3c905 Boomerang 100baseTx", 473 {"3c905 Boomerang 100baseTx",
475 PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, }, 474 PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, },
476 {"3c905 Boomerang 100baseT4", 475 {"3c905 Boomerang 100baseT4",
477 PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, }, 476 PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, },
478 {"3c905B Cyclone 100baseTx", 477 {"3c905B Cyclone 100baseTx",
479 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, 478 PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, },
480 479
481 {"3c905B Cyclone 10/100/BNC", 480 {"3c905B Cyclone 10/100/BNC",
482 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, 481 PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, },
483 {"3c905B-FX Cyclone 100baseFx", 482 {"3c905B-FX Cyclone 100baseFx",
484 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, 483 PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
485 {"3c905C Tornado", 484 {"3c905C Tornado",
486 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, 485 PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, },
487 {"3c920B-EMB-WNM (ATI Radeon 9100 IGP)", 486 {"3c920B-EMB-WNM (ATI Radeon 9100 IGP)",
488 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_MII|HAS_HWCKSM, 128, }, 487 PCI_USES_MASTER, IS_TORNADO|HAS_MII|HAS_HWCKSM, 128, },
489 {"3c980 Cyclone", 488 {"3c980 Cyclone",
490 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, 489 PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
491 490
492 {"3c980C Python-T", 491 {"3c980C Python-T",
493 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, 492 PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, },
494 {"3cSOHO100-TX Hurricane", 493 {"3cSOHO100-TX Hurricane",
495 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, 494 PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, },
496 {"3c555 Laptop Hurricane", 495 {"3c555 Laptop Hurricane",
497 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|EEPROM_8BIT|HAS_HWCKSM, 128, }, 496 PCI_USES_MASTER, IS_CYCLONE|EEPROM_8BIT|HAS_HWCKSM, 128, },
498 {"3c556 Laptop Tornado", 497 {"3c556 Laptop Tornado",
499 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|EEPROM_8BIT|HAS_CB_FNS|INVERT_MII_PWR| 498 PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|EEPROM_8BIT|HAS_CB_FNS|INVERT_MII_PWR|
500 HAS_HWCKSM, 128, }, 499 HAS_HWCKSM, 128, },
501 {"3c556B Laptop Hurricane", 500 {"3c556B Laptop Hurricane",
502 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|EEPROM_OFFSET|HAS_CB_FNS|INVERT_MII_PWR| 501 PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|EEPROM_OFFSET|HAS_CB_FNS|INVERT_MII_PWR|
503 WNO_XCVR_PWR|HAS_HWCKSM, 128, }, 502 WNO_XCVR_PWR|HAS_HWCKSM, 128, },
504 503
505 {"3c575 [Megahertz] 10/100 LAN CardBus", 504 {"3c575 [Megahertz] 10/100 LAN CardBus",
506 PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, }, 505 PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, },
507 {"3c575 Boomerang CardBus", 506 {"3c575 Boomerang CardBus",
508 PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, }, 507 PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, },
509 {"3CCFE575BT Cyclone CardBus", 508 {"3CCFE575BT Cyclone CardBus",
510 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT| 509 PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|
511 INVERT_LED_PWR|HAS_HWCKSM, 128, }, 510 INVERT_LED_PWR|HAS_HWCKSM, 128, },
512 {"3CCFE575CT Tornado CardBus", 511 {"3CCFE575CT Tornado CardBus",
513 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| 512 PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR|
514 MAX_COLLISION_RESET|HAS_HWCKSM, 128, }, 513 MAX_COLLISION_RESET|HAS_HWCKSM, 128, },
515 {"3CCFE656 Cyclone CardBus", 514 {"3CCFE656 Cyclone CardBus",
516 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| 515 PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR|
517 INVERT_LED_PWR|HAS_HWCKSM, 128, }, 516 INVERT_LED_PWR|HAS_HWCKSM, 128, },
518 517
519 {"3CCFEM656B Cyclone+Winmodem CardBus", 518 {"3CCFEM656B Cyclone+Winmodem CardBus",
520 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| 519 PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR|
521 INVERT_LED_PWR|HAS_HWCKSM, 128, }, 520 INVERT_LED_PWR|HAS_HWCKSM, 128, },
522 {"3CXFEM656C Tornado+Winmodem CardBus", /* From pcmcia-cs-3.1.5 */ 521 {"3CXFEM656C Tornado+Winmodem CardBus", /* From pcmcia-cs-3.1.5 */
523 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| 522 PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR|
524 MAX_COLLISION_RESET|HAS_HWCKSM, 128, }, 523 MAX_COLLISION_RESET|HAS_HWCKSM, 128, },
525 {"3c450 HomePNA Tornado", /* AKPM: from Don's 0.99Q */ 524 {"3c450 HomePNA Tornado", /* AKPM: from Don's 0.99Q */
526 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, 525 PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
527 {"3c920 Tornado", 526 {"3c920 Tornado",
528 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, 527 PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
529 {"3c982 Hydra Dual Port A", 528 {"3c982 Hydra Dual Port A",
530 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, 529 PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, },
531 530
532 {"3c982 Hydra Dual Port B", 531 {"3c982 Hydra Dual Port B",
533 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, 532 PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, },
534 {"3c905B-T4", 533 {"3c905B-T4",
535 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, 534 PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, },
536 {"3c920B-EMB-WNM Tornado", 535 {"3c920B-EMB-WNM Tornado",
537 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, 536 PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
538 537
539 {NULL,}, /* NULL terminated list. */ 538 {NULL,}, /* NULL terminated list. */
540}; 539};
diff --git a/drivers/net/dl2k.h b/drivers/net/dl2k.h
index 6e75482d75f2..53449207e53b 100644
--- a/drivers/net/dl2k.h
+++ b/drivers/net/dl2k.h
@@ -683,11 +683,6 @@ struct netdev_private {
683}; 683};
684 684
685/* The station address location in the EEPROM. */ 685/* The station address location in the EEPROM. */
686#ifdef MEM_MAPPING
687#define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_MEM | PCI_ADDR1)
688#else
689#define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_IO | PCI_ADDR0)
690#endif
691/* The struct pci_device_id consist of: 686/* The struct pci_device_id consist of:
692 vendor, device Vendor and device ID to match (or PCI_ANY_ID) 687 vendor, device Vendor and device ID to match (or PCI_ANY_ID)
693 subvendor, subdevice Subsystem vendor and device ID to match (or PCI_ANY_ID) 688 subvendor, subdevice Subsystem vendor and device ID to match (or PCI_ANY_ID)
@@ -695,9 +690,10 @@ struct netdev_private {
695 class_mask of the class are honored during the comparison. 690 class_mask of the class are honored during the comparison.
696 driver_data Data private to the driver. 691 driver_data Data private to the driver.
697*/ 692*/
698static struct pci_device_id rio_pci_tbl[] = { 693
699 {0x1186, 0x4000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 694static const struct pci_device_id rio_pci_tbl[] = {
700 {0,} 695 {0x1186, 0x4000, PCI_ANY_ID, PCI_ANY_ID, },
696 { }
701}; 697};
702MODULE_DEVICE_TABLE (pci, rio_pci_tbl); 698MODULE_DEVICE_TABLE (pci, rio_pci_tbl);
703#define TX_TIMEOUT (4*HZ) 699#define TX_TIMEOUT (4*HZ)
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index 467fc861360d..ecf5ad85a684 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -278,11 +278,6 @@ having to sign an Intel NDA when I'm helping Intel sell their own product!
278 278
279static int speedo_found1(struct pci_dev *pdev, void __iomem *ioaddr, int fnd_cnt, int acpi_idle_state); 279static int speedo_found1(struct pci_dev *pdev, void __iomem *ioaddr, int fnd_cnt, int acpi_idle_state);
280 280
281enum pci_flags_bit {
282 PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4,
283 PCI_ADDR0=0x10<<0, PCI_ADDR1=0x10<<1, PCI_ADDR2=0x10<<2, PCI_ADDR3=0x10<<3,
284};
285
286/* Offsets to the various registers. 281/* Offsets to the various registers.
287 All accesses need not be longword aligned. */ 282 All accesses need not be longword aligned. */
288enum speedo_offsets { 283enum speedo_offsets {
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
index 724d7dc35fa3..ee34a16eb4e2 100644
--- a/drivers/net/epic100.c
+++ b/drivers/net/epic100.c
@@ -191,23 +191,10 @@ IVc. Errata
191*/ 191*/
192 192
193 193
194enum pci_id_flags_bits {
195 /* Set PCI command register bits before calling probe1(). */
196 PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4,
197 /* Read and map the single following PCI BAR. */
198 PCI_ADDR0=0<<4, PCI_ADDR1=1<<4, PCI_ADDR2=2<<4, PCI_ADDR3=3<<4,
199 PCI_ADDR_64BITS=0x100, PCI_NO_ACPI_WAKE=0x200, PCI_NO_MIN_LATENCY=0x400,
200};
201
202enum chip_capability_flags { MII_PWRDWN=1, TYPE2_INTR=2, NO_MII=4 }; 194enum chip_capability_flags { MII_PWRDWN=1, TYPE2_INTR=2, NO_MII=4 };
203 195
204#define EPIC_TOTAL_SIZE 0x100 196#define EPIC_TOTAL_SIZE 0x100
205#define USE_IO_OPS 1 197#define USE_IO_OPS 1
206#ifdef USE_IO_OPS
207#define EPIC_IOTYPE PCI_USES_MASTER|PCI_USES_IO|PCI_ADDR0
208#else
209#define EPIC_IOTYPE PCI_USES_MASTER|PCI_USES_MEM|PCI_ADDR1
210#endif
211 198
212typedef enum { 199typedef enum {
213 SMSC_83C170_0, 200 SMSC_83C170_0,
@@ -218,7 +205,6 @@ typedef enum {
218 205
219struct epic_chip_info { 206struct epic_chip_info {
220 const char *name; 207 const char *name;
221 enum pci_id_flags_bits pci_flags;
222 int io_size; /* Needed for I/O region check or ioremap(). */ 208 int io_size; /* Needed for I/O region check or ioremap(). */
223 int drv_flags; /* Driver use, intended as capability flags. */ 209 int drv_flags; /* Driver use, intended as capability flags. */
224}; 210};
@@ -227,11 +213,11 @@ struct epic_chip_info {
227/* indexed by chip_t */ 213/* indexed by chip_t */
228static const struct epic_chip_info pci_id_tbl[] = { 214static const struct epic_chip_info pci_id_tbl[] = {
229 { "SMSC EPIC/100 83c170", 215 { "SMSC EPIC/100 83c170",
230 EPIC_IOTYPE, EPIC_TOTAL_SIZE, TYPE2_INTR | NO_MII | MII_PWRDWN }, 216 EPIC_TOTAL_SIZE, TYPE2_INTR | NO_MII | MII_PWRDWN },
231 { "SMSC EPIC/100 83c170", 217 { "SMSC EPIC/100 83c170",
232 EPIC_IOTYPE, EPIC_TOTAL_SIZE, TYPE2_INTR }, 218 EPIC_TOTAL_SIZE, TYPE2_INTR },
233 { "SMSC EPIC/C 83c175", 219 { "SMSC EPIC/C 83c175",
234 EPIC_IOTYPE, EPIC_TOTAL_SIZE, TYPE2_INTR | MII_PWRDWN }, 220 EPIC_TOTAL_SIZE, TYPE2_INTR | MII_PWRDWN },
235}; 221};
236 222
237 223
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
index a8449265e5fd..13eca7ede2af 100644
--- a/drivers/net/fealnx.c
+++ b/drivers/net/fealnx.c
@@ -126,16 +126,6 @@ MODULE_PARM_DESC(full_duplex, "fealnx full duplex setting(s) (1)");
126 126
127#define MIN_REGION_SIZE 136 127#define MIN_REGION_SIZE 136
128 128
129enum pci_flags_bit {
130 PCI_USES_IO = 1,
131 PCI_USES_MEM = 2,
132 PCI_USES_MASTER = 4,
133 PCI_ADDR0 = 0x10 << 0,
134 PCI_ADDR1 = 0x10 << 1,
135 PCI_ADDR2 = 0x10 << 2,
136 PCI_ADDR3 = 0x10 << 3,
137};
138
139/* A chip capabilities table, matching the entries in pci_tbl[] above. */ 129/* A chip capabilities table, matching the entries in pci_tbl[] above. */
140enum chip_capability_flags { 130enum chip_capability_flags {
141 HAS_MII_XCVR, 131 HAS_MII_XCVR,
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index fc08c4af506c..0e01c75da429 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -309,12 +309,6 @@ static int pcnet32_alloc_ring(struct net_device *dev, char *name);
309static void pcnet32_free_ring(struct net_device *dev); 309static void pcnet32_free_ring(struct net_device *dev);
310static void pcnet32_check_media(struct net_device *dev, int verbose); 310static void pcnet32_check_media(struct net_device *dev, int verbose);
311 311
312enum pci_flags_bit {
313 PCI_USES_IO = 1, PCI_USES_MEM = 2, PCI_USES_MASTER = 4,
314 PCI_ADDR0 = 0x10 << 0, PCI_ADDR1 = 0x10 << 1, PCI_ADDR2 =
315 0x10 << 2, PCI_ADDR3 = 0x10 << 3,
316};
317
318static u16 pcnet32_wio_read_csr(unsigned long addr, int index) 312static u16 pcnet32_wio_read_csr(unsigned long addr, int index)
319{ 313{
320 outw(index, addr + PCNET32_WIO_RAP); 314 outw(index, addr + PCNET32_WIO_RAP);
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
index 8fea2aa455d4..602a6e5002a0 100644
--- a/drivers/net/tulip/winbond-840.c
+++ b/drivers/net/tulip/winbond-840.c
@@ -212,26 +212,15 @@ Test with 'ping -s 10000' on a fast computer.
212/* 212/*
213 PCI probe table. 213 PCI probe table.
214*/ 214*/
215enum pci_id_flags_bits {
216 /* Set PCI command register bits before calling probe1(). */
217 PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4,
218 /* Read and map the single following PCI BAR. */
219 PCI_ADDR0=0<<4, PCI_ADDR1=1<<4, PCI_ADDR2=2<<4, PCI_ADDR3=3<<4,
220 PCI_ADDR_64BITS=0x100, PCI_NO_ACPI_WAKE=0x200, PCI_NO_MIN_LATENCY=0x400,
221};
222enum chip_capability_flags { 215enum chip_capability_flags {
223 CanHaveMII=1, HasBrokenTx=2, AlwaysFDX=4, FDXOnNoMII=8,}; 216 CanHaveMII=1, HasBrokenTx=2, AlwaysFDX=4, FDXOnNoMII=8,
224#ifdef USE_IO_OPS 217};
225#define W840_FLAGS (PCI_USES_IO | PCI_ADDR0 | PCI_USES_MASTER)
226#else
227#define W840_FLAGS (PCI_USES_MEM | PCI_ADDR1 | PCI_USES_MASTER)
228#endif
229 218
230static struct pci_device_id w840_pci_tbl[] = { 219static const struct pci_device_id w840_pci_tbl[] = {
231 { 0x1050, 0x0840, PCI_ANY_ID, 0x8153, 0, 0, 0 }, 220 { 0x1050, 0x0840, PCI_ANY_ID, 0x8153, 0, 0, 0 },
232 { 0x1050, 0x0840, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, 221 { 0x1050, 0x0840, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
233 { 0x11f6, 0x2011, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 }, 222 { 0x11f6, 0x2011, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 },
234 { 0, } 223 { }
235}; 224};
236MODULE_DEVICE_TABLE(pci, w840_pci_tbl); 225MODULE_DEVICE_TABLE(pci, w840_pci_tbl);
237 226
@@ -241,18 +230,17 @@ struct pci_id_info {
241 int pci, pci_mask, subsystem, subsystem_mask; 230 int pci, pci_mask, subsystem, subsystem_mask;
242 int revision, revision_mask; /* Only 8 bits. */ 231 int revision, revision_mask; /* Only 8 bits. */
243 } id; 232 } id;
244 enum pci_id_flags_bits pci_flags;
245 int io_size; /* Needed for I/O region check or ioremap(). */ 233 int io_size; /* Needed for I/O region check or ioremap(). */
246 int drv_flags; /* Driver use, intended as capability flags. */ 234 int drv_flags; /* Driver use, intended as capability flags. */
247}; 235};
248static struct pci_id_info pci_id_tbl[] = { 236static struct pci_id_info pci_id_tbl[] = {
249 {"Winbond W89c840", /* Sometime a Level-One switch card. */ 237 {"Winbond W89c840", /* Sometime a Level-One switch card. */
250 { 0x08401050, 0xffffffff, 0x81530000, 0xffff0000 }, 238 { 0x08401050, 0xffffffff, 0x81530000, 0xffff0000 },
251 W840_FLAGS, 128, CanHaveMII | HasBrokenTx | FDXOnNoMII}, 239 128, CanHaveMII | HasBrokenTx | FDXOnNoMII},
252 {"Winbond W89c840", { 0x08401050, 0xffffffff, }, 240 {"Winbond W89c840", { 0x08401050, 0xffffffff, },
253 W840_FLAGS, 128, CanHaveMII | HasBrokenTx}, 241 128, CanHaveMII | HasBrokenTx},
254 {"Compex RL100-ATX", { 0x201111F6, 0xffffffff,}, 242 {"Compex RL100-ATX", { 0x201111F6, 0xffffffff,},
255 W840_FLAGS, 128, CanHaveMII | HasBrokenTx}, 243 128, CanHaveMII | HasBrokenTx},
256 {NULL,}, /* 0 terminated list. */ 244 {NULL,}, /* 0 terminated list. */
257}; 245};
258 246
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c
index ecec8e5db786..569305f57561 100644
--- a/drivers/net/yellowfin.c
+++ b/drivers/net/yellowfin.c
@@ -234,14 +234,6 @@ See Packet Engines confidential appendix (prototype chips only).
234 234
235 235
236 236
237enum pci_id_flags_bits {
238 /* Set PCI command register bits before calling probe1(). */
239 PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4,
240 /* Read and map the single following PCI BAR. */
241 PCI_ADDR0=0<<4, PCI_ADDR1=1<<4, PCI_ADDR2=2<<4, PCI_ADDR3=3<<4,
242 PCI_ADDR_64BITS=0x100, PCI_NO_ACPI_WAKE=0x200, PCI_NO_MIN_LATENCY=0x400,
243 PCI_UNUSED_IRQ=0x800,
244};
245enum capability_flags { 237enum capability_flags {
246 HasMII=1, FullTxStatus=2, IsGigabit=4, HasMulticastBug=8, FullRxStatus=16, 238 HasMII=1, FullTxStatus=2, IsGigabit=4, HasMulticastBug=8, FullRxStatus=16,
247 HasMACAddrBug=32, /* Only on early revs. */ 239 HasMACAddrBug=32, /* Only on early revs. */
@@ -249,11 +241,6 @@ enum capability_flags {
249}; 241};
250/* The PCI I/O space extent. */ 242/* The PCI I/O space extent. */
251#define YELLOWFIN_SIZE 0x100 243#define YELLOWFIN_SIZE 0x100
252#ifdef USE_IO_OPS
253#define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_IO | PCI_ADDR0)
254#else
255#define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_MEM | PCI_ADDR1)
256#endif
257 244
258struct pci_id_info { 245struct pci_id_info {
259 const char *name; 246 const char *name;
@@ -261,24 +248,23 @@ struct pci_id_info {
261 int pci, pci_mask, subsystem, subsystem_mask; 248 int pci, pci_mask, subsystem, subsystem_mask;
262 int revision, revision_mask; /* Only 8 bits. */ 249 int revision, revision_mask; /* Only 8 bits. */
263 } id; 250 } id;
264 enum pci_id_flags_bits pci_flags;
265 int io_size; /* Needed for I/O region check or ioremap(). */ 251 int io_size; /* Needed for I/O region check or ioremap(). */
266 int drv_flags; /* Driver use, intended as capability flags. */ 252 int drv_flags; /* Driver use, intended as capability flags. */
267}; 253};
268 254
269static const struct pci_id_info pci_id_tbl[] = { 255static const struct pci_id_info pci_id_tbl[] = {
270 {"Yellowfin G-NIC Gigabit Ethernet", { 0x07021000, 0xffffffff}, 256 {"Yellowfin G-NIC Gigabit Ethernet", { 0x07021000, 0xffffffff},
271 PCI_IOTYPE, YELLOWFIN_SIZE, 257 YELLOWFIN_SIZE,
272 FullTxStatus | IsGigabit | HasMulticastBug | HasMACAddrBug | DontUseEeprom}, 258 FullTxStatus | IsGigabit | HasMulticastBug | HasMACAddrBug | DontUseEeprom},
273 {"Symbios SYM83C885", { 0x07011000, 0xffffffff}, 259 {"Symbios SYM83C885", { 0x07011000, 0xffffffff},
274 PCI_IOTYPE, YELLOWFIN_SIZE, HasMII | DontUseEeprom }, 260 YELLOWFIN_SIZE, HasMII | DontUseEeprom },
275 {NULL,}, 261 { }
276}; 262};
277 263
278static struct pci_device_id yellowfin_pci_tbl[] = { 264static const struct pci_device_id yellowfin_pci_tbl[] = {
279 { 0x1000, 0x0702, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 265 { 0x1000, 0x0702, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
280 { 0x1000, 0x0701, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, 266 { 0x1000, 0x0701, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
281 { 0, } 267 { }
282}; 268};
283MODULE_DEVICE_TABLE (pci, yellowfin_pci_tbl); 269MODULE_DEVICE_TABLE (pci, yellowfin_pci_tbl);
284 270