diff options
Diffstat (limited to 'drivers/net/sundance.c')
-rw-r--r-- | drivers/net/sundance.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c index 0ab9c38b4a34..61eec46cb111 100644 --- a/drivers/net/sundance.c +++ b/drivers/net/sundance.c | |||
@@ -106,7 +106,7 @@ | |||
106 | static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */ | 106 | static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */ |
107 | /* Maximum number of multicast addresses to filter (vs. rx-all-multicast). | 107 | /* Maximum number of multicast addresses to filter (vs. rx-all-multicast). |
108 | Typical is a 64 element hash table based on the Ethernet CRC. */ | 108 | Typical is a 64 element hash table based on the Ethernet CRC. */ |
109 | static int multicast_filter_limit = 32; | 109 | static const int multicast_filter_limit = 32; |
110 | 110 | ||
111 | /* Set the copy breakpoint for the copy-only-tiny-frames scheme. | 111 | /* Set the copy breakpoint for the copy-only-tiny-frames scheme. |
112 | Setting to > 1518 effectively disables this feature. | 112 | Setting to > 1518 effectively disables this feature. |
@@ -298,7 +298,7 @@ enum { | |||
298 | struct pci_id_info { | 298 | struct pci_id_info { |
299 | const char *name; | 299 | const char *name; |
300 | }; | 300 | }; |
301 | static struct pci_id_info pci_id_tbl[] = { | 301 | static const struct pci_id_info pci_id_tbl[] = { |
302 | {"D-Link DFE-550TX FAST Ethernet Adapter"}, | 302 | {"D-Link DFE-550TX FAST Ethernet Adapter"}, |
303 | {"D-Link DFE-550FX 100Mbps Fiber-optics Adapter"}, | 303 | {"D-Link DFE-550FX 100Mbps Fiber-optics Adapter"}, |
304 | {"D-Link DFE-580TX 4 port Server Adapter"}, | 304 | {"D-Link DFE-580TX 4 port Server Adapter"}, |
@@ -633,9 +633,13 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev, | |||
633 | 633 | ||
634 | np->phys[0] = 1; /* Default setting */ | 634 | np->phys[0] = 1; /* Default setting */ |
635 | np->mii_preamble_required++; | 635 | np->mii_preamble_required++; |
636 | /* | ||
637 | * It seems some phys doesn't deal well with address 0 being accessed | ||
638 | * first, so leave address zero to the end of the loop (32 & 31). | ||
639 | */ | ||
636 | for (phy = 1; phy <= 32 && phy_idx < MII_CNT; phy++) { | 640 | for (phy = 1; phy <= 32 && phy_idx < MII_CNT; phy++) { |
637 | int mii_status = mdio_read(dev, phy, MII_BMSR); | ||
638 | int phyx = phy & 0x1f; | 641 | int phyx = phy & 0x1f; |
642 | int mii_status = mdio_read(dev, phyx, MII_BMSR); | ||
639 | if (mii_status != 0xffff && mii_status != 0x0000) { | 643 | if (mii_status != 0xffff && mii_status != 0x0000) { |
640 | np->phys[phy_idx++] = phyx; | 644 | np->phys[phy_idx++] = phyx; |
641 | np->mii_if.advertising = mdio_read(dev, phyx, MII_ADVERTISE); | 645 | np->mii_if.advertising = mdio_read(dev, phyx, MII_ADVERTISE); |