Hello list!
I am still working on the issue that my drivers fail to communicate with
a IEEE1394 ( firewire ) device on device initialization.
This is what I see:
The driver gets an SRB_INITIALIZE_DEVICE request. While this happens,
another bus reset is happening on the IEEE-1394 bus which changes the
generation count.
Now the driver tries to access the device to initalize the drivers
structures and the device state BUT every register access fails due to
"STATUS_INVALID_GENERATION".
According to MSDN, the driver should now request the current generation
count using the REQUEST_GET_GENERATION_COUNT bus request BUT it should
not use this generation count unless the next Bus Reset Notification is
recevied by the driver. And in fact, it is not possible to do a single
register access while processing the SRB_INITIALIZE_DEVICE request from
now on.
So what am I supposed to do in this situation?
If I fail the SRB_INITIALIZE_DEVICE request with STATUS_IO_DEVICE_ERROR,
the driver gets unloaded for the device and is not accessible at all.
If I succeed the SRB_INITIALIZE_DEVICE in the hope that I get the Bus
Reset Notification afterwards to update the generation count and finish
the initialization in SRB_INITIALIZATION_COMPLETE also does not work
because SRB_INITIALIZATION_COMPLETE is called first and the Bus Reset
Notification is called later on.
Worst of all, this behaviour is completely reproducable on my system
since I installed the Service Pack 2 for windows XP! If I uninstall the
service pack, I do not get multiple bus resets when connecting the
device ( at least I do not get a bus reset while processing
SRB_INITIALIZE_DEVICE ) anymore and everything works fine.
I am completely stuck. I fear, this one is going to cause BIG TROUBLE!!!
-Arne