Message ID | 20200407061613.21325-2-amitay@ozlabs.org |
---|---|
State | Superseded |
Headers | show |
Series | Add sbefifo backend | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | warning | Failed to apply on branch master (8b4611b5d8e7e2279fe4aa80c892fcfe10aa398d) |
snowpatch_ozlabs/apply_patch | fail | Failed to apply to any branch |
We didn't hit this because of the LOG() macro which is only enabled with -DLIBSBEFIFO_DEBUG=1. Reviewed-by: Alistair Popple <alistair@popple.id.au> On Tuesday, 7 April 2020 4:15:55 PM AEST Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> > --- > libsbefifo/operation.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/libsbefifo/operation.c b/libsbefifo/operation.c > index 07d9f64..8717f15 100644 > --- a/libsbefifo/operation.c > +++ b/libsbefifo/operation.c > @@ -60,17 +60,18 @@ static int sbefifo_transport(struct sbefifo_context > *sctx, uint8_t *msg, uint32_ int rc; > size_t buflen; > > + > buflen = msg_len; > rc = sbefifo_write(sctx, msg, buflen); > if (rc) { > - LOG("write: cmd=%08x, rc=%d\n", cmd, rc); > + LOG("write: cmd=%08x, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), rc); > return rc; > } > > buflen = *out_len; > rc = sbefifo_read(sctx, out, &buflen); > if (rc) { > - LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", cmd, buflen, rc); > + LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", be32toh(*(uint32_t *) (msg+4)), > buflen, rc); return rc; > }
diff --git a/libsbefifo/operation.c b/libsbefifo/operation.c index 07d9f64..8717f15 100644 --- a/libsbefifo/operation.c +++ b/libsbefifo/operation.c @@ -60,17 +60,18 @@ static int sbefifo_transport(struct sbefifo_context *sctx, uint8_t *msg, uint32_ int rc; size_t buflen; + buflen = msg_len; rc = sbefifo_write(sctx, msg, buflen); if (rc) { - LOG("write: cmd=%08x, rc=%d\n", cmd, rc); + LOG("write: cmd=%08x, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), rc); return rc; } buflen = *out_len; rc = sbefifo_read(sctx, out, &buflen); if (rc) { - LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", cmd, buflen, rc); + LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), buflen, rc); return rc; }
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> --- libsbefifo/operation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)