Hi Simon, On Thu, Sep 27, 2018 at 9:43 PM Simon Glass <s...@chromium.org> wrote: > > Hi Bin, > > On 23 September 2018 at 06:42, Bin Meng <bmeng...@gmail.com> wrote: > > This adds a transport driver that implements UCLASS_VIRTIO for > > virtio over pci, which is commonly used on x86. > > > > It only supports the legacy interface of the pci transport, which > > is the default device that QEMU emulates. > > > > Signed-off-by: Bin Meng <bmeng...@gmail.com> > > --- > > > > drivers/virtio/Kconfig | 8 + > > drivers/virtio/Makefile | 1 + > > drivers/virtio/virtio_pci.c | 420 > > ++++++++++++++++++++++++++++++++++++++++++++ > > drivers/virtio/virtio_pci.h | 173 ++++++++++++++++++ > > 4 files changed, 602 insertions(+) > > create mode 100644 drivers/virtio/virtio_pci.c > > create mode 100644 drivers/virtio/virtio_pci.h > > Reviewed-by: Simon Glass <s...@chromium.org> > > vring_create_virtqueue() should return an error I think - you assume -ENOMEM >
It returns a NULL pointer and the error is -ENOMEM, which will be checked by the caller via IS_ERR() > That is a huge table of PCI devices. Can you use a class instead? Unfortunately we can't. The virtio spec does not define a dedicated class. Regards, Bin _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot