Netdev List
 help / color / mirror / Atom feed
* [PATCH 1/1] Fix default phy selection after initialization
@ 2005-03-09  8:26 Daniele Venzano
  0 siblings, 0 replies; only message in thread
From: Daniele Venzano @ 2005-03-09  8:26 UTC (permalink / raw)
  To: netdev, jgarzik

[-- Attachment #1: Type: text/plain, Size: 439 bytes --]



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@libero.it>


[-- Attachment #2: Type: text/plain, Size: 690 bytes --]

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);
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-09  8:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-09  8:26 [PATCH 1/1] Fix default phy selection after initialization Daniele Venzano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox