From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Meng Date: Wed, 3 Oct 2018 00:10:45 +0800 Subject: [U-Boot] [PATCH 05/27] virtio: Add net driver support In-Reply-To: <529204d2-aee7-052a-f4bb-e4812a3ff2b7@iki.fi> References: <1537710145-1888-1-git-send-email-bmeng.cn@gmail.com> <1537710145-1888-6-git-send-email-bmeng.cn@gmail.com> <529204d2-aee7-052a-f4bb-e4812a3ff2b7@iki.fi> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tuomas, On Fri, Sep 28, 2018 at 6:12 AM Tuomas Tynkkynen wrote: > > Hi Bin, > > On 09/23/2018 04:42 PM, Bin Meng wrote: > > From: Tuomas Tynkkynen > > > > This adds virtio net device driver support. > > > > Signed-off-by: Tuomas Tynkkynen > > Signed-off-by: Bin Meng > > --- > ... > > +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