lkml.org 
[lkml]   [2001]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] one more starfire net driver fix for 2.4.7pre6
Hi,

This patch reverses the MII hunk from the previous patch, which was
apparently breaking some cards. It also fixes an incorrect comment.

Please apply.

Thanks,
Ion

--
It is better to keep your mouth shut and be thought a fool,
than to open it and remove all doubt.
---------------------------------
--- linux-2.4/drivers/net/starfire.c.orig Thu Jul 12 10:15:18 2001
+++ linux-2.4/drivers/net/starfire.c Thu Jul 12 10:17:30 2001
@@ -87,8 +87,7 @@

LK1.3.3 (Ion Badulescu)
- Initialize the TxMode register properly
- - Set the MII registers _after_ resetting it
- - Don't dereference dev->priv after unregister_netdev() has freed it
+ - Don't dereference dev->priv after freeing it

TODO:
- implement tx_timeout() properly
@@ -987,12 +986,12 @@
struct netdev_private *np = dev->priv;
u16 reg0;

+ mdio_write(dev, np->phys[0], MII_ADVERTISE, np->advertising);
mdio_write(dev, np->phys[0], MII_BMCR, BMCR_RESET);
udelay(500);
while (mdio_read(dev, np->phys[0], MII_BMCR) & BMCR_RESET);

reg0 = mdio_read(dev, np->phys[0], MII_BMCR);
- mdio_write(dev, np->phys[0], MII_ADVERTISE, np->advertising);

if (np->autoneg) {
reg0 |= BMCR_ANENABLE | BMCR_ANRESTART;
@@ -1939,12 +1938,12 @@
pci_free_consistent(pdev, PAGE_SIZE,
np->rx_ring, np->rx_ring_dma);

- unregister_netdev(dev); /* Will also free np!! */
+ unregister_netdev(dev);
iounmap((char *)dev->base_addr);
pci_release_regions(pdev);

pci_set_drvdata(pdev, NULL);
- kfree(dev);
+ kfree(dev); /* Will also free np!! */
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.030 / U:11.836 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site