From: Daniele Venzano <webvenza@libero.it>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Cc: netdev@oss.sgi.com, Jeff Garzik <jgarzik@pobox.com>,
Dominik Karall <dominik.karall@gmx.net>
Subject: Re: [PATCH] Sis900 bug fixes 3/4
Date: Wed, 19 May 2004 16:28:52 +0200 [thread overview]
Message-ID: <20040519142852.GC798@picchio.gall.it> (raw)
In-Reply-To: <20040518123020.GF23565@picchio.gall.it>
[-- Attachment #1.1: Type: text/plain, Size: 766 bytes --]
On Tue, May 18, 2004 at 02:30:20PM +0200, Daniele Venzano wrote:
> Dominik:
> Could you please test this patch ? Thanks.
After further testing with Dominik, I made a new patch that actually
works. So, please disregard patch number 3 I sent before and use this
one instead. The other patches need no changes and can be found here:
http://teg.homeunix.org/sis900.html
They are:
sis900-maintainers
sis900-isa-bridge-id
sis900-phy-detection (attached below)
sis900-header-cleanups
This patch has been tested on a previously working system (keeps
working) and on a before-not-working one (now works as expected).
Please, consider this patchset for inclusion.
--
-----------------------------
Daniele Venzano
Web: http://teg.homeunix.org
[-- Attachment #1.2: sis900-phy-detection.diff --]
[-- Type: text/plain, Size: 2108 bytes --]
--- linux-2.6.6/drivers/net/sis900.c 2004-05-18 21:46:41.000000000 +0200
+++ linux-sis900/drivers/net/sis900.c 2004-05-18 21:44:31.000000000 +0200
@@ -116,6 +116,7 @@
#define HOME 0x0001
#define LAN 0x0002
#define MIX 0x0003
+#define UNKNOWN 0x0
} mii_chip_table[] = {
{ "SiS 900 Internal MII PHY", 0x001d, 0x8000, LAN },
{ "SiS 7014 Physical Layer Solution", 0x0016, 0xf830, LAN },
@@ -577,9 +578,11 @@
break;
}
- if( !mii_chip_table[i].phy_id1 )
+ if( !mii_chip_table[i].phy_id1 ) {
printk(KERN_INFO "%s: Unknown PHY transceiver found at address %d.\n",
- net_dev->name, phy_addr);
+ net_dev->name, phy_addr);
+ mii_phy->phy_types = UNKNOWN;
+ }
}
if (sis_priv->mii == NULL) {
@@ -644,15 +647,15 @@
static u16 sis900_default_phy(struct net_device * net_dev)
{
struct sis900_private * sis_priv = net_dev->priv;
- struct mii_phy *phy = NULL, *phy_home = NULL, *default_phy = NULL;
+ struct mii_phy *phy = NULL, *phy_home = NULL, *default_phy = NULL, *phy_lan = NULL;
u16 status;
for( phy=sis_priv->first_mii; phy; phy=phy->next ){
status = mdio_read(net_dev, phy->phy_addr, MII_STATUS);
status = mdio_read(net_dev, phy->phy_addr, MII_STATUS);
- /* Link ON & Not select deafalut PHY */
- if ( (status & MII_STAT_LINK) && !(default_phy) )
+ /* Link ON & Not select default PHY & not ghost PHY */
+ if ( (status & MII_STAT_LINK) && !default_phy && (phy->phy_types != UNKNOWN) )
default_phy = phy;
else{
status = mdio_read(net_dev, phy->phy_addr, MII_CONTROL);
@@ -660,12 +663,16 @@
status | MII_CNTL_AUTO | MII_CNTL_ISOLATE);
if( phy->phy_types == HOME )
phy_home = phy;
+ else if (phy->phy_types == LAN)
+ phy_lan = phy;
}
}
- if( (!default_phy) && phy_home )
+ if( !default_phy && phy_home )
default_phy = phy_home;
- else if(!default_phy)
+ else if( !default_phy && phy_lan )
+ default_phy = phy_lan;
+ else if ( !default_phy )
default_phy = sis_priv->first_mii;
if( sis_priv->mii != default_phy ){
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next parent reply other threads:[~2004-05-19 14:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040518120237.GC23565@picchio.gall.it>
[not found] ` <20040518123020.GF23565@picchio.gall.it>
2004-05-19 14:28 ` Daniele Venzano [this message]
2004-05-19 23:58 ` [PATCH] Sis900 bug fixes 3/4 Jeff Garzik
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=20040519142852.GC798@picchio.gall.it \
--to=webvenza@libero.it \
--cc=akpm@osdl.org \
--cc=dominik.karall@gmx.net \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
/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;
as well as URLs for NNTP newsgroup(s).