Re: [RFC] w1: Disable irqs in critical section

From: Evgeniy Polyakov
Date: Wed Sep 14 2011 - 15:46:09 EST


On Wed, Sep 14, 2011 at 02:23:25PM +0200, Jan Weitzel (J.Weitzel@xxxxxxxxx) wrote:
> > Finally, can we fine-tune the interrupt-disabled section a bit? For
> > example, can the local_irq_disable() be moved to after the
> > write_bit(..., 0)?
> >
> The falling edge from 1 to 0 starts timing for the slave. After the 6Âs
> the slave should drive the line low (In case the information bit is
> "0"). So there is no additional edge on the line. If there is an
> interrupt and the low pulse from master is longer, slave did't see it.
> Master need to generate the 1 -> 0 transition and measure after 15Âs
>
> I tested it anyhow. Behaviour is slightly better than without disabling
> interrupts. Only disabling it for 15Âs fix the problem.

Sad story, but if it is the only solution, then we should go with it.

Andrew, please push this patch upstream.

Thank you Jan.

Acked-by: Evgeniy Polyakov <zbr@xxxxxxxxxxx>

--
Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/