From: dhmot on
All,

I'm sure you're all tired of hearing of my WHQL trials and tribulations :),
but I've got another question. I have a KMDF driver for a USB device. The
device and driver support selective suspend, and have a default selective
suspend time-out of five seconds. If I run the PnP Driver Test on an x86
Vista + SP2 Dell Precision 380, the test fails unless I disable selective
suspend first. The surprise removal test is the test that fails with an
error of "Device node status not ok: problem code 10". I've confirmed that
my driver is not returning any errors nor is it hitting any code I would not
expect it to hit. Likewise, I see nothing wayward in the debug output from
the PNP filter captured via Dbgview.

If I disable selective suspend, all "PnP Driver Test" tests pass under x86
Vista. Likewise, all "PnP Driver Test" tests pass under XP (x86 and x64)
with selective suspend enabled.

What's the proper solution for this?

Thanks,
Michael
From: Egidio [MSFT] on
Just to clarify, what is different in your environment from Vista and XP?
Only the OS? Is everything else is the same? system h/w, device h/w, WDF
framework 1.9, PnP tests?
Otherwise can you try re-running the tests on the h/w that works?

Egi.

"dhmot" <dhmot(a)discussions.microsoft.com> wrote in message
news:B3EA455C-E94A-4A4F-A145-B8E5C14ADDBF(a)microsoft.com...
> All,
>
> I'm sure you're all tired of hearing of my WHQL trials and tribulations
> :),
> but I've got another question. I have a KMDF driver for a USB device.
> The
> device and driver support selective suspend, and have a default selective
> suspend time-out of five seconds. If I run the PnP Driver Test on an x86
> Vista + SP2 Dell Precision 380, the test fails unless I disable selective
> suspend first. The surprise removal test is the test that fails with an
> error of "Device node status not ok: problem code 10". I've confirmed
> that
> my driver is not returning any errors nor is it hitting any code I would
> not
> expect it to hit. Likewise, I see nothing wayward in the debug output
> from
> the PNP filter captured via Dbgview.
>
> If I disable selective suspend, all "PnP Driver Test" tests pass under x86
> Vista. Likewise, all "PnP Driver Test" tests pass under XP (x86 and x64)
> with selective suspend enabled.
>
> What's the proper solution for this?
>
> Thanks,
> Michael

From: dhmot on
The same hardware series is used (Dell Precision 380), although not exactly
the same machine. The failure occurs with three different devices on Vista
(all that are available to me), and at least one of those passes on XP. WDF
Framework 1.7 is used for both, not 1.9. I can't say if it's exactly the
same PnP test, as one is run on Vista and the other on XP. I do have the
latest filters and have installed QFE011 & QFE002.

So as far as I can tell, the only difference is the OS.

If you think there's some benefit, I can try swapping hard drives between
the XP and Vista machines to see if that makes a difference. Let me know.

Michael

"Egidio [MSFT]" wrote:

> Just to clarify, what is different in your environment from Vista and XP?
> Only the OS? Is everything else is the same? system h/w, device h/w, WDF
> framework 1.9, PnP tests?
> Otherwise can you try re-running the tests on the h/w that works?
>
> Egi.
>
> "dhmot" <dhmot(a)discussions.microsoft.com> wrote in message
> news:B3EA455C-E94A-4A4F-A145-B8E5C14ADDBF(a)microsoft.com...
> > All,
> >
> > I'm sure you're all tired of hearing of my WHQL trials and tribulations
> > :),
> > but I've got another question. I have a KMDF driver for a USB device.
> > The
> > device and driver support selective suspend, and have a default selective
> > suspend time-out of five seconds. If I run the PnP Driver Test on an x86
> > Vista + SP2 Dell Precision 380, the test fails unless I disable selective
> > suspend first. The surprise removal test is the test that fails with an
> > error of "Device node status not ok: problem code 10". I've confirmed
> > that
> > my driver is not returning any errors nor is it hitting any code I would
> > not
> > expect it to hit. Likewise, I see nothing wayward in the debug output
> > from
> > the PNP filter captured via Dbgview.
> >
> > If I disable selective suspend, all "PnP Driver Test" tests pass under x86
> > Vista. Likewise, all "PnP Driver Test" tests pass under XP (x86 and x64)
> > with selective suspend enabled.
> >
> > What's the proper solution for this?
> >
> > Thanks,
> > Michael
>
>
From: Egidio [MSFT] on
Just to understand more about this error.
does the surprise remove test run? or doesn't even run because the device is
not initializing correctly, i.e., the previous test left the device in a
strange state?
Do you do anything in your driver when you receiving surprise remove?
When XP works, is the device in selective suspend? I.e., is it possible
that in the XP case you don't see a problem b/c the device never enters the
selective suspend state?
Is your client driver a child of USBCCGP?
Do you see the same callbacks from your driver point of view in both the XP
and Vista cases?
Did you make sure to enable device verifier and wdf verifier on your driver
and wdf01000?
Since Win7 is available, do you see any problem in Win7? Win7 has better
logging for USB.

