git: 6a4f0c063718 - main - pci_iov: Add a device_printf if out of bus numbers

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Wed, 25 Sep 2024 22:19:12 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=6a4f0c063718781c5e3eddbeff0da7b89d290d1e

commit 6a4f0c063718781c5e3eddbeff0da7b89d290d1e
Author:     Val Packett <val@packett.cool>
AuthorDate: 2024-09-25 22:17:16 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2024-09-25 22:17:16 +0000

    pci_iov: Add a device_printf if out of bus numbers
    
    Reviewed by:    imp
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D20591
---
 sys/dev/pci/pci_iov.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/dev/pci/pci_iov.c b/sys/dev/pci/pci_iov.c
index 1f1138b2d336..31bbb74e791f 100644
--- a/sys/dev/pci/pci_iov.c
+++ b/sys/dev/pci/pci_iov.c
@@ -736,6 +736,7 @@ pci_iov_config(struct cdev *cdev, struct pci_iov_arg *arg)
 
 	/* We don't yet support allocating extra bus numbers for VFs. */
 	if (pci_get_bus(dev) != PCI_RID2BUS(last_rid)) {
+		device_printf(dev, "not enough PCIe bus numbers for VFs\n");
 		error = ENOSPC;
 		goto out;
 	}