PNP_DETECTED_FATAL_ERROR (ca) on Windows XP

Hi:

I have an issue on my driver with the next Dump, this error only happens on Windows XP, i tested on Windows 7 and Vista and nothing happens.
I got this error when I connect 2 devices that uses the same driver in a different usb Hub.

usbser
|
filter
|
PDO (lower_usb.sys) //This gives me the error in dump
|
FDO

This is the way i assign the device id:

DECLARE_CONST_UNICODE_STRING(hstring, L"USB\VID_15A2&PID_005A&USB2SER");
WCHAR hstring2 = {L"USB\VID_15A2&PID_005A&USB2SER"};

pDeviceInit = WdfPdoInitAllocate(Device);

if (pDeviceInit == NULL) {
status = STATUS_INSUFFICIENT_RESOURCES;
goto Cleanup;
}

//
// Set DeviceType
//
WdfDeviceInitSetDeviceType(pDeviceInit, FILE_DEVICE_SERIAL_PORT);
//
// Provide DeviceID, HardwareIDs, CompatibleIDs and InstanceId
//

deviceId.Buffer = hstring2;
deviceId.Length = 0x0;
deviceId.MaximumLength = sizeof(hstring2);

RtlInitUnicodeString(&deviceId,HardwareIds);

status = WdfPdoInitAssignDeviceID(pDeviceInit, &hstring);
if (!NT_SUCCESS(status)) {
goto Cleanup;
}

status = WdfPdoInitAddHardwareID(pDeviceInit, &hstring);
if (!NT_SUCCESS(status)) {
goto Cleanup;
}

status = WdfPdoInitAddCompatibleID(pDeviceInit, &hstring );
if (!NT_SUCCESS(status)) {
return status;
}

status = WdfPdoInitAssignInstanceID(pDeviceInit, &buffer);
if (!NT_SUCCESS(status)) {
goto Cleanup;
}
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************

PNP_DETECTED_FATAL_ERROR (ca)
PnP encountered a severe error, either as a result of a problem in a driver or
a problem in PnP itself. The first argument describes the nature of the
problem, the second argument is the address of the PDO. The other arguments
vary depending on argument 1.
Arguments:
Arg1: 00000001, Duplicate PDO
A specific instance of a driver has enumerated multiple PDOs with
identical device id and unique ids.
Arg2: 88f1a668, Newly reported PDO.
Arg3: 890b3a08, PDO of which it is a duplicate.
Arg4: 00000000

Debugging Details:

*** ERROR: Module load completed but symbols could not be loaded for lower_usb.sys
*** No owner thread found for resource 80551f60
*** No owner thread found for resource 80551f60
*** No owner thread found for resource 80551f60
*** No owner thread found for resource 80551f60

BUGCHECK_STR: 0xCA_1

DEVICE_OBJECT: 88f1a668

DRIVER_OBJECT: 8993e5d8

IMAGE_NAME: lower_usb.sys

DEBUG_FLR_IMAGE_TIMESTAMP: 4dfbce3c

MODULE_NAME: lower_usb

FAULTING_MODULE: bae50000 lower_usb

DEFAULT_BUCKET_ID: DRIVER_FAULT

PROCESS_NAME: System

LOCK_ADDRESS: 80551fe0 – (!locks 80551fe0)

Resource @ nt!IopDeviceTreeLock (0x80551fe0) Shared 1 owning threads
Threads: 89ab78b8-01<*>
1 total locks, 1 locks currently held

PNP_TRIAGE:
Lock address : 0x80551fe0
Thread Count : 1
Thread address: 0x89ab78b8
Thread wait : 0x33d0

LAST_CONTROL_TRANSFER: from 80586ec5 to 804f8cb5

STACK_TEXT:
bacff9cc 80586ec5 000000ca 00000001 88f1a668 nt!KeBugCheckEx+0x1b
bacffac8 80587687 89011ee8 88ef1c10 88f2e3d8 nt!PipProcessNewDeviceNode+0x5d1
bacffd1c 80587c56 88f2e3d8 00000001 00000000 nt!PipProcessDevNodeTree+0x16b
bacffd4c 804f58ce 00000003 80552040 8055b0fc nt!PiRestartDevice+0x80
bacffd74 80534c02 00000000 00000000 89ab78b8 nt!PipDeviceActionWorker+0x15e
bacffdac 805c6160 00000000 00000000 00000000 nt!ExpWorkerThread+0x100
bacffddc 80541dd2 80534b02 00000001 00000000 nt!PspSystemThreadStartup+0x34
00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16

STACK_COMMAND: kb

FOLLOWUP_NAME: MachineOwner

FAILURE_BUCKET_ID: 0xCA_1_IMAGE_lower_usb.sys_DATE_2011_06_17

BUCKET_ID: 0xCA_1_IMAGE_lower_usb.sys_DATE_2011_06_17

Followup: MachineOwner

Thanks for your help!!

xxxxx@hotmail.com wrote:

I have an issue on my driver with the next Dump, this error only happens on Windows XP, i tested on Windows 7 and Vista and nothing happens.
I got this error when I connect 2 devices that uses the same driver in a different usb Hub.

I don’t see how this error could possibly be any clearer:

This is the way i assign the device id:

