diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-08-30 18:30:38 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-08-30 18:30:38 -0400 |
commit | 0a7d5f8ce960e74fa22986bda4af488539796e49 (patch) | |
tree | e29ad17808a5c3410518e22dae8dfe94801b59f3 /drivers/net/fealnx.c | |
parent | 0165508c80a2b5d5268d9c5dfa9b30c534a33693 (diff) | |
parent | dc709bd190c130b299ac19d596594256265c042a (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/net/fealnx.c')
-rw-r--r-- | drivers/net/fealnx.c | 38 |
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. */ |
95 | static char version[] __devinitdata = | 95 | static char version[] = |
96 | KERN_INFO DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE "\n"; | 96 | KERN_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 | |||
124 | MODULE_PARM_DESC(options, "fealnx: Bits 0-3: media type, bit 17: full duplex"); | 124 | MODULE_PARM_DESC(options, "fealnx: Bits 0-3: media type, bit 17: full duplex"); |
125 | MODULE_PARM_DESC(full_duplex, "fealnx full duplex setting(s) (1)"); | 125 | MODULE_PARM_DESC(full_duplex, "fealnx full duplex setting(s) (1)"); |
126 | 126 | ||
127 | #define MIN_REGION_SIZE 136 | 127 | enum { |
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. */ |
130 | enum chip_capability_flags { | 132 | enum chip_capability_flags { |
@@ -146,14 +148,13 @@ enum phy_type_flags { | |||
146 | 148 | ||
147 | struct chip_info { | 149 | struct chip_info { |
148 | char *chip_name; | 150 | char *chip_name; |
149 | int io_size; | ||
150 | int flags; | 151 | int flags; |
151 | }; | 152 | }; |
152 | 153 | ||
153 | static const struct chip_info skel_netdrv_tbl[] = { | 154 | static 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)) { |