[PATCH 07/11] nouveau/gsp: convert gsp errors to generic errors
Timur Tabi
timur at kernel.org
Sat Dec 23 06:20:03 UTC 2023
On Thu, Dec 21, 2023, 10:33 PM Dave Airlie <airlied at gmail.com> wrote:
> This should let the upper layers retry as needed on EAGAIN.
>
> There may be other values we will care about in the future, but
> this covers our present needs.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
>
> +static int
> +r535_rpc_status_to_errno(uint32_t rpc_status)
> +{
> + switch (rpc_status) {
> + case 0x55: /* NV_ERR_NOT_READY */
> + case 0x66: /* NV_ERR_TIMEOUT_RETRY */
> + return -EAGAIN;
> + case 0x51: /* NV_ERR_NO_MEMORY */
> + return -ENOMEM;
> + default:
> + return -EINVAL;
> + }
>
Shouldn't you also have this:
case 0:
return 0;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20231223/55b3fe7c/attachment.htm>
More information about the Nouveau
mailing list