On Tue, 18 Nov 2014 14:11:15 +0000 (UTC) Ruslan Bukin <b...@freebsd.org> wrote:
> Author: br > Date: Tue Nov 18 14:11:14 2014 > New Revision: 274655 > URL: https://svnweb.freebsd.org/changeset/base/274655 > > Log: > Add Virtio MMIO bus driver. This is missing a config option to allow it to be built. I would like to test it on the arm64 simulator as it has a virtio option. > > Sponsored by: DARPA, AFRL > > Added: > head/sys/dev/virtio/mmio/ > head/sys/dev/virtio/mmio/virtio_mmio.c (contents, props changed) > head/sys/dev/virtio/mmio/virtio_mmio.h (contents, props changed) > head/sys/dev/virtio/mmio/virtio_mmio_if.m (contents, props > changed) Modified: > head/sys/dev/virtio/block/virtio_blk.c > ... > + > +static int > +vtmmio_probe(device_t dev) > +{ > + > + if (!ofw_bus_status_okay(dev)) > + return (ENXIO); > + > + if (!ofw_bus_is_compatible(dev, "virtio,mmio")) > + return (ENXIO); This should be split out to an fdt specific file at some stage as virtio-mmio is not fdt specefic. > + > + device_set_desc(dev, "VirtIO MMIO adapter"); > + return (BUS_PROBE_DEFAULT); > +} ... > + > +static int > +vtmmio_suspend(device_t dev) > +{ > + > + return (bus_generic_suspend(dev)); > +} > + > +static int > +vtmmio_resume(device_t dev) > +{ > + > + return (bus_generic_resume(dev)); > +} Why does vtmmio_suspend and vtmmio_resume exist? I would think they could be replaced with bus_generic_suspend and bus_generic_resume respectively in the device methods. Andrew _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"