cafe_ccic/ov7670 hang on boot

Jonathan Corbet corbet at lwn.net
Tue Jun 17 15:08:47 EDT 2008


Daniel Drake <dsd at laptop.org> wrote:

> 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.

That, of course, would be easy enough to determine empirically.

> We're testing an XO with that patch reverted, so far so good but we
> should leave it for longer before making conclusions.

But does that get you back to the long startup times that the patch went
in to fix?  That won't make anybody happy.

If reverting this patch fixes the problem, then my earlier hypothesis of
i2c problems is completely wrong.  But it would sure be nice to know
what is really going on - the code in that patch is correct (though it
could benefit from a loop counter to keep it from going forever).  I
wonder if the behavior of the scheduler has changed enough that the
first cafe_smbus_write_done() call is happening too soon?

jon



More information about the Devel mailing list