diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-05 16:02:56 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-05 16:02:56 -0400 |
| commit | e8f75588dd5885868147b329ced4a5093dc6402e (patch) | |
| tree | 2baffe32d3a7aafe0e3c90434c46b5a59f198478 /drivers/net/fealnx.c | |
| parent | e340221acda6bc0bf05a0ff6e6114902c4307670 (diff) | |
| parent | 2c1a108890c5b57cf3f7d7909f55c4fae0f52f19 (diff) | |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (39 commits)
[PATCH] myri10ge - Export more parameters to ethtool
[PATCH] myri10ge - Use dev_info() when printing parameters after probe
[PATCH] myri10ge - Drop ununsed nvidia chipset id
[PATCH] myri10ge - Drop unused pm_state
[PATCH] Fix freeing of net device
[PATCH] remove dead entry in net wan Kconfig
[PATCH] NI5010 netcard cleanup
[PATCH] lock validator: fix ns83820.c irq-flags bug
[PATCH] pcnet32: Cleanup rx buffers after loopback test.
[PATCH] pcnet32: Suspend the chip rather than restart when changing multicast/promisc
[PATCH] pcnet32: Handle memory allocation failures cleanly when resizing tx/rx rings
[PATCH] pcnet32: Use kcalloc instead of kmalloc and memset
[PATCH] pcnet32: Fix off-by-one in get_ringparam
[PATCH] pcnet32: Use PCI_DEVICE macro
[PATCH] pcnet32: Fix Section mismatch error
[PATCH] Add support for the Cicada 8201 PHY
[PATCH] zd1211rw: disable TX queue during stop
[PATCH] ZyDAS ZD1211 USB-WLAN driver
[PATCH] softmac: fix build-break from 881ee6999d66c8fc903b429b73bbe6045b38c549
[PATCH] CONFIG_WIRELESS_EXT is neccessary after all
...
Diffstat (limited to 'drivers/net/fealnx.c')
| -rw-r--r-- | drivers/net/fealnx.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c index c701951dcd6f..97d34fee8c1f 100644 --- a/drivers/net/fealnx.c +++ b/drivers/net/fealnx.c | |||
| @@ -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)) { |
