]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
virtio(4): Expose PNP metadata through newbus
authorcem <cem@FreeBSD.org>
Tue, 4 Jun 2019 02:34:59 +0000 (02:34 +0000)
committercem <cem@FreeBSD.org>
Tue, 4 Jun 2019 02:34:59 +0000 (02:34 +0000)
commit5ec4a5181424a4d6f4209a2d27fd70808b33b790
treec31d0184acd5d8bb1b3685fad54ac082e6c8c758
parente114a5fd29b0a505f8796295f0fed416d7802a6f
virtio(4): Expose PNP metadata through newbus

Expose the same fields and widths from both vtio buses, even though they
don't quite line up; several virtio drivers can attach to both buses,
and sharing a PNP info table for both seems more convenient.

In practice, I doubt any virtio driver really needs to match on anything
other than bus and device_type (eliminating the unused entries for
vtmmio), and also in practice device_type is << 2^16 (so far, values
range from 1 to 20).  So it might be fine to only expose a 16-bit
device_type for PNP purposes.  On the other hand, I don't see much harm
in overkill here.

Reviewed by: bryanv, markj (earlier version)
Differential Revision: https://reviews.freebsd.org/D20406
sys/dev/virtio/mmio/virtio_mmio.c
sys/dev/virtio/pci/virtio_pci.c
sys/dev/virtio/virtio.c
sys/dev/virtio/virtio.h