I have a kernel-mode driver (WDF) that works fine in all versions except for
Vista. In Vista during driver installation I get a "This device cannot start
(Code 10)" error. I believe I have traced it down to a call of
WdfUsbTargetDeviceSelectConfig() which is returning STATUS_INVALID_PARAMETER.
I'm confused because this driver works fine under non-vista versions (at
least Win2k, and XP). Does anyone know of anything that might be causing
this? I have examined the parameters and can't see where anyone of them is
invalid. My call looks like:

status = WdfUsbTargetDeviceSelectConfig(pDeviceContext->UsbDevice,
WDF_NO_OBJECT_ATTRIBUTES,
&configParams);

Where pDeviceContext->UsbDevice was set with a call to
WdfUsbTargetDeviceCreate() which returned STATUS_SUCCESS and configParams was
initialized with WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_SINGLE_INTERFACE()

Thanks.
Greg

Re: USB Device "Code 10" failure under Vista by Eliyas

Eliyas
Wed Mar 14 09:57:06 CDT 2007

My guess is that the MaxPacket value in one of the endpoint descriptors
doesn't conform to the USB spec.

I ran into this problem with OSRUSBFX2 learning device. This device doesn't
work on vista if you plug into USB 1.1 port. The interrupt endpoint
Maxpacket is 0x49 instead of 0x40. The Vista USB stack expects the value to
be less than or equal to 0x40 when the device is operating under fullspeed
mode. This change was made on Vista to avoid bugchecks in USBUHCI if the
device error is ignored.

Let us first make sure this is indeed the issue then we will discuss about
how to workaround this problem in software (if you can't fix your hardware)
because it's not pretty.

-Eliyas

"GPS" <GPS@discussions.microsoft.com> wrote in message
news:8C33102E-CB11-4934-9C74-35B88D24E206@microsoft.com...
>I have a kernel-mode driver (WDF) that works fine in all versions except
>for
> Vista. In Vista during driver installation I get a "This device cannot
> start
> (Code 10)" error. I believe I have traced it down to a call of
> WdfUsbTargetDeviceSelectConfig() which is returning
> STATUS_INVALID_PARAMETER.
> I'm confused because this driver works fine under non-vista versions (at
> least Win2k, and XP). Does anyone know of anything that might be causing
> this? I have examined the parameters and can't see where anyone of them
> is
> invalid. My call looks like:
>
> status = WdfUsbTargetDeviceSelectConfig(pDeviceContext->UsbDevice,
> WDF_NO_OBJECT_ATTRIBUTES,
> &configParams);
>
> Where pDeviceContext->UsbDevice was set with a call to
> WdfUsbTargetDeviceCreate() which returned STATUS_SUCCESS and configParams
> was
> initialized with
> WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_SINGLE_INTERFACE()
>
> Thanks.
> Greg



Re: USB Device "Code 10" failure under Vista by GPS

GPS
Wed Mar 14 10:19:51 CDT 2007

Eureka!

You are absolutely correct. The previous developer had transposed the
nibbles of a big endian value of 0x0008 (used by the firmware) into 0x8000
rather than 0x0800 when converting to little endian (used by the host)! I
was able to correct that value in the device firmware and I no longer get
this error!

Thanks!
Greg

"Eliyas Yakub [MSFT]" wrote:

> My guess is that the MaxPacket value in one of the endpoint descriptors
> doesn't conform to the USB spec.
>
> I ran into this problem with OSRUSBFX2 learning device. This device doesn't
> work on vista if you plug into USB 1.1 port. The interrupt endpoint
> Maxpacket is 0x49 instead of 0x40. The Vista USB stack expects the value to
> be less than or equal to 0x40 when the device is operating under fullspeed
> mode. This change was made on Vista to avoid bugchecks in USBUHCI if the
> device error is ignored.
>
> Let us first make sure this is indeed the issue then we will discuss about
> how to workaround this problem in software (if you can't fix your hardware)
> because it's not pretty.
>
> -Eliyas
>
> "GPS" <GPS@discussions.microsoft.com> wrote in message
> news:8C33102E-CB11-4934-9C74-35B88D24E206@microsoft.com...
> >I have a kernel-mode driver (WDF) that works fine in all versions except
> >for
> > Vista. In Vista during driver installation I get a "This device cannot
> > start
> > (Code 10)" error. I believe I have traced it down to a call of
> > WdfUsbTargetDeviceSelectConfig() which is returning
> > STATUS_INVALID_PARAMETER.
> > I'm confused because this driver works fine under non-vista versions (at
> > least Win2k, and XP). Does anyone know of anything that might be causing
> > this? I have examined the parameters and can't see where anyone of them
> > is
> > invalid. My call looks like:
> >
> > status = WdfUsbTargetDeviceSelectConfig(pDeviceContext->UsbDevice,
> > WDF_NO_OBJECT_ATTRIBUTES,
> > &configParams);
> >
> > Where pDeviceContext->UsbDevice was set with a call to
> > WdfUsbTargetDeviceCreate() which returned STATUS_SUCCESS and configParams
> > was
> > initialized with
> > WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_SINGLE_INTERFACE()
> >
> > Thanks.
> > Greg
>
>
>