[U-Boot] [PATCH 05/27] virtio: Add net driver support

Bin Meng bmeng.cn at gmail.com
Tue Oct 2 16:10:45 UTC 2018


Hi Tuomas,

On Fri, Sep 28, 2018 at 6:12 AM Tuomas Tynkkynen
<tuomas.tynkkynen at iki.fi> wrote:
>
> Hi Bin,
>
> On 09/23/2018 04:42 PM, Bin Meng wrote:
> > From: Tuomas Tynkkynen <tuomas.tynkkynen at iki.fi>
> >
> > This adds virtio net device driver support.
> >
> > Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen at iki.fi>
> > Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> > ---
> ...
> > +static u32 feature[] = {
> > +     VIRTIO_NET_F_MAC
> > +};
> > +
> > +static u32 feature_legacy[] = {
> > +     VIRTIO_NET_F_MAC
> > +};
>
> These can be const.
>

Will do in v2.

> ...
> > +
> > +static void virtio_net_stop(struct udevice *dev)
> > +{
> > +     /*
> > +      * There is no way to stop the queue from running, unless we issue
> > +      * a reset to the virtio device, and re-do the queue initialization
> > +      * from the beginning.
> > +      */
> > +}
>
> Unless I missed it, we still need to do something when we pass control to
> Linux so that the memory used for receive buffers doesn't get overwritten
> by the virtio device during Linux boot.
>

Yes, you are correct.

> I think this can be done by calling virtio_reset() on the device in some
> uclass-level hook, maybe .child_post_remove().

Will do in v2.

Regards,
Bin


More information about the U-Boot mailing list