Re: Infinite loop on edge cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 09/04/2019 10:44:27+0200, Mastro Gippo wrote:
> Hello, I have been testing the latest RTC drivers on an OpenWrt build on a
> MTK7688 SOC and I got an infinite loop on boot that would block the entire
> system.

You should not use hctosys that would solve you boot issue.

> Basically, if I don't have a RTC connected, any read would return 0xFF.
> That may be also be a problem of the I2C driver, that instead of generating
> an error just returns that value. But this may happen in other cases, like
> if we add an EEPROM or another IC with the same address as the RTC, or the
> RTC IC fails in some unpredictable way.
> The current implementation of that piece of code has some bad practices
> that lead to infinite loops due to this error.

You have to fix the i2c bus driver because this one has to return an
error so regmap can handle it properly.

Regarding other cases, like adding an EEPROM or another IC with the same
address as the RTC. Then the answer is to fix your device tree. If it
doesn't properly describe your hardware, then you shouldn't expect Linux
to run properly.

But again, this infinite loop doesn't have to be fatal anyway, as long
as you are not using hctosys.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux