svn commit: r348262 - head/sys/dev/virtio/pci
Conrad Meyer
cem at FreeBSD.org
Sat May 25 01:59:26 UTC 2019
Author: cem
Date: Sat May 25 01:59:24 2019
New Revision: 348262
URL: https://svnweb.freebsd.org/changeset/base/348262
Log:
virtio_pci(4): Fix typo in read_ivar method
Prior to this revision, vtpci's BUS_READ_IVAR method on VIRTIO_IVAR_SUBVENDOR
accidentally returned the PCI subdevice.
The typo seems to have been introduced with the original commit adding
VIRTIO_IVAR_{{SUB,}DEVICE,{SUB,}VENDOR} to virtio_pci. The commit log and code
strongly suggest that the ivar was intended to return the subvendor rather than
the subdevice; it was likely just a copy/paste mistake.
Go ahead and rectify that.
Modified:
head/sys/dev/virtio/pci/virtio_pci.c
Modified: head/sys/dev/virtio/pci/virtio_pci.c
==============================================================================
--- head/sys/dev/virtio/pci/virtio_pci.c Sat May 25 01:58:00 2019 (r348261)
+++ head/sys/dev/virtio/pci/virtio_pci.c Sat May 25 01:59:24 2019 (r348262)
@@ -408,7 +408,7 @@ vtpci_read_ivar(device_t dev, device_t child, int inde
*result = pci_get_device(dev);
break;
case VIRTIO_IVAR_SUBVENDOR:
- *result = pci_get_subdevice(dev);
+ *result = pci_get_subvendor(dev);
break;
default:
return (ENOENT);
More information about the svn-src-all
mailing list