Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 May 2019 01:59:25 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348262 - head/sys/dev/virtio/pci
Message-ID:  <201905250159.x4P1xPiV077152@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905250159.x4P1xPiV077152>