Re: [PATCH] i2c: axxia: Add bus recovery functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Wed, May 13, 2015 at 09:20:48AM +0200, Michael Lawnick wrote:
> Am 13.05.2015 um 08:55 schrieb ext Uwe Kleine-König:
> >On Wed, May 13, 2015 at 08:19:59AM +0200, Michael Lawnick wrote:
> >>Am 12.05.2015 um 21:12 schrieb Wolfram Sang:
> >>>Doesn't look right. -EAGAIN means arbitration lost which is not a
> >>>condition to reset the bus in a multi-master setup.
> >>
> >>IMHO in multi-master scenario bus recovery is never save. There is
> >>need of higher level synchronization to find out whether any master
> >>is active.
> >Right. But you might be lucky and it's ok when done on error conditions
> >like "sda is low since 300 ms". But on arbitration loss it's definitely
> >wrong. Consider two masters where one resets the bus while the other
> >does a transfer. That results in a arbitration loss for the latter. So
> >the latter resets the bus and in the meantime the first one does a transfer
> >now that the bus should be free. You see the loop?
> 
> Of course.
> The question is: do/can controllers properly distinguish between
> arbitration loss and permanent SDL low? I always worked with single
> master assumption in last 10 years and /feel/ /to/ /remember/ to
> have observed situations were bus lock was signaled as arbitration
> loss.
yeah, that might be true for some (or even most) controllers. Still from
a high-level view "arbitration lost" means the controller started the
transfer and in the middle observed a low SDA while it doesn't pull it
low. If SDA is stuck low instead the controller cannot even put a start
condition on the bus.

> I'm simply in doubt that multi master can be handled at driver level
> at all. This might mean in consequence that unlocking the bus should
> not be done automatically, but by an extra I2C method triggered by
> application level.
At least it should not automatically triggered on error conditions that
might result from another master on the bus. IMHO doing it once at probe
time and then only when SDA is stuck low for say 1s should be fine.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux