Skip to content

Commit

Permalink
Fix vhub HW ID complying USB identification
Browse files Browse the repository at this point in the history
Change vhub hw id to VID_1209&PID_8250 form as pointed out in #251.
  • Loading branch information
cezanne committed Jul 19, 2021
1 parent 3c859da commit 40d2ae9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion driver/vhci/usbip_root.inf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ AddService = usbip_vhci,%SPSVCINST_ASSOCSERVICE%, usbip_vhci_Service_Inst
[usbip_vhci_Service_Inst]
DisplayName = %ServiceDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbip_vhci.sys
LoadOrderGroup = Extended Base
Expand Down
8 changes: 4 additions & 4 deletions driver/vhci/usbip_vhci.inf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PnpLockDown=1

[Standard.NT$ARCH$]
%DeviceDesc%=usbip_vhci_Device, USBIPWIN\vhci
%vhub_DeviceDesc%=usbip_vhci_Device, USB\ROOT_HUB&VID1209&PID8250&REV0000
%vhub_DeviceDesc%=usbip_vhci_Device, USB\ROOT_HUB&VID_1209&PID_8250&REV_0000

[DestinationDirs]
DefaultDestDir = 12
Expand All @@ -38,7 +38,7 @@ CopyFiles=Drivers_Dir
[usbip_vhci_Device.NT$ARCH$.HW]
AddReg=usbip_vhci_Device_AddReg

[usbip_vhci_Device_AddReg]
[usbip_vhci_Device_AddReg]
HKR,,DeviceCharacteristics,0x10001,0x0100 ; Use same security checks on relative opens

;-------------- Service installation
Expand All @@ -49,7 +49,7 @@ AddService = usbip_vhci,%SPSVCINST_ASSOCSERVICE%, usbip_vhci_Service_Inst
[usbip_vhci_Service_Inst]
DisplayName = %ServiceDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbip_vhci.sys
LoadOrderGroup = Extended Base
Expand All @@ -62,4 +62,4 @@ DiskId1 = "usbip-win VHCI Disk"
DeviceDesc = "usbip-win VHCI"
vhub_DeviceDesc = "usbip-win VHUB"
ServiceDesc = "usbip-win VHCI Service"
DisplayClassName = "usbip-win"
DisplayClassName = "usbip-win"
2 changes: 1 addition & 1 deletion driver/vhci/vhci_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#define HWID_ROOT L"USBIPWIN\\root"
#define HWID_VHCI L"USBIPWIN\\vhci"
#define HWID_VHUB L"USB\\ROOT_HUB&VID1209&PID8250&REV0000"
#define HWID_VHUB L"USB\\ROOT_HUB&VID_1209&PID_8250&REV_0000"

extern LPCWSTR devcodes[];

Expand Down
4 changes: 2 additions & 2 deletions driver/vhci/vhci_pnp_id.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define DEVID_VHUB L"USB\\ROOT_HUB"

#define HWIDS_VHCI HWID_VHCI L"\0"
#define HWIDS_VHUB HWID_VHUB L"\0USB\\ROOT_HUB&VID1209&PID8250\0USB\\ROOT_HUB\0"
#define HWIDS_VHUB HWID_VHUB L"\0USB\\ROOT_HUB&VID_1209&PID_8250\0USB\\ROOT_HUB\0"

/* Device with zero class/subclass/protocol */
#define IS_ZERO_CLASS(vpdo) ((vpdo)->usbclass == 0x00 && (vpdo)->subclass == 0x00 && (vpdo)->protocol == 0x00 && (vpdo)->inum > 1)
Expand Down Expand Up @@ -180,4 +180,4 @@ pnp_query_id(pvdev_t vdev, PIRP irp, PIO_STACK_LOCATION irpstack)
}

return irp_done(irp, status);
}
}

0 comments on commit 40d2ae9

Please sign in to comment.