aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fealnx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/fealnx.c')
-rw-r--r--drivers/net/fealnx.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
index c701951dcd6f..567e27413cfd 100644
--- a/drivers/net/fealnx.c
+++ b/drivers/net/fealnx.c
@@ -92,7 +92,7 @@ static int full_duplex[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 };
92#include <asm/uaccess.h> 92#include <asm/uaccess.h>
93 93
94/* These identify the driver base version and may not be removed. */ 94/* These identify the driver base version and may not be removed. */
95static char version[] __devinitdata = 95static char version[] =
96KERN_INFO DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE "\n"; 96KERN_INFO DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE "\n";
97 97
98 98
@@ -124,7 +124,9 @@ MODULE_PARM_DESC(multicast_filter_limit, "fealnx maximum number of filtered mult
124MODULE_PARM_DESC(options, "fealnx: Bits 0-3: media type, bit 17: full duplex"); 124MODULE_PARM_DESC(options, "fealnx: Bits 0-3: media type, bit 17: full duplex");
125MODULE_PARM_DESC(full_duplex, "fealnx full duplex setting(s) (1)"); 125MODULE_PARM_DESC(full_duplex, "fealnx full duplex setting(s) (1)");
126 126
127#define MIN_REGION_SIZE 136 127enum {
128 MIN_REGION_SIZE = 136,
129};
128 130
129/* A chip capabilities table, matching the entries in pci_tbl[] above. */ 131/* A chip capabilities table, matching the entries in pci_tbl[] above. */
130enum chip_capability_flags { 132enum chip_capability_flags {
@@ -146,14 +148,13 @@ enum phy_type_flags {
146 148
147struct chip_info { 149struct chip_info {
148 char *chip_name; 150 char *chip_name;
149 int io_size;
150 int flags; 151 int flags;
151}; 152};
152 153
153static const struct chip_info skel_netdrv_tbl[] = { 154static const struct chip_info skel_netdrv_tbl[] __devinitdata = {
154 {"100/10M Ethernet PCI Adapter", 136, HAS_MII_XCVR}, 155 { "100/10M Ethernet PCI Adapter", HAS_MII_XCVR },
155 {"100/10M Ethernet PCI Adapter", 136, HAS_CHIP_XCVR}, 156 { "100/10M Ethernet PCI Adapter", HAS_CHIP_XCVR },
156 {"1000/100/10M Ethernet PCI Adapter", 136, HAS_MII_XCVR}, 157 { "1000/100/10M Ethernet PCI Adapter", HAS_MII_XCVR },
157}; 158};
158 159
159/* Offsets to the Command and Status Registers. */ 160/* Offsets to the Command and Status Registers. */
@@ -504,13 +505,14 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
504 505
505 len = pci_resource_len(pdev, bar); 506 len = pci_resource_len(pdev, bar);
506 if (len < MIN_REGION_SIZE) { 507 if (len < MIN_REGION_SIZE) {
507 printk(KERN_ERR "%s: region size %ld too small, aborting\n", 508 dev_err(&pdev->dev,
508 boardname, len); 509 "region size %ld too small, aborting\n", len);
509 return -ENODEV; 510 return -ENODEV;
510 } 511 }
511 512
512 i = pci_request_regions(pdev, boardname); 513 i = pci_request_regions(pdev, boardname);
513 if (i) return i; 514 if (i)
515 return i;
514 516
515 irq = pdev->irq; 517 irq = pdev->irq;
516 518
@@ -576,9 +578,9 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
576 578
577 if (mii_status != 0xffff && mii_status != 0x0000) { 579 if (mii_status != 0xffff && mii_status != 0x0000) {
578 np->phys[phy_idx++] = phy; 580 np->phys[phy_idx++] = phy;
579 printk(KERN_INFO 581 dev_info(&pdev->dev,
580 "%s: MII PHY found at address %d, status " 582 "MII PHY found at address %d, status "
581 "0x%4.4x.\n", dev->name, phy, mii_status); 583 "0x%4.4x.\n", phy, mii_status);
582 /* get phy type */ 584 /* get phy type */
583 { 585 {
584 unsigned int data; 586 unsigned int data;
@@ -601,10 +603,10 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
601 } 603 }
602 604
603 np->mii_cnt = phy_idx; 605 np->mii_cnt = phy_idx;
604 if (phy_idx == 0) { 606 if (phy_idx == 0)
605 printk(KERN_WARNING "%s: MII PHY not found -- this device may " 607 dev_warn(&pdev->dev,
606 "not operate correctly.\n", dev->name); 608 "MII PHY not found -- this device may "
607 } 609 "not operate correctly.\n");
608 } else { 610 } else {
609 np->phys[0] = 32; 611 np->phys[0] = 32;
610/* 89/6/23 add, (begin) */ 612/* 89/6/23 add, (begin) */
@@ -630,7 +632,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
630 np->mii.full_duplex = full_duplex[card_idx]; 632 np->mii.full_duplex = full_duplex[card_idx];
631 633
632 if (np->mii.full_duplex) { 634 if (np->mii.full_duplex) {
633 printk(KERN_INFO "%s: Media type forced to Full Duplex.\n", dev->name); 635 dev_info(&pdev->dev, "Media type forced to Full Duplex.\n");
634/* 89/6/13 add, (begin) */ 636/* 89/6/13 add, (begin) */
635// if (np->PHYType==MarvellPHY) 637// if (np->PHYType==MarvellPHY)
636 if ((np->PHYType == MarvellPHY) || (np->PHYType == LevelOnePHY)) { 638 if ((np->PHYType == MarvellPHY) || (np->PHYType == LevelOnePHY)) {