Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10343
b: refs/heads/master
c: 67ec2f8
h: refs/heads/master
i:
  10341: 943acd4
  10339: 0f91e1a
  10335: f051f69
v: v3
  • Loading branch information
John W. Linville authored and Jeff Garzik committed Oct 19, 2005
1 parent fd225e9 commit bc9ef67
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 36841c9d02870983c2b08c85d56572c1ff011997
refs/heads/master: 67ec2f805a5260c041b1c3c7a86ecfbc9670db06
44 changes: 21 additions & 23 deletions trunk/drivers/net/sundance.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
#else
int bar = 1;
#endif
int phy, phy_idx = 0;


/* when built into the kernel, we only print version if device is found */
Expand Down Expand Up @@ -606,33 +607,30 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
printk("%2.2x:", dev->dev_addr[i]);
printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], irq);

if (1) {
int phy, phy_idx = 0;
np->phys[0] = 1; /* Default setting */
np->mii_preamble_required++;
for (phy = 1; phy < 32 && phy_idx < MII_CNT; phy++) {
int mii_status = mdio_read(dev, phy, MII_BMSR);
if (mii_status != 0xffff && mii_status != 0x0000) {
np->phys[phy_idx++] = phy;
np->mii_if.advertising = mdio_read(dev, phy, MII_ADVERTISE);
if ((mii_status & 0x0040) == 0)
np->mii_preamble_required++;
printk(KERN_INFO "%s: MII PHY found at address %d, status "
"0x%4.4x advertising %4.4x.\n",
dev->name, phy, mii_status, np->mii_if.advertising);
}
}
np->mii_preamble_required--;

if (phy_idx == 0) {
printk(KERN_INFO "%s: No MII transceiver found, aborting. ASIC status %x\n",
dev->name, ioread32(ioaddr + ASICCtrl));
goto err_out_unregister;
np->phys[0] = 1; /* Default setting */
np->mii_preamble_required++;
for (phy = 1; phy < 32 && phy_idx < MII_CNT; phy++) {
int mii_status = mdio_read(dev, phy, MII_BMSR);
if (mii_status != 0xffff && mii_status != 0x0000) {
np->phys[phy_idx++] = phy;
np->mii_if.advertising = mdio_read(dev, phy, MII_ADVERTISE);
if ((mii_status & 0x0040) == 0)
np->mii_preamble_required++;
printk(KERN_INFO "%s: MII PHY found at address %d, status "
"0x%4.4x advertising %4.4x.\n",
dev->name, phy, mii_status, np->mii_if.advertising);
}
}
np->mii_preamble_required--;

np->mii_if.phy_id = np->phys[0];
if (phy_idx == 0) {
printk(KERN_INFO "%s: No MII transceiver found, aborting. ASIC status %x\n",
dev->name, ioread32(ioaddr + ASICCtrl));
goto err_out_unregister;
}

np->mii_if.phy_id = np->phys[0];

/* Parse override configuration */
np->an_enable = 1;
if (card_idx < MAX_UNITS) {
Expand Down

0 comments on commit bc9ef67

Please sign in to comment.