Re: solo6010 modprobe lockup since e1ceb25a (v4.3 regression)

From: Andrey Utkin
Date: Wed Sep 21 2016 - 09:46:11 EST

On Wed, Sep 21, 2016 at 03:16:57PM +0200, Krzysztof HaÅasa wrote:
> Hans Verkuil <hverkuil@xxxxxxxxx> writes:
> > That was probably the reason for the pci_read_config_word in the reg_write
> > code. Try putting that back (and just that).
> Yes. I guess a single pci_read_config_word() would suffice.
> Though it would obviously be much better to identify the place in the
> driver which needs to have the write buffers flushed, and add a read()
> just there.
> The interrupt handler maybe (e.g. just before the return IRQ_HANDLED)?
> OTOH this may be some sort of timing problem, I mean the faster code may
> put too much stress on the SOLO chip.
> Doesn't happen here so I can't test the cure.

It happens in solo_disp_init at uploading default motion thresholds

I've got a prints trace with solo6010-fix-lockup branch
the trace itself in jpg:

Indeed, targeted fixing would be more reasonable than making register
r/w routines follow blocking fashion. But the driver is already complete
and was known to be working, and I seems all places in code assume the
blocking fashion of reg r/w, and changing that assumption may lead to
covert bugs anywhere else, not just at probing, which may be hard to
nail down.

For now, I'll try setting pci_read_config_word() back instead of full
revert. Does it need to be just in reg_write? No need for it in
reg_read, right?