From a3166ef7a5c6dd2bdefa1ae26f14ad82f2ba6203 Mon Sep 17 00:00:00 2001 From: Jorgen Lundman Date: Thu, 12 Sep 2024 09:21:41 +0900 Subject: [PATCH] Only initialise once in AddDevice including Storport. Signed-off-by: Jorgen Lundman --- module/os/windows/zfs/zfs_ioctl_os.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/module/os/windows/zfs/zfs_ioctl_os.c b/module/os/windows/zfs/zfs_ioctl_os.c index 66e24e28799e..026d42ad75b3 100644 --- a/module/os/windows/zfs/zfs_ioctl_os.c +++ b/module/os/windows/zfs/zfs_ioctl_os.c @@ -1144,7 +1144,8 @@ OpenZFS_AddDevice( } // From DriverLoad - if (PhysicalDeviceObject->DeviceType == FILE_DEVICE_CONTROLLER) { + if (PhysicalDeviceObject->DeviceType == FILE_DEVICE_CONTROLLER && + DriverExtension->PhysicalDeviceObject == NULL) { DriverExtension->PhysicalDeviceObject = PhysicalDeviceObject; @@ -1264,13 +1265,6 @@ OpenZFS_AddDevice( return (STATUS_SUCCESS); } - dprintf("Weird, AddDevice calling StorPort\n"); - - // Let StorPort have a go - if (DriverExtension->STOR_AddDevice) - status = DriverExtension->STOR_AddDevice(DriverObject, - PhysicalDeviceObject); - return (STATUS_SUCCESS); }