1 --- linux-2.6.24/drivers/net/Kconfig 2008-02-07 02:29:04.000000000 +0100
2 +++ linux-2.6.24/drivers/net/Kconfig 2008-02-07 02:29:35.000000000 +0100
6 tristate "TI AR7 CPMAC Ethernet support (EXPERIMENTAL)"
7 - depends on NET_ETHERNET && EXPERIMENTAL && AR7
8 + depends on NET_ETHERNET && EXPERIMENTAL && AR7 && BROKEN
11 - select FIXED_MII_100_FDX
13 TI AR7 CPMAC Ethernet support
15 --- linux-2.6.24/drivers/net/cpmac.c 2008-01-24 23:58:37.000000000 +0100
16 +++ linux-2.6.24/drivers/net/cpmac.c 2008-02-07 02:32:57.000000000 +0100
24 priv = netdev_priv(dev);
26 status = cpmac_read(priv->regs, CPMAC_MAC_INT_VECTOR);
28 spin_unlock(&priv->lock);
31 -static int cpmac_link_update(struct net_device *dev,
32 - struct fixed_phy_status *status)
35 - status->speed = 100;
40 static int cpmac_open(struct net_device *dev)
44 static int __devinit cpmac_probe(struct platform_device *pdev)
47 + int mdio_bus_id = cpmac_mii.id;
49 struct cpmac_priv *priv;
50 struct net_device *dev;
51 struct plat_cpmac_data *pdata;
52 - struct fixed_info *fixed_phy;
55 pdata = pdev->dev.platform_data;
56 @@ -1017,9 +1005,23 @@
59 if (phy_id == PHY_MAX_ADDR) {
60 - if (external_switch || dumb_switch)
61 + if (external_switch || dumb_switch) {
62 + struct fixed_phy_status status = {};
67 + * FIXME: this should be in the platform code!
68 + * Since there is not platform code at all (that is,
69 + * no mainline users of that driver), place it here
77 + fixed_phy_add(PHY_POLL, phy_id, &status);
79 printk(KERN_ERR "cpmac: no PHY present\n");
82 @@ -1063,32 +1065,8 @@
83 priv->msg_enable = netif_msg_init(debug_level, 0xff);
84 memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));
87 - snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, cpmac_mii.id,
90 - /* Let's try to get a free fixed phy... */
91 - for (i = 0; i < MAX_PHY_AMNT; i++) {
92 - fixed_phy = fixed_mdio_get_phydev(i);
95 - if (!fixed_phy->phydev->attached_dev) {
96 - strncpy(priv->phy_name,
97 - fixed_phy->phydev->dev.bus_id,
99 - fixed_mdio_set_link_update(fixed_phy->phydev,
100 - &cpmac_link_update);
104 - if (netif_msg_drv(priv))
105 - printk(KERN_ERR "%s: Could not find fixed PHY\n",
110 + snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
113 priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
114 PHY_INTERFACE_MODE_MII);
115 if (IS_ERR(priv->phy)) {