Re: [PATCH] mhi_bus: core: Return EBUSY if MHI ring is full
From: Jeffrey Hugo
Date: Wed Feb 17 2021 - 10:24:21 EST
On 2/17/2021 8:02 AM, Loic Poulain wrote:
On Tue, 16 Feb 2021 at 19:50, Jeffrey Hugo <jhugo@xxxxxxxxxxxxxx> wrote:
From: Fan Wu <wufan@xxxxxxxxxxxxxx>
Currently ENOMEM is returned when MHI ring is full. This error code is
very misleading. Change to EBUSY instead.
Well, there is no space left in the ring, so it's no so misleading.
ENOMEM is typically a memory allocation failure which is not what a
client is going to think of regarding the ring, and it's not a unique
failure code in this case. gen_tre can also return ENOMEM, which makes
it difficult for the client to know if there is some significant
failure, or they might just need to wait (assuming that is something the
client can do).
--
Jeffrey Hugo
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.