[PATCH] liteeth: LiteX Ethernet device

Joel Stanley joel at jms.id.au
Mon Sep 19 11:06:43 CEST 2022


On Sun, 18 Sept 2022 at 15:50, Sean Anderson <seanga2 at gmail.com> wrote:
>
> On 8/10/22 00:29, Joel Stanley wrote:
> > LiteX is a soft system-on-chip that targets FPGAs. LiteETH is a basic
> > network device that is commonly used in LiteX designs.

> > +static int liteeth_recv(struct udevice *dev, int flags, uchar **packetp)
> > +{
> > +     struct liteeth *priv = dev_get_priv(dev);
> > +     u8 rx_slot;
> > +     int len;
> > +
> > +     if (!litex_read8(priv->base + LITEETH_WRITER_EV_PENDING)) {
> > +             debug("liteeth: No packet ready\n");
> > +             return -EPERM;
>
> Shouldn't this be -EAGAIN?

Your suggestion makes more sense. I think I copied another driver with
these return codes, perhaps ftgmac100.

I'll respin with EAGAIN and EMSGSIZE.

Cheers,

Joel


More information about the U-Boot mailing list