> Maybe phylib should retry a number of times - but with read-sensitive > registers, if the read has already completed successfully, and its > just a problem with the FEC MDIO hardware, that could cause issues.
Hi Russell At the bus level, MDIO cannot fail. The bits get clocked out, and the bits get clocked in. There is no way for the PHY to stretch the clock as I2C slaves can. There is nothing like the USB NACK, try again later. If something fails, it fails at a higher level, which means it is a driver issue. In this case, the interrupt got delayed, after the timer interrupt. The FEC is also quite unusual in using an interrupt. Most MDIO drivers poll. And if time gets 'stretched' because the system is too busy, generally, the right thing happens anyway. So i don't think it is phylib job to work around this issue. Andrew