if (readl(ð->ievent) & FEC_IEVENT_MII)
break;
printf("Read MDIO failed...\n");
- return -1;
+ return -ETIMEDOUT;
}
}
if (readl(ð->ievent) & FEC_IEVENT_MII)
break;
printf("Write MDIO failed...\n");
- return -1;
+ return -ETIMEDOUT;
}
}
do {
if (get_timer(start) > (CONFIG_SYS_HZ * 5)) {
printf("%s: Autonegotiation timeout\n", dev->name);
- return -1;
+ return -ETIMEDOUT;
}
status = fec_mdio_read(eth, fec->phy_id, MII_BMSR);
if (status < 0) {
printf("%s: Autonegotiation failed. status: %d\n",
dev->name, status);
- return -1;
+ return status;
}
} while (!(status & BMSR_LSTATUS));
*/
if ((length > 1500) || (length <= 0)) {
printf("Payload (%d) too large\n", length);
- return -1;
+ return -EINVAL;
}
/*
}
if (!timeout) {
- ret = -EINVAL;
+ ret = -ETIMEDOUT;
goto out;
}
}
if (!timeout)
- ret = -EINVAL;
+ ret = -ETIMEDOUT;
out:
debug("fec_send: status 0x%x index %d ret %i\n",