git: ddcf8be82b0f - main - hyperv: Stop bus relations handling from falling through to eject

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Tue, 15 Sep 2026 01:57:01 UTC
The branch main has been updated by kbowling:

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

commit ddcf8be82b0f17c767d2edab026a4f5cfa3d217e
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-09-14 22:31:58 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-09-15 01:56:44 +0000

    hyperv: Stop bus relations handling from falling through to eject
    
    The PCI_BUS_RELATIONS2 case lacks a break after queuing the reported
    devices.  It consequently processes the same packet as PCI_EJECT,
    interpreting device_count as the slot number.  If that value matches an
    existing child, the callback schedules an unintended device eject.
    
    End the relations case after processing the device list, matching the
    original PCI_BUS_RELATIONS handling.
    
    Fixes:  ea11861e434a ("arm64: Hyper-V: vPCI: Enabling v-PCI in FreeBSD in ARM64 Hyper-V")
    MFC after:      2 weeks
    Sponsored by:   BBOX.io
---
 sys/dev/hyperv/pcib/vmbus_pcib.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c
index c90d1e1fb028..cec98c4db7a8 100644
--- a/sys/dev/hyperv/pcib/vmbus_pcib.c
+++ b/sys/dev/hyperv/pcib/vmbus_pcib.c
@@ -1013,6 +1013,7 @@ vmbus_pcib_on_channel_callback(struct vmbus_channel *chan, void *arg)
 					break;
 
 				hv_pci_devices_present2(hbus, bus_rel2);
+				break;
 
 			case PCI_EJECT:
 				dev_msg = (struct pci_dev_incoming *)buffer;