[lkml]   [2018]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RESEND] rtc: snvs: Fix usage of snvs_rtc_enable
On Thu, 2018-03-29 at 02:53 +0100, Bryan O'Donoghue wrote:
> On 29/03/18 01:12, Trent Piepho wrote:
> > I sent a patch a couple weeks ago that addressed a similar issue, see
> >
> >
> > Does this also fix the problem you see?
> It breaks the endless loop that happens later on in the RTC read path.
> This patch though is about fixing the bug with not handling the enable
> of the snvs_rtc_enable() correctly, which is why it should be applied.
> The right flow is to handle the error on snvs_rtc_enable() as soon as it
> happens as opposed wait for read() to -ETIMEDOUT.

Unless there are boards that don't enable the 32kHz oscillator until
after the kernel driver loads. I was concerned about that so didn't
add the check in probe to prevent the driver from loading. If the
possible disruption of that is acceptable, then it does seem better to
fail to load.

However, I think that even if the driver fails to probe if there is a
timeout at probe time, it's still possible to hang later if there are
not limits to the hardware polling loops, such as the ones I added.

> > I think what you've done will prevent the driver from loading if the
> > clock is not working, but if the clock does not tick properly after
> > loading, there are still points (snvs_rtc_read_time for one) that will
> > lock up in the kernel.
> I'll dig out your patch and give it a review.
 \ /
  Last update: 2018-03-31 00:59    [W:0.095 / U:6.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site