diff options
author | Komuro <komurojun-mbn@nifty.com> | 2006-07-22 21:20:55 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-08 23:38:29 -0400 |
commit | fcf194d19b7857c2467bebdb271bd079a0c0da81 (patch) | |
tree | 2b2137ffde5d5574b03709a760eb821eaee205e0 | |
parent | 242898be7a1921f646ca529ddc26d7337c69922f (diff) |
[PATCH] network: pcnet_cs.c: remove unnecessary 'mdio_reset'
'mdio_reset' has bad side effects that moves the phy_id.
DL10022-based cards work properly without 'mdio_reset'.
Signed-off-by: komurojun-mbn@nifty.com
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 0ecebfc31f07..cc0dcc9bf636 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -654,11 +654,8 @@ static int pcnet_config(struct pcmcia_device *link) | |||
654 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); | 654 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); |
655 | 655 | ||
656 | if (info->flags & (IS_DL10019|IS_DL10022)) { | 656 | if (info->flags & (IS_DL10019|IS_DL10022)) { |
657 | u_char id = inb(dev->base_addr + 0x1a); | ||
658 | dev->do_ioctl = &ei_ioctl; | 657 | dev->do_ioctl = &ei_ioctl; |
659 | mii_phy_probe(dev); | 658 | mii_phy_probe(dev); |
660 | if ((id == 0x30) && !info->pna_phy && (info->eth_phy == 4)) | ||
661 | info->eth_phy = 0; | ||
662 | } | 659 | } |
663 | 660 | ||
664 | link->dev_node = &info->node; | 661 | link->dev_node = &info->node; |
@@ -821,15 +818,6 @@ static void mdio_write(kio_addr_t addr, int phy_id, int loc, int value) | |||
821 | } | 818 | } |
822 | } | 819 | } |
823 | 820 | ||
824 | static void mdio_reset(kio_addr_t addr, int phy_id) | ||
825 | { | ||
826 | outb_p(0x08, addr); | ||
827 | outb_p(0x0c, addr); | ||
828 | outb_p(0x08, addr); | ||
829 | outb_p(0x0c, addr); | ||
830 | outb_p(0x00, addr); | ||
831 | } | ||
832 | |||
833 | /*====================================================================== | 821 | /*====================================================================== |
834 | 822 | ||
835 | EEPROM access routines for DL10019 and DL10022 based cards | 823 | EEPROM access routines for DL10019 and DL10022 based cards |
@@ -942,7 +930,8 @@ static void set_misc_reg(struct net_device *dev) | |||
942 | } | 930 | } |
943 | if (info->flags & IS_DL10022) { | 931 | if (info->flags & IS_DL10022) { |
944 | if (info->flags & HAS_MII) { | 932 | if (info->flags & HAS_MII) { |
945 | mdio_reset(nic_base + DLINK_GPIO, info->eth_phy); | 933 | /* Advertise 100F, 100H, 10F, 10H */ |
934 | mdio_write(nic_base + DLINK_GPIO, info->eth_phy, 4, 0x01e1); | ||
946 | /* Restart MII autonegotiation */ | 935 | /* Restart MII autonegotiation */ |
947 | mdio_write(nic_base + DLINK_GPIO, info->eth_phy, 0, 0x0000); | 936 | mdio_write(nic_base + DLINK_GPIO, info->eth_phy, 0, 0x0000); |
948 | mdio_write(nic_base + DLINK_GPIO, info->eth_phy, 0, 0x1200); | 937 | mdio_write(nic_base + DLINK_GPIO, info->eth_phy, 0, 0x1200); |