The code currently in git does not compile. A quick visual inspection shows
the obviously incorrect code. This is in raspberrypi/i2c/i2c.c around line
95.
I am guessing that the assignment is not intended to be in the conditional
expression but Jan needs to confirm that and submit a new patch.

Did this make it to any branches?

      /* Sleep until the TX FIFO has free space for a new write. */
      if (
          bus->task_id = rtems_task_self();
          rtems_event_transient_receive(RTEMS_WAIT, bus->base.timeout) !=
          RTEMS_SUCCESSFUL
      ) {
        rtems_event_transient_clear();

        return -ETIMEDOUT;
      }


On Tue, Dec 1, 2015 at 8:11 PM, Gedare Bloom <ged...@rtems.org> wrote:

> can you file a ticket and describe the bug this fixes. then #close the
> ticket with the commit message.
>
> On Mon, Nov 30, 2015 at 5:16 PM, Jan Sommer
> <soja-li...@aries.uberspace.de> wrote:
> > Before having the i2c device as an shared resource will create a
> deadlock because the taskid
> > for the transient_event is only stored during device registration.
> > ---
> >  c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c
> b/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c
> > index 14a2467..9bf90ec 100644
> > --- a/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c
> > +++ b/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c
> > @@ -91,6 +91,7 @@ static int rpi_i2c_bus_transfer(rpi_i2c_bus *bus)
> >        BCM2835_REG(BCM2835_I2C_C) |= (1 << 9);
> >
> >        /* Sleep until the TX FIFO has free space for a new write. */
> > +      bus->task_id = rtems_task_self();
> >        if (
> >            rtems_event_transient_receive(RTEMS_WAIT, bus->base.timeout)
> !=
> >            RTEMS_SUCCESSFUL
> > --
> > 2.5.0
> >
> > _______________________________________________
> > devel mailing list
> > devel@rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
> _______________________________________________
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to