1 --- a/drivers/net/ar231x.c
2 +++ b/drivers/net/ar231x.c
3 @@ -149,6 +149,7 @@ static int ar231x_mdiobus_write(struct m
4 static int ar231x_mdiobus_reset(struct mii_bus *bus);
5 static int ar231x_mdiobus_probe (struct net_device *dev);
6 static void ar231x_adjust_link(struct net_device *dev);
7 +static bool no_phy = false;
10 #define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args)
11 @@ -298,6 +299,21 @@ int __init ar231x_probe(struct platform_
13 mdiobus_register(sp->mii_bus);
15 + /* Workaround for Micrel switch, which is only available on
16 + * one PHY and cannot be configured through MDIO */
19 + get_phy_id(sp->mii_bus, 1, &phy_id);
20 + if (phy_id == 0x00221450)
25 + netif_carrier_on(dev);
30 if (ar231x_mdiobus_probe(dev) != 0) {
31 printk(KERN_ERR "%s: mdiobus_probe failed\n", dev->name);
32 rx_tasklet_cleanup(dev);
33 @@ -354,8 +370,10 @@ static int __devexit ar231x_remove(struc
34 rx_tasklet_cleanup(dev);
35 ar231x_init_cleanup(dev);
36 unregister_netdev(dev);
37 - mdiobus_unregister(sp->mii_bus);
38 - mdiobus_free(sp->mii_bus);
40 + mdiobus_unregister(sp->mii_bus);
41 + mdiobus_free(sp->mii_bus);
46 @@ -856,7 +874,12 @@ static int ar231x_rx_int(struct net_devi
47 dev->stats.rx_bytes += skb->len;
49 /* pass the packet to upper layers */
54 + skb->protocol = eth_type_trans(skb, skb->dev);
60 @@ -1153,6 +1176,9 @@ static int ar231x_ioctl(struct net_devic
61 struct ar231x_private *sp = netdev_priv(dev);