Commit 852ea22ab24df4c64c0211c3b6d6358eb0e759f9
Committed by
Jeff Garzik
1 parent
6be382ea0c
Exists in
master
and in
39 other branches
[PATCH] IOC3 fixes
- Using the right register clearly improves chances of getting the MII code and thus the driver working at all. - On startup check the media type before setting up duplex or we might spend the first 1.2s with a wrong duplex setting. - Get rid of whitespace lines. Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff
drivers/net/ioc3-eth.c
... | ... | @@ -499,7 +499,7 @@ |
499 | 499 | ioc3_w_micr((phy << MICR_PHYADDR_SHIFT) | reg | MICR_READTRIG); |
500 | 500 | while (ioc3_r_micr() & MICR_BUSY); |
501 | 501 | |
502 | - return ioc3_r_micr() & MIDR_DATA_MASK; | |
502 | + return ioc3_r_midr_r() & MIDR_DATA_MASK; | |
503 | 503 | } |
504 | 504 | |
505 | 505 | static void ioc3_mdio_write(struct net_device *dev, int phy, int reg, int data) |
... | ... | @@ -1291,7 +1291,6 @@ |
1291 | 1291 | dev->features = NETIF_F_IP_CSUM; |
1292 | 1292 | #endif |
1293 | 1293 | |
1294 | - ioc3_setup_duplex(ip); | |
1295 | 1294 | sw_physid1 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID1); |
1296 | 1295 | sw_physid2 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID2); |
1297 | 1296 | |
... | ... | @@ -1300,6 +1299,7 @@ |
1300 | 1299 | goto out_stop; |
1301 | 1300 | |
1302 | 1301 | mii_check_media(&ip->mii, 1, 1); |
1302 | + ioc3_setup_duplex(ip); | |
1303 | 1303 | |
1304 | 1304 | vendor = (sw_physid1 << 12) | (sw_physid2 >> 4); |
1305 | 1305 | model = (sw_physid2 >> 4) & 0x3f; |
... | ... | @@ -1524,7 +1524,7 @@ |
1524 | 1524 | struct ethtool_drvinfo *info) |
1525 | 1525 | { |
1526 | 1526 | struct ioc3_private *ip = netdev_priv(dev); |
1527 | - | |
1527 | + | |
1528 | 1528 | strcpy (info->driver, IOC3_NAME); |
1529 | 1529 | strcpy (info->version, IOC3_VERSION); |
1530 | 1530 | strcpy (info->bus_info, pci_name(ip->pdev)); |
... | ... | @@ -1550,7 +1550,7 @@ |
1550 | 1550 | spin_lock_irq(&ip->ioc3_lock); |
1551 | 1551 | rc = mii_ethtool_sset(&ip->mii, cmd); |
1552 | 1552 | spin_unlock_irq(&ip->ioc3_lock); |
1553 | - | |
1553 | + | |
1554 | 1554 | return rc; |
1555 | 1555 | } |
1556 | 1556 |