Egi.

"dhmot" <dhmot(a)discussions.microsoft.com> wrote in message
news:5E3C4F23-83C8-4BFF-8AE7-3243860E4C2A(a)microsoft.com...
> The same hardware series is used (Dell Precision 380), although not
> exactly
> the same machine. The failure occurs with three different devices on
> Vista
> (all that are available to me), and at least one of those passes on XP.
> WDF
> Framework 1.7 is used for both, not 1.9. I can't say if it's exactly the
> same PnP test, as one is run on Vista and the other on XP. I do have the
> latest filters and have installed QFE011 & QFE002.
>
> So as far as I can tell, the only difference is the OS.
>
> If you think there's some benefit, I can try swapping hard drives between
> the XP and Vista machines to see if that makes a difference. Let me know.
>
> Michael
>
> "Egidio [MSFT]" wrote:
>
>> Just to clarify, what is different in your environment from Vista and
>> XP?
>> Only the OS? Is everything else is the same? system h/w, device h/w, WDF
>> framework 1.9, PnP tests?
>> Otherwise can you try re-running the tests on the h/w that works?
>>
>> Egi.
>>
>> "dhmot" <dhmot(a)discussions.microsoft.com> wrote in message
>> news:B3EA455C-E94A-4A4F-A145-B8E5C14ADDBF(a)microsoft.com...
>> > All,
>> >
>> > I'm sure you're all tired of hearing of my WHQL trials and tribulations
>> > :),
>> > but I've got another question. I have a KMDF driver for a USB device.
>> > The
>> > device and driver support selective suspend, and have a default
>> > selective
>> > suspend time-out of five seconds. If I run the PnP Driver Test on an
>> > x86
>> > Vista + SP2 Dell Precision 380, the test fails unless I disable
>> > selective
>> > suspend first. The surprise removal test is the test that fails with
>> > an
>> > error of "Device node status not ok: problem code 10". I've confirmed
>> > that
>> > my driver is not returning any errors nor is it hitting any code I
>> > would
>> > not
>> > expect it to hit. Likewise, I see nothing wayward in the debug output
>> > from
>> > the PNP filter captured via Dbgview.
>> >
>> > If I disable selective suspend, all "PnP Driver Test" tests pass under
>> > x86
>> > Vista. Likewise, all "PnP Driver Test" tests pass under XP (x86 and
>> > x64)
>> > with selective suspend enabled.
>> >
>> > What's the proper solution for this?
>> >
>> > Thanks,
>> > Michael
>>
>>
From: Egidio [MSFT] on
The sequence below seems correct and consistent with the flow you can find
in pages 181 to 189 of Windows Driver Foundation book. It may be possible
that in XP the device doesn't support selective suspend. Please check the
device characteristics of your node (device manager). Do you see the
PowerManager tab in XP? like you see in Vista.
What are the info you see in Details->Power Data in both XP and Vista for
this device?
Is it possible that this device doesn't support selective suspend?

Thx,
Egi.

"dhmot" <dhmot(a)discussions.microsoft.com> wrote in message
news:1A229197-B74F-4822-9CC4-FAEE1510B4E9(a)microsoft.com...
> To answer your questions (#5 is probably the most important):
>
> 1) As far as I can tell, the test runs - I see the PnP window appear for
> a
> short period, maybe a few seconds, at least twice during the PnP test. At
> the end of my response, I've included the log file (uuencoded zip file).
>
> 2) I do nothing special for a surprise remove that I do for any other
> condition that causes the device to enter D3; it's the same code that's
> used
> if someone right-clicks on the device in device manager and "Disable"s it.
>
> 3) I re-ran the test with the selective suspend time-out cranked down to
> one second on Windows XP. This should cause the driver and device to
> enter
> selective suspend. The test still passed on Windows XP.
>
> 4) As far as I'm aware, my driver is not a child of USBCCGP. I assume
> this
> is something I'd have to call out explicitly. If not, please tell me how
> I'd
> know.
>
> 5) I performed a log comparison and found one major difference just prior
> to
> the second driver re-load (initial driver load on boot-up, first driver
> re-load after start of test, then second driver re-load). On XP, the
> callback sequence after the first driver re-load was as follows:
>
> DriverEntry
> Device Add
> Prepare Hardware
> IO Init
> IO Suspend
> D0 Exit to D3
> IO Flush
>
> The above is what I would normally expect. However, Vista threw the
> following at my driver:
>
> DriverEntry
> Device Add
> Prepare Hardware
> IO Init
> IO Suspend
> D0 Exit to D2 (selective suspend)
> IO Flush
>
> I would have expected it to have called my IO Restart callback after the
> D0
> Exit to D2, then IO Suspend, then D0 Exit to D3, and THEN IO Flush.
> Turning
> on WDF Verifier did not affect this. After this occurs, Vista re-loads my
> driver and stops testing while XP continues testing.
>
> 6) I did not have WDF Verifier enabled for either Vista or XP. Once I
> discovered #5, I re-ran the test on Vista with WDF Verifier enabled for
> the
> USB driver (I'm not sure how to enable it for WDF01000). There was no
> change
> in the test results.
>
> 7) I have no Windows 7 machines available to me at the moment.
>
> Any ideas why #5 is happening?
>
> Thanks,
> Michael
>
> PnP result log:
>
>



