1 --- a/drivers/net/cpmac.c
2 +++ b/drivers/net/cpmac.c
4 #include <linux/skbuff.h>
7 -#include <linux/phy_fixed.h>
8 #include <linux/platform_device.h>
9 #include <linux/dma-mapping.h>
10 #include <linux/clk.h>
11 @@ -1108,8 +1107,6 @@ static const struct net_device_ops cpmac
12 .ndo_set_mac_address = eth_mac_addr,
15 -static int external_switch;
17 static int __devinit cpmac_probe(struct platform_device *pdev)
20 @@ -1121,24 +1118,18 @@ static int __devinit cpmac_probe(struct
22 pdata = pdev->dev.platform_data;
24 - if (external_switch || dumb_switch) {
25 - strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */
28 - for (phy_id = 0; phy_id < PHY_MAX_ADDR; phy_id++) {
29 - if (!(pdata->phy_mask & (1 << phy_id)))
31 - if (!cpmac_mii->phy_map[phy_id])
33 - strncpy(mdio_bus_id, cpmac_mii->id, MII_BUS_ID_SIZE);
36 + for (phy_id = 0; phy_id < PHY_MAX_ADDR; phy_id++) {
37 + if (!(pdata->phy_mask & (1 << phy_id)))
39 + if (!cpmac_mii->phy_map[phy_id])
41 + strncpy(mdio_bus_id, cpmac_mii->id, MII_BUS_ID_SIZE);
45 if (phy_id == PHY_MAX_ADDR) {
46 - dev_err(&pdev->dev, "no PHY present, falling back to switch on MDIO bus 0\n");
47 - strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */
49 + dev_err(&pdev->dev, "no PHY present\n");
53 dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES);
54 @@ -1266,14 +1257,8 @@ int __devinit cpmac_init(void)
59 - if (mask & (mask - 1)) {
60 - external_switch = 1;
64 cpmac_mii->phy_mask = ar7_is_titan()? ~(mask | 0x80000000 | 0x40000000):
65 - ~(mask | 0x80000001);
66 + ~(mask | 0x80000000);
67 snprintf(cpmac_mii->id, MII_BUS_ID_SIZE, "1");
69 res = mdiobus_register(cpmac_mii);