int gpio_lanports_enable;
struct ifreq ifr;
struct net_device *dev;
- unsigned char port[6];
+ unsigned char port[9];
};
/* Currently we can only have one device in the system. */
return -EBUSY;
}
+ /* No spanning tree for unmanaged mode */
last_port = (robo.devid == ROBO_DEVICE_ID_5398) ?
- ROBO_PORT6_CTRL : ROBO_PORT3_CTRL;
- for (i = ROBO_PORT0_CTRL; i < last_port + 1; i++)
+ ROBO_PORT7_CTRL : ROBO_PORT4_CTRL;
+ for (i = ROBO_PORT0_CTRL; i <= last_port; i++)
robo_write16(ROBO_CTRL_PAGE, i, 0);
+
+ /* No spanning tree on IMP port too */
+ robo_write16(ROBO_CTRL_PAGE, ROBO_IM_PORT_CTRL, 0);
}
#ifdef CONFIG_BCM47XX
}
robo.device = devname;
- for (i = 0; i < 5; i++)
- robo.port[i] = i;
- robo.port[5] = 8;
/* try access using MII ioctls - get phy address */
err = do_ioctl(SIOCGMIIPHY);
robo.is_5365 = false;
robo.gmii = robo_gmii();
+ if (robo.devid == ROBO_DEVICE_ID_5325) {
+ for (i = 0; i < 5; i++)
+ robo.port[i] = i;
+ } else {
+ for (i = 0; i < 8; i++)
+ robo.port[i] = i;
+ }
+ robo.port[i] = ROBO_IM_PORT_CTRL;
robo_switch_reset();
err = robo_switch_enable();