From: Roberto Gordo Saez <rgs@linalco.com>
To: linux-kernel@vger.kernel.org
Cc: benh@kernel.crashing.org, linuxppc-dev@lists.linuxppc.org
Subject: [PATCH] GMAC ethernet controller (Apple PowerPC)
Date: Thu, 8 Aug 2002 12:04:02 +0200 [thread overview]
Message-ID: <20020808100402.GA7953@filemon> (raw)
Small fix for the link status (carrier) on PowerPC GMAC net driver.
Now ifconfig reports correctly the "RUNNING" flag, the same way that it is reported with other network cards i've tested (intel eepro100 on i386).
--- linux-2.4.19.orig/drivers/net/gmac.c 2002-08-08 08:38:10.000000000 +0200
+++ linux-2.4.19/drivers/net/gmac.c 2002-08-08 09:26:07.000000000 +0200
@@ -246,6 +246,7 @@
#endif
full_duplex = ((aux_stat & MII_BCM5201_AUXCTLSTATUS_DUPLEX) != 0);
link_100 = ((aux_stat & MII_BCM5201_AUXCTLSTATUS_SPEED) != 0);
+ netif_carrier_on(gm->dev);
break;
case PHY_B5400:
case PHY_B5401:
@@ -260,6 +261,7 @@
full_duplex = phy_BCM5400_link_table[link][0];
link_100 = phy_BCM5400_link_table[link][1];
gigabit = phy_BCM5400_link_table[link][2];
+ netif_carrier_on(gm->dev);
break;
case PHY_LXT971:
aux_stat = mii_read(gm, gm->phy_addr, MII_LXT971_STATUS2);
@@ -269,6 +271,7 @@
#endif
full_duplex = ((aux_stat & MII_LXT971_STATUS2_FULLDUPLEX) != 0);
link_100 = ((aux_stat & MII_LXT971_STATUS2_SPEED) != 0);
+ netif_carrier_on(gm->dev);
break;
default:
full_duplex = (lpar_ability & MII_ANLPA_FDAM) != 0;
@@ -296,6 +299,7 @@
#ifdef DEBUG_PHY
printk(KERN_INFO "%s: Link down !\n", gm->dev->name);
#endif
+ netif_carrier_off(gm->dev);
}
}
}
@@ -1101,7 +1105,10 @@
/* Initialize the multicast tables & promisc mode if any */
gmac_set_multicast(dev);
-
+
+ /* Initialize the carrier status */
+ netif_carrier_off(dev);
+
/*
* Check out PHY status and start auto-poll
*
next reply other threads:[~2002-08-08 9:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-08 10:04 Roberto Gordo Saez [this message]
2002-08-09 6:14 ` [PATCH] GMAC ethernet controller (Apple PowerPC) Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020808100402.GA7953@filemon \
--to=rgs@linalco.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox