- if (do_ioctl(SIOCGMIIPHY, NULL) < 0) {
- robo.use_et = 1;
- robo.phy_addr = ROBO_PHY_ADDR;
- } else {
- /* got phy address check for robo address */
- struct mii_ioctl_data *mii = (struct mii_ioctl_data *) &robo.ifr.ifr_data;
- if ((mii->phy_id != ROBO_PHY_ADDR) &&
- (mii->phy_id != ROBO_PHY_ADDR_BCM63XX) &&
- (mii->phy_id != ROBO_PHY_ADDR_TG3)) {
- printk("Invalid phy address (%d)\n", mii->phy_id);
- return 1;
- }
- robo.use_et = 0;
- /* The robo has a fixed PHY address that is different from the
- * Tigon3 and BCM63xx PHY address. */
- robo.phy_addr = ROBO_PHY_ADDR;
+ if (do_ioctl(SIOCGMIIPHY) < 0) {
+ printk("error while accessing MII phy registers with ioctls\n");
+ goto done;