diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-08-02 06:01:27 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-18 16:59:14 -0400 |
commit | 852ea22ab24df4c64c0211c3b6d6358eb0e759f9 (patch) | |
tree | 10a70ce5164898197c9bbd1339f98413d25e7e99 /drivers/net/ioc3-eth.c | |
parent | 6be382ea0c767a81be0e7980400b9b18167b3261 (diff) |
[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>
Diffstat (limited to 'drivers/net/ioc3-eth.c')
-rw-r--r-- | drivers/net/ioc3-eth.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c index d520b5920d6c..49e5467bdd73 100644 --- a/drivers/net/ioc3-eth.c +++ b/drivers/net/ioc3-eth.c | |||
@@ -499,7 +499,7 @@ static int ioc3_mdio_read(struct net_device *dev, int phy, int reg) | |||
499 | ioc3_w_micr((phy << MICR_PHYADDR_SHIFT) | reg | MICR_READTRIG); | 499 | ioc3_w_micr((phy << MICR_PHYADDR_SHIFT) | reg | MICR_READTRIG); |
500 | while (ioc3_r_micr() & MICR_BUSY); | 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 | static void ioc3_mdio_write(struct net_device *dev, int phy, int reg, int data) | 505 | static void ioc3_mdio_write(struct net_device *dev, int phy, int reg, int data) |
@@ -1291,7 +1291,6 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1291 | dev->features = NETIF_F_IP_CSUM; | 1291 | dev->features = NETIF_F_IP_CSUM; |
1292 | #endif | 1292 | #endif |
1293 | 1293 | ||
1294 | ioc3_setup_duplex(ip); | ||
1295 | sw_physid1 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID1); | 1294 | sw_physid1 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID1); |
1296 | sw_physid2 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID2); | 1295 | sw_physid2 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID2); |
1297 | 1296 | ||
@@ -1300,6 +1299,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1300 | goto out_stop; | 1299 | goto out_stop; |
1301 | 1300 | ||
1302 | mii_check_media(&ip->mii, 1, 1); | 1301 | mii_check_media(&ip->mii, 1, 1); |
1302 | ioc3_setup_duplex(ip); | ||
1303 | 1303 | ||
1304 | vendor = (sw_physid1 << 12) | (sw_physid2 >> 4); | 1304 | vendor = (sw_physid1 << 12) | (sw_physid2 >> 4); |
1305 | model = (sw_physid2 >> 4) & 0x3f; | 1305 | model = (sw_physid2 >> 4) & 0x3f; |
@@ -1524,7 +1524,7 @@ static void ioc3_get_drvinfo (struct net_device *dev, | |||
1524 | struct ethtool_drvinfo *info) | 1524 | struct ethtool_drvinfo *info) |
1525 | { | 1525 | { |
1526 | struct ioc3_private *ip = netdev_priv(dev); | 1526 | struct ioc3_private *ip = netdev_priv(dev); |
1527 | 1527 | ||
1528 | strcpy (info->driver, IOC3_NAME); | 1528 | strcpy (info->driver, IOC3_NAME); |
1529 | strcpy (info->version, IOC3_VERSION); | 1529 | strcpy (info->version, IOC3_VERSION); |
1530 | strcpy (info->bus_info, pci_name(ip->pdev)); | 1530 | strcpy (info->bus_info, pci_name(ip->pdev)); |
@@ -1550,7 +1550,7 @@ static int ioc3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
1550 | spin_lock_irq(&ip->ioc3_lock); | 1550 | spin_lock_irq(&ip->ioc3_lock); |
1551 | rc = mii_ethtool_sset(&ip->mii, cmd); | 1551 | rc = mii_ethtool_sset(&ip->mii, cmd); |
1552 | spin_unlock_irq(&ip->ioc3_lock); | 1552 | spin_unlock_irq(&ip->ioc3_lock); |
1553 | 1553 | ||
1554 | return rc; | 1554 | return rc; |
1555 | } | 1555 | } |
1556 | 1556 | ||