>
>
> "Egidio [MSFT]" wrote:
>
>> Just to understand more about this error.
>> does the surprise remove test run? or doesn�?Tt even run because the
>> device is
>> not initializing correctly, i.e., the previous test left the device in a
>> strange state?
>> Do you do anything in your driver when you receiving surprise remove?
>> When XP works, is the device in selective suspend? I.e., is it possible
>> that in the XP case you don't see a problem b/c the device never enters
>> the
>> selective suspend state?
>> Is your client driver a child of USBCCGP?
>> Do you see the same callbacks from your driver point of view in both the
>> XP
>> and Vista cases?
>> Did you make sure to enable device verifier and wdf verifier on your
>> driver
>> and wdf01000?
>> Since Win7 is available, do you see any problem in Win7? Win7 has better
>> logging for USB.
>>
>> Egi.
>>
>> "dhmot" <dhmot(a)discussions.microsoft.com> wrote in message
>> news:5E3C4F23-83C8-4BFF-8AE7-3243860E4C2A(a)microsoft.com...
>> > The same hardware series is used (Dell Precision 380), although not
>> > exactly
>> > the same machine. The failure occurs with three different devices on
>> > Vista
>> > (all that are available to me), and at least one of those passes on XP.
>> > WDF
>> > Framework 1.7 is used for both, not 1.9. I can't say if it's exactly
>> > the
>> > same PnP test, as one is run on Vista and the other on XP. I do have
>> > the
>> > latest filters and have installed QFE011 & QFE002.
>> >
>> > So as far as I can tell, the only difference is the OS.
>> >
>> > If you think there's some benefit, I can try swapping hard drives
>> > between
>> > the XP and Vista machines to see if that makes a difference. Let me
>> > know.
>> >
>> > Michael
>> >
>> > "Egidio [MSFT]" wrote:
>> >
>> >> Just to clarify, what is different in your environment from Vista and
>> >> XP?
>> >> Only the OS? Is everything else is the same? system h/w, device h/w,
>> >> WDF
>> >> framework 1.9, PnP tests?
>> >> Otherwise can you try re-running the tests on the h/w that works?
>> >>
>> >> Egi.
>> >>
>> >> "dhmot" <dhmot(a)discussions.microsoft.com> wrote in message
>> >> news:B3EA455C-E94A-4A4F-A145-B8E5C14ADDBF(a)microsoft.com...
>> >> > All,
>> >> >
>> >> > I'm sure you're all tired of hearing of my WHQL trials and
>> >> > tribulations
>> >> > :),
>> >> > but I've got another question. I have a KMDF driver for a USB
>> >> > device.
>> >> > The
>> >> > device and driver support selective suspend, and have a default
>> >> > selective
>> >> > suspend time-out of five seconds. If I run the PnP Driver Test on
>> >> > an
>> >> > x86
>> >> > Vista + SP2 Dell Precision 380, the test fails unless I disable
>> >> > selective
>> >> > suspend first. The surprise removal test is the test that fails
>> >> > with
>> >> > an
>> >> > error of "Device node status not ok: problem code 10". I've
>> >> > confirmed
>> >> > that
>> >> > my driver is not returning any errors nor is it hitting any code I
>> >> > would
>> >> > not
>> >> > expect it to hit. Likewise, I see nothing wayward in the debug
>> >> > output
>> >> > from
>> >> > the PNP filter captured via Dbgview.
>> >> >
>> >> > If I disable selective suspend, all "PnP Driver Test" tests pass
>> >> > under
>> >> > x86
>> >> > Vista. Likewise, all "PnP Driver Test" tests pass under XP (x86 and
>> >> > x64)
>> >> > with selective suspend enabled.
>> >> >
>> >> > What's the proper solution for this?
>> >> >
>> >> > Thanks,
>> >> > Michael
>> >>
>> >>
>>