Date: Tue, 03 Feb 2026 17:27:46 +0000 From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 2f3f5055e7f6 - main - virtio_p9fs: Use VIRTIO_SIMPLE_PNPINFO Message-ID: <69823012.1f914.64cc37d0@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=2f3f5055e7f69567f7aaca2f5b77655df34c4bb0 commit 2f3f5055e7f69567f7aaca2f5b77655df34c4bb0 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2026-02-03 17:13:35 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2026-02-03 17:13:35 +0000 virtio_p9fs: Use VIRTIO_SIMPLE_PNPINFO This allows us to also use the common VIRTIO_SIMPLE_PROBE and to have devmatch load the driver when detected. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D54684 --- sys/dev/virtio/p9fs/virtio_p9fs.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/dev/virtio/p9fs/virtio_p9fs.c b/sys/dev/virtio/p9fs/virtio_p9fs.c index aa84d3970698..2b276a60aa9a 100644 --- a/sys/dev/virtio/p9fs/virtio_p9fs.c +++ b/sys/dev/virtio/p9fs/virtio_p9fs.c @@ -84,6 +84,8 @@ static struct virtio_feature_desc virtio_9p_feature_desc[] = { { 0, NULL } }; +VIRTIO_SIMPLE_PNPINFO(virtio_p9fs, VIRTIO_ID_9P, "VirtIO 9P Transport"); + /* We don't currently allow canceling of virtio requests */ static int vt9p_cancel(void *handle, struct p9_req_t *req) @@ -257,13 +259,7 @@ vt9p_alloc_virtqueue(struct vt9p_softc *sc) static int vt9p_probe(device_t dev) { - - /* If the virtio device type is a 9P device, then we claim and attach it */ - if (virtio_get_device_type(dev) != VIRTIO_ID_9P) - return (ENXIO); - device_set_desc(dev, "VirtIO 9P Transport"); - - return (BUS_PROBE_DEFAULT); + return (VIRTIO_SIMPLE_PROBE(dev, virtio_p9fs)); } static voidhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69823012.1f914.64cc37d0>
