cafe_ccic/ov7670 hang on boot
Daniel Drake
dsd at laptop.org
Tue Jun 17 14:54:53 EDT 2008
On Tue, 2008-06-17 at 12:44 -0600, Jonathan Corbet wrote:
> Daniel Drake <dsd at laptop.org> wrote:
>
> > The hang occurs somewhere inside/below ov7670_write_array.
> >
> > I'm just wondering if you have any ideas or suggestions here?
>
> I've seen the bug report go by, but I'm only just today back in the
> country after a couple of weeks on vacation. I'll look into it, but it
> will probably be a couple more days before I can do that.
>
> My initial guess is that something in the i2c layer has created some
> kind of locking confusion. i2c has changed a lot, and the interface
> used by the Cafe/ov7670 drivers is not now the preferred API. Sleeping
> after register writes will almost certainly *not* be helpful; all of
> those operations have timeouts on them, so you would be seeing failures,
> not hangs.
OK, thanks for the input. However there doesn't seem to be a timeout in
the case added by commit 6d77444aca29:
+ do {
+ prepare_to_wait(&cam->smbus_wait, &the_wait,
+ TASK_UNINTERRUPTIBLE);
+ schedule_timeout(1); /* even 1 jiffy is too long */
+ finish_wait(&cam->smbus_wait, &the_wait);
+ } while (!cafe_smbus_write_done(cam));
I'm only guessing, but I have a feeling we're looping infinitely there.
Also, we just noticed that the commit is included in the upstream kernel
but was never included in OLPC's downstream update1 kernel. So this is
perhaps an even more likely candidate for the bug..?
We're testing an XO with that patch reverted, so far so good but we
should leave it for longer before making conclusions.
Daniel
More information about the Devel
mailing list