Re: [PATCH net-next v8 4/4] net: dsa: add basic initial driver for MxL862xx switches

From: Daniel Golle

Date: Tue Jan 27 2026 - 14:03:37 EST


On Tue, Jan 27, 2026 at 07:28:26PM +0100, Andrew Lunn wrote:
> > Some of the error values are useful, it *is* good to know whether eg. a
> > bridge cannot be allocated because (for what ever reason) of resource
> > exhaustion (-ENOMEM) or because of otherwise invalid settings (-EINVAL).
>
> We need to be careful with these. POSIX defines ENOMEM and EINVAL, but
> not their value. So you should add ZEPHYR_ENOMEM and ZEPHYR_EINVAL,
> just to make the name spaces clear.

I'd rather just not interpret the error numbers returned by the firmware
and just catch all negative numbers and return -EIO, like you suggested when
we discussed the RFC series.

See also https://patchwork.kernel.org/comment/26697045/