[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABb+yY06VZB8mk7S=N1LO=AcwyOH2nfuGo-eyxRdRx782jDB_Q@mail.gmail.com>
Date: Fri, 16 Sep 2022 10:57:44 -0500
From: Jassi Brar <jassisinghbrar@...il.com>
To: Evgenii Shatokhin <e.shatokhin@...ro.com>
Cc: linux-kernel@...r.kernel.org, Ilya Kuznetsov <ilya@...ro.com>,
linux@...ro.com
Subject: Re: [PATCH 1/2] mailbox: Propagate errors from .send_data() callback
to mbox_send_message()
On Thu, Sep 15, 2022 at 11:49 AM Evgenii Shatokhin
<e.shatokhin@...ro.com> wrote:
>
> msg_submit() calls .send_data() function from the mailbox controller driver
> to place the first of the queued messages to the mailbox. Depending on the
> actual driver used, this operation could fail.
>
> In this case, if mbox_send_message() is called in blocking mode, it will
> always return -ETIME rather than the actual error reported by the
> underlying driver. This could be confusing, so let us propagate the
> error from msg_submit() to mbox_send_message().
>
In blocking mode, the client gets -ETIME because the api waited long
enough for the transfer to be successful.
It is the job of the underlying controller driver to be in a
consistent state and recover from errors. It may print its own error
but the client shouldn't have to differentiate between failure causes.
thanks
Powered by blists - more mailing lists