DECLARE_CONST_UNICODE_STRING(hstring, L"USB\VID_15A2&PID_005A&USB2SER");
WCHAR hstring2 = {L"USB\VID_15A2&PID_005A&USB2SER"};

Arguments:
Arg1: 00000001, Duplicate PDO
A specific instance of a driver has enumerated multiple PDOs with
identical device id and unique ids.
Arg2: 88f1a668, Newly reported PDO.
Arg3: 890b3a08, PDO of which it is a duplicate.
Arg4: 00000000

It is not legal to have two devices with the same hardware ID. You need
to make them unique, by modifying the number in someway. With real USB
devices, they either have unique serial numbers, or if they don’t have
serial numbers, the hub driver assigns a unique identifier based on the
port number.

Why are you using a USB hardware ID here, instead of your own bus? Do
you have an existing INF for this device?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>It is not legal to have two devices with the same hardware ID. You need

to make them unique, by modifying the number in someway. With real USB
devices, they either have unique serial numbers, or if they don’t have
serial numbers, the hub driver assigns a unique identifier based on the
port number.

How could i assign a unique identifier based on the port number, is there any documentation about it?,this could solve this problem?, because, what makes me doubt is that i can connect any number of devices with the same hardware id in Windows 7, Windows Vista with any problem.Or is there any fix on Windows XP to solve this?

Why are you using a USB hardware ID here, instead of your own bus? Do
you have an existing INF for this device?

Yes, I have an inf file that match with the hardware ID i provide in the driver to the Child that match on the bus.

This is my driver hierarchy:

upper.sys(filter)
usbser.sys //Second driver with an Inf
low.sys(filter)

|

filter-pdo.sys(pdo) //First driver with an Inf
fdo.sys

xxxxx@hotmail.com wrote:

How could i assign a unique identifier based on the port number, is there any documentation about it?,this could solve this problem?

You’re not thinking about things before you ask questions. The USB hubs
use the port number, because they know the port number, and it is
guaranteed to be unique within that hub. If you don’t have ports, then
of course you don’t have port numbers.

You could, for example, keep a global variable with a counter. Then,
the first one gets exposed as
USB\VID_xxxx&PID_xxxx&usbser2&0
the next one as
USB\VID_xxxx&PID_xxxx&usbser2&1
the next one as
USB\VID_xxxx&PID_xxxx&usbser2&2
and so on.

Remember, these identifiers are ARBITRARY strings. They have no
inherent meaning, except to match up with an INF. (Note that I am about
to contradict this statement shortly.)

because, what makes me doubt is that i can connect any number of devices with the same hardware id in Windows 7, Windows Vista with any problem.Or is there any fix on Windows XP to solve this?

There is nothing to fix. YOU are violating the rules. Vista and Win 7
might be more forgiving, but it’s still against the rules.

Yes, I have an inf file that match with the hardware ID i provide in the driver to the Child that match on the bus.

Is this some third-party INF, or is if an INF you wrote? If it is an
INF you wrote, then you should probably invent your own bus. By using
the name “USB\xxx”, you are saying to the system that you are a USB bus
enumerator, and that might obligate you to provide USB services that you
are not prepared to provide.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>You could, for example, keep a global variable with a counter. Then,

the first one gets exposed as
USB\VID_xxxx&PID_xxxx&usbser2&0
the next one as
USB\VID_xxxx&PID_xxxx&usbser2&1
the next one as
USB\VID_xxxx&PID_xxxx&usbser2&2
and so on.

The problem is that I got a 1 BUS driver for 1 CDC driver, so i could not implement that kind of code, the same code is used for each driver, it is statically enumerated.

Is this some third-party INF, or is if an INF you wrote? If it is an
INF you wrote, then you should probably invent your own bus. By using
the name “USB\xxx”, you are saying to the system that you are a USB bus
enumerator, and that might obligate you to provide USB services that you
are not prepared to provide.

Is an inf i wrote. One INF for my first driver,that is the one that make the function of the Power Managment and PDO enumerator(USB\VID_XXXX&PID_XXXX), and a Second INF for the second driver that makes the CDC communication(USB\VID_XXXX&PID_XXXX&USB2SER).

xxxxx@hotmail.com wrote:

> You could, for example, keep a global variable with a counter. Then,
> the first one gets exposed as
> USB\VID_xxxx&PID_xxxx&usbser2&0
> the next one as
> USB\VID_xxxx&PID_xxxx&usbser2&1
> the next one as
> USB\VID_xxxx&PID_xxxx&usbser2&2
> and so on.
The problem is that I got a 1 BUS driver for 1 CDC driver, so i could not implement that kind of code, the same code is used for each driver, it is statically enumerated.

You have one DRIVER with multiple INSTANCES. The DRIVER can certainly
hold a global variable, and that variable will be global across all
instances.

Is an inf i wrote. One INF for my first driver,that is the one that
make the function of the Power Managment and PDO
enumerator(USB\VID_XXXX&PID_XXXX), and a Second INF for the second
driver that makes the CDC communication(USB\VID_XXXX&PID_XXXX&USB2SER).

If it’s a driver you wrote, then you don’t have to use the USB\ naming
at all. You can use whatever you want. Replacing the USB with your own
name might be less confusing.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.