netdev
[Top] [All Lists]

[PATCH 1/1] Fix default phy selection after initialization

To: netdev@xxxxxxxxxxx, jgarzik@xxxxxxxxx
Subject: [PATCH 1/1] Fix default phy selection after initialization
From: Daniele Venzano <webvenza@xxxxxxxxx>
Date: Wed, 9 Mar 2005 09:26:57 +0100 (CET)
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Python patchbomber v. 0.0.0.0.0.1

Previous patch correct only 99% of the time, the default phy can change during
normal operation, but the mii_info struct wosn't updated.
With the attached patch it is (to be applied on top of previous).

For the locking issue it seems that not only sis900_timer is affected. Mii
access is scattered all over the driver without locking, so I think there
is need of a lot more work.



Signed-off-by: Daniele Venzano <webvenza@xxxxxxxxx>

Index: sis900.c
===================================================================
--- a/drivers/net/sis900.c      (revision 98)
+++ b/drivers/net/sis900.c      (revision 99)
@@ -514,8 +514,6 @@ static int __devinit sis900_probe(struct
                goto err_out_unregister;
        }
 
-       sis_priv->mii_info.phy_id = sis_priv->cur_phy;
-
        /* save our host bridge revision */
        dev = pci_get_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630, NULL);
        if (dev) {
@@ -725,6 +723,8 @@ static u16 sis900_default_phy(struct net
                                        net_dev->name,sis_priv->cur_phy);
        }
        
+       sis_priv->mii_info.phy_id = sis_priv->cur_phy;
+
        status = mdio_read(net_dev, sis_priv->cur_phy, MII_CONTROL);
        status &= (~MII_CNTL_ISOLATE);
 
<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH 1/1] Fix default phy selection after initialization, Daniele Venzano <=