diff options
Diffstat (limited to 'drivers/net/au1000_eth.c')
-rw-r--r-- | drivers/net/au1000_eth.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index c82b9cd1c924..332e9953c55c 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c | |||
@@ -151,13 +151,6 @@ struct au1000_private *au_macs[NUM_ETH_INTERFACES]; | |||
151 | SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | \ | 151 | SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | \ |
152 | SUPPORTED_Autoneg | 152 | SUPPORTED_Autoneg |
153 | 153 | ||
154 | static char *phy_link[] = | ||
155 | { "unknown", | ||
156 | "10Base2", "10BaseT", | ||
157 | "AUI", | ||
158 | "100BaseT", "100BaseTX", "100BaseFX" | ||
159 | }; | ||
160 | |||
161 | int bcm_5201_init(struct net_device *dev, int phy_addr) | 154 | int bcm_5201_init(struct net_device *dev, int phy_addr) |
162 | { | 155 | { |
163 | s16 data; | 156 | s16 data; |
@@ -785,6 +778,7 @@ static struct mii_chip_info { | |||
785 | {"Broadcom BCM5201 10/100 BaseT PHY",0x0040,0x6212, &bcm_5201_ops,0}, | 778 | {"Broadcom BCM5201 10/100 BaseT PHY",0x0040,0x6212, &bcm_5201_ops,0}, |
786 | {"Broadcom BCM5221 10/100 BaseT PHY",0x0040,0x61e4, &bcm_5201_ops,0}, | 779 | {"Broadcom BCM5221 10/100 BaseT PHY",0x0040,0x61e4, &bcm_5201_ops,0}, |
787 | {"Broadcom BCM5222 10/100 BaseT PHY",0x0040,0x6322, &bcm_5201_ops,1}, | 780 | {"Broadcom BCM5222 10/100 BaseT PHY",0x0040,0x6322, &bcm_5201_ops,1}, |
781 | {"NS DP83847 PHY", 0x2000, 0x5c30, &bcm_5201_ops ,0}, | ||
788 | {"AMD 79C901 HomePNA PHY",0x0000,0x35c8, &am79c901_ops,0}, | 782 | {"AMD 79C901 HomePNA PHY",0x0000,0x35c8, &am79c901_ops,0}, |
789 | {"AMD 79C874 10/100 BaseT PHY",0x0022,0x561b, &am79c874_ops,0}, | 783 | {"AMD 79C874 10/100 BaseT PHY",0x0022,0x561b, &am79c874_ops,0}, |
790 | {"LSI 80227 10/100 BaseT PHY",0x0016,0xf840, &lsi_80227_ops,0}, | 784 | {"LSI 80227 10/100 BaseT PHY",0x0016,0xf840, &lsi_80227_ops,0}, |
@@ -1045,7 +1039,7 @@ found: | |||
1045 | #endif | 1039 | #endif |
1046 | 1040 | ||
1047 | if (aup->mii->chip_info == NULL) { | 1041 | if (aup->mii->chip_info == NULL) { |
1048 | printk(KERN_ERR "%s: Au1x No MII transceivers found!\n", | 1042 | printk(KERN_ERR "%s: Au1x No known MII transceivers found!\n", |
1049 | dev->name); | 1043 | dev->name); |
1050 | return -1; | 1044 | return -1; |
1051 | } | 1045 | } |
@@ -1546,6 +1540,9 @@ au1000_probe(u32 ioaddr, int irq, int port_num) | |||
1546 | printk(KERN_ERR "%s: out of memory\n", dev->name); | 1540 | printk(KERN_ERR "%s: out of memory\n", dev->name); |
1547 | goto err_out; | 1541 | goto err_out; |
1548 | } | 1542 | } |
1543 | aup->mii->next = NULL; | ||
1544 | aup->mii->chip_info = NULL; | ||
1545 | aup->mii->status = 0; | ||
1549 | aup->mii->mii_control_reg = 0; | 1546 | aup->mii->mii_control_reg = 0; |
1550 | aup->mii->mii_data_reg = 0; | 1547 | aup->mii->mii_data_reg = 0; |
1551 | 1548 | ||
@@ -1609,8 +1606,7 @@ err_out: | |||
1609 | /* here we should have a valid dev plus aup-> register addresses | 1606 | /* here we should have a valid dev plus aup-> register addresses |
1610 | * so we can reset the mac properly.*/ | 1607 | * so we can reset the mac properly.*/ |
1611 | reset_mac(dev); | 1608 | reset_mac(dev); |
1612 | if (aup->mii) | 1609 | kfree(aup->mii); |
1613 | kfree(aup->mii); | ||
1614 | for (i = 0; i < NUM_RX_DMA; i++) { | 1610 | for (i = 0; i < NUM_RX_DMA; i++) { |
1615 | if (aup->rx_db_inuse[i]) | 1611 | if (aup->rx_db_inuse[i]) |
1616 | ReleaseDB(aup, aup->rx_db_inuse[i]); | 1612 | ReleaseDB(aup, aup->rx_db_inuse[i]); |
@@ -1809,8 +1805,7 @@ static void __exit au1000_cleanup_module(void) | |||
1809 | if (dev) { | 1805 | if (dev) { |
1810 | aup = (struct au1000_private *) dev->priv; | 1806 | aup = (struct au1000_private *) dev->priv; |
1811 | unregister_netdev(dev); | 1807 | unregister_netdev(dev); |
1812 | if (aup->mii) | 1808 | kfree(aup->mii); |
1813 | kfree(aup->mii); | ||
1814 | for (j = 0; j < NUM_RX_DMA; j++) { | 1809 | for (j = 0; j < NUM_RX_DMA; j++) { |
1815 | if (aup->rx_db_inuse[j]) | 1810 | if (aup->rx_db_inuse[j]) |
1816 | ReleaseDB(aup, aup->rx_db_inuse[j]); | 1811 | ReleaseDB(aup, aup->rx_db_inuse[j]); |