[U-Boot] [PATCH 05/27] virtio: Add net driver support
Tuomas Tynkkynen
tuomas.tynkkynen at iki.fi
Thu Sep 27 22:12:19 UTC 2018
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.
...
> +
> +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.
I think this can be done by calling virtio_reset() on the device in some
uclass-level hook, maybe .child_post_remove().
More information about the U-Boot
mailing list