aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ns83820.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ns83820.c')
-rw-r--r--drivers/net/ns83820.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 57fd483dbb1f..1f6327d41536 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -648,8 +648,8 @@ static void phy_intr(struct net_device *ndev)
648 dprintk("phy_intr: tbisr=%08x, tanar=%08x, tanlpar=%08x\n", 648 dprintk("phy_intr: tbisr=%08x, tanar=%08x, tanlpar=%08x\n",
649 tbisr, tanar, tanlpar); 649 tbisr, tanar, tanlpar);
650 650
651 if ( (fullduplex = (tanlpar & TANAR_FULL_DUP) 651 if ( (fullduplex = (tanlpar & TANAR_FULL_DUP) &&
652 && (tanar & TANAR_FULL_DUP)) ) { 652 (tanar & TANAR_FULL_DUP)) ) {
653 653
654 /* both of us are full duplex */ 654 /* both of us are full duplex */
655 writel(readl(dev->base + TXCFG) 655 writel(readl(dev->base + TXCFG)
@@ -661,12 +661,12 @@ static void phy_intr(struct net_device *ndev)
661 writel(readl(dev->base + GPIOR) | GPIOR_GP1_OUT, 661 writel(readl(dev->base + GPIOR) | GPIOR_GP1_OUT,
662 dev->base + GPIOR); 662 dev->base + GPIOR);
663 663
664 } else if(((tanlpar & TANAR_HALF_DUP) 664 } else if (((tanlpar & TANAR_HALF_DUP) &&
665 && (tanar & TANAR_HALF_DUP)) 665 (tanar & TANAR_HALF_DUP)) ||
666 || ((tanlpar & TANAR_FULL_DUP) 666 ((tanlpar & TANAR_FULL_DUP) &&
667 && (tanar & TANAR_HALF_DUP)) 667 (tanar & TANAR_HALF_DUP)) ||
668 || ((tanlpar & TANAR_HALF_DUP) 668 ((tanlpar & TANAR_HALF_DUP) &&
669 && (tanar & TANAR_FULL_DUP))) { 669 (tanar & TANAR_FULL_DUP))) {
670 670
671 /* one or both of us are half duplex */ 671 /* one or both of us are half duplex */
672 writel((readl(dev->base + TXCFG) 672 writel((readl(dev->base + TXCFG)
@@ -720,16 +720,16 @@ static void phy_intr(struct net_device *ndev)
720 720
721 newlinkstate = (cfg & CFG_LNKSTS) ? LINK_UP : LINK_DOWN; 721 newlinkstate = (cfg & CFG_LNKSTS) ? LINK_UP : LINK_DOWN;
722 722
723 if (newlinkstate & LINK_UP 723 if (newlinkstate & LINK_UP &&
724 && dev->linkstate != newlinkstate) { 724 dev->linkstate != newlinkstate) {
725 netif_start_queue(ndev); 725 netif_start_queue(ndev);
726 netif_wake_queue(ndev); 726 netif_wake_queue(ndev);
727 printk(KERN_INFO "%s: link now %s mbps, %s duplex and up.\n", 727 printk(KERN_INFO "%s: link now %s mbps, %s duplex and up.\n",
728 ndev->name, 728 ndev->name,
729 speeds[speed], 729 speeds[speed],
730 fullduplex ? "full" : "half"); 730 fullduplex ? "full" : "half");
731 } else if (newlinkstate & LINK_DOWN 731 } else if (newlinkstate & LINK_DOWN &&
732 && dev->linkstate != newlinkstate) { 732 dev->linkstate != newlinkstate) {
733 netif_stop_queue(ndev); 733 netif_stop_queue(ndev);
734 printk(KERN_INFO "%s: link now down.\n", ndev->name); 734 printk(KERN_INFO "%s: link now down.\n", ndev->name);
735 } 735 }