Re: [PATCH] Sis900 bug fixes 3/4

From: Daniele Venzano
Date: Tue May 18 2004 - 07:41:01 EST


Obviously I had to forget at least one attachment...
Sorry for the noise.

--
-----------------------------
Daniele Venzano
Web: http://teg.homeunix.org

--- linux-2.6.6/drivers/net/sis900.c 2004-05-18 11:43:20.000000000 +0200
+++ linux-sis900/drivers/net/sis900.c 2004-05-18 11:34:43.000000000 +0200
@@ -644,7 +644,7 @@
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 ){
@@ -660,12 +660,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: signature.asc
Description: Digital signature