I have observed two things that I don’t fully understand. I hope somebody
can give me a hint.
I am writing a kernel driver of Cypress FX2 based device. I would like to
use one driver to handle both default VID/PID and the real VID/PID after
ReNumeration. So in my myusbdevice.inf file, I have something like this:
[USB.Mfg]
%UsbDesc% = DDInstall_USB, USB\VID_0699&PID_0361
%UsbDescDefault% = DDInstall_USB_DEFAULT, USB\VID_04B4&PID_8613
[DDInstall_USB.NTx86]
AddReg = AddRegistry_NT_Scope
[AddRegistry_NT_Scope]
HKLM,System\CurrentControlSet\Services\MyUsbDevice,PreEnum,0x00010001,0
[DDInstall_USB_DEFAULT.NTx86]
AddReg = AddRegistry_NT_Scope_Default
[AddRegistry_NT_Scope_Default]
HKLM,System\CurrentControlSet\Services\MyUsbDevice,PreEnum,0x00010001,1
So when power up, I will see the default VID/PID and the driver will run and
load the firmware based on PreEnum registry setting. After ReNumeration, the
USB device should report the real VID/PID and PreEnum registry value should
be updated by driver installation process. However, this does not work
sometimes, especially when I unplug and plug the USB device in the same USB
port. The PreEnum key is not updated after ReNumeration. Does anybody know
why?
The second question is that I am trying to use
UpdateDriverForPlugAndPlayDevices() to update the Usb device driver,
however, it never copies the driver and other firmware files to the
designated path. This works fine for PCI devices. Anybody knows anything
about it?
Thanks,
Zhongsheng Wang
PSPL Software Design Engineer
Phone: (503)627-5260
Fax: (503)627-5622
Email: xxxxx@tek.com