Device yellow bangs when it resumes from Hibernate.

Hi,

We have a UMDF driver for our device which connected to SPI controller and
we are using SPB framework to interact with our device.

We are seeing one problem, whenever system goes to hibernate and resume
from the hibernate our device yellow bangs with error code 43.
This issue is happening not frequently, but randomly may be once in 15
times.

Yellow Bang disappears if we restart the machine or disable and enable our
device.

To debug this issue we enabled driver trace logs.

When this issue happens, our driver getting following events before system
going to hibernate

  1. OnD0Exit() with newPowerState = 5

  2. OnReleaseHardware() // returning S_OK

  3. OnSurpriseRemoval()

  4. OnDeinitialize()

When there is no issue

  1. OnD0Exit() with newPowerState = 4

There is no pending request with the driver when the system goes to
hibernate. Since our device is non plug and play device and it is hardwired
to SPI controller, do we expect to get SurpriseRemoval ?

I would like to know what could be the reasons for OS to remove our device
during hibernate and yellow bang when it resumes.

Please help and show me pointers to fix this issue.

Thanks & Regards,
Madhukar

Surprise removal can represent hardware removal or software failure. In your case, it is the latter. You can look at the umdf logs or look through what your power down callbacks are returning to see where the failure code is being returned.

Sent from my Windows 10 phone

From: Madhukar Reddymailto:xxxxx
Sent: Tuesday, April 12, 2016 7:44 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Device yellow bangs when it resumes from Hibernate.

Hi,

We have a UMDF driver for our device which connected to SPI controller and we are using SPB framework to interact with our device.

We are seeing one problem, whenever system goes to hibernate and resume from the hibernate our device yellow bangs with error code 43.
This issue is happening not frequently, but randomly may be once in 15 times.

Yellow Bang disappears if we restart the machine or disable and enable our device.

To debug this issue we enabled driver trace logs.

When this issue happens, our driver getting following events before system going to hibernate

1. OnD0Exit() with newPowerState = 5

2. OnReleaseHardware() // returning S_OK

3. OnSurpriseRemoval()

4. OnDeinitialize()

When there is no issue

1. OnD0Exit() with newPowerState = 4

There is no pending request with the driver when the system goes to hibernate. Since our device is non plug and play device and it is hardwired to SPI controller, do we expect to get SurpriseRemoval ?

I would like to know what could be the reasons for OS to remove our device during hibernate and yellow bang when it resumes.

Please help and show me pointers to fix this issue.

Thanks & Regards,
Madhukar

— NTDEV is sponsored by OSR Visit the list online at: MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at To unsubscribe, visit the List Server section of OSR Online at</mailto:xxxxx></mailto:xxxxx>

Thanks Doran,

As per our driver logs we return S_OK from both OnD0Exit() OnD0Entry().

Since the driver is and unloaded while the system is going to hibernation,
As per my understanding OS supposed to load our driver when it resumes
back, But our device yellow bang with error 43. Does this mean OS sees any
issue with the device before loading the driver. (We didn’t get driver
loading sequence trace logs: OnInitialize() etc)

If we disable and enable the device, yellow bang disappears and device is
functional. I am suspecting “WUDFHost” process or “resource rebalance” or
our device hardware could be the reason for this issue. Let me know if I am
wrong.

MSDN documentation about error:43 says “Windows has stopped this device
because it has reported problems”. Since our driver not reporting any
errors from our device, can SPI-controller/ACPI report device
failure/errors to OS?

Please let me know where the OS logs useful information regarding why
driver is not loaded and errors reported by the bus or device to debug this
issue further. (Our device is ACPI enumerated device, connected to SPI
controller)

Does Event Viewer logs give any pointers.

Thanks in advance.

Regards,

Madhukar

On Tue, Apr 12, 2016 at 8:33 PM, Doron Holan
wrote:

> Surprise removal can represent hardware removal or software failure. In
> your case, it is the latter. You can look at the umdf logs or look through
> what your power down callbacks are returning to see where the failure code
> is being returned.
>
>
>
> Sent from my Windows 10 phone
>
>
>
> *From: *Madhukar Reddy
> *Sent: *Tuesday, April 12, 2016 7:44 AM
> *To: *Windows System Software Devs Interest List
> *Subject: *[ntdev] Device yellow bangs when it resumes from Hibernate.
>
>
> Hi,
>
> We have a UMDF driver for our device which connected to SPI controller and
> we are using SPB framework to interact with our device.
>
>
> We are seeing one problem, whenever system goes to hibernate and resume
> from the hibernate our device yellow bangs with error code 43.
> This issue is happening not frequently, but randomly may be once in 15
> times.
>
> Yellow Bang disappears if we restart the machine or disable and enable our
> device.
>
>
>
> To debug this issue we enabled driver trace logs.
>
>
>
> When this issue happens, our driver getting following events before system
> going to hibernate
>
>
>
> 1. OnD0Exit() with newPowerState = 5
>
> 2. OnReleaseHardware() // returning S_OK
>
> 3. OnSurpriseRemoval()
>
> 4. OnDeinitialize()
>
>
>
> When there is no issue
>
> 1. OnD0Exit() with newPowerState = 4
>
>
> There is no pending request with the driver when the system goes to
> hibernate. Since our device is non plug and play device and it is hardwired
> to SPI controller, do we expect to get SurpriseRemoval ?
>
> I would like to know what could be the reasons for OS to remove our device
> during hibernate and yellow bang when it resumes.
>
> Please help and show me pointers to fix this issue.
>
> Thanks & Regards,
> Madhukar
>
>
>
>
> — NTDEV is sponsored by OSR Visit the list online at: MONTHLY seminars
> on crash dump analysis, WDF, Windows internals and software drivers!
> Details at To unsubscribe, visit the List Server section of OSR Online at
>

Hi,

If a pooled device in WUDFHost process fails, what is the error code it
reports in the device manager. ( is it error :43 or something else)

Since I couldn’t find the root cause for our device yellow bang issue when
resumed from hibernation, does installing our device
using ProcessSharingDisabled helps to isolate whether it is our driver
problem or with other UMDF driver which shared same WUDFHost process.

Thanks & Regards,
Madhukar

On Wed, Apr 13, 2016 at 7:49 PM, Madhukar Reddy
wrote:

> Thanks Doran,
>
> As per our driver logs we return S_OK from both OnD0Exit() OnD0Entry().
>
>
>
> Since the driver is and unloaded while the system is going to hibernation,
> As per my understanding OS supposed to load our driver when it resumes
> back, But our device yellow bang with error 43. Does this mean OS sees any
> issue with the device before loading the driver. (We didn’t get driver
> loading sequence trace logs: OnInitialize() etc)
>
>
>
> If we disable and enable the device, yellow bang disappears and device is
> functional. I am suspecting “WUDFHost” process or “resource rebalance” or
> our device hardware could be the reason for this issue. Let me know if I am
> wrong.
>
>
>
> MSDN documentation about error:43 says “Windows has stopped this device
> because it has reported problems”. Since our driver not reporting any
> errors from our device, can SPI-controller/ACPI report device
> failure/errors to OS?
>
>
>
> Please let me know where the OS logs useful information regarding why
> driver is not loaded and errors reported by the bus or device to debug this
> issue further. (Our device is ACPI enumerated device, connected to SPI
> controller)
>
>
>
> Does Event Viewer logs give any pointers.
>
>
> Thanks in advance.
>
>
>
> Regards,
>
> Madhukar
>
>
>
> On Tue, Apr 12, 2016 at 8:33 PM, Doron Holan
> wrote:
>
>> Surprise removal can represent hardware removal or software failure. In
>> your case, it is the latter. You can look at the umdf logs or look through
>> what your power down callbacks are returning to see where the failure code
>> is being returned.
>>
>>
>>
>> Sent from my Windows 10 phone
>>
>>
>>
>> *From: *Madhukar Reddy
>> *Sent: *Tuesday, April 12, 2016 7:44 AM
>> *To: *Windows System Software Devs Interest List
>> *Subject: *[ntdev] Device yellow bangs when it resumes from Hibernate.
>>
>>
>> Hi,
>>
>> We have a UMDF driver for our device which connected to SPI controller
>> and we are using SPB framework to interact with our device.
>>
>>
>> We are seeing one problem, whenever system goes to hibernate and resume
>> from the hibernate our device yellow bangs with error code 43.
>> This issue is happening not frequently, but randomly may be once in 15
>> times.
>>
>> Yellow Bang disappears if we restart the machine or disable and enable
>> our device.
>>
>>
>>
>> To debug this issue we enabled driver trace logs.
>>
>>
>>
>> When this issue happens, our driver getting following events before
>> system going to hibernate
>>
>>
>>
>> 1. OnD0Exit() with newPowerState = 5
>>
>> 2. OnReleaseHardware() // returning S_OK
>>
>> 3. OnSurpriseRemoval()
>>
>> 4. OnDeinitialize()
>>
>>
>>
>> When there is no issue
>>
>> 1. OnD0Exit() with newPowerState = 4
>>
>>
>> There is no pending request with the driver when the system goes to
>> hibernate. Since our device is non plug and play device and it is hardwired
>> to SPI controller, do we expect to get SurpriseRemoval ?
>>
>> I would like to know what could be the reasons for OS to remove our
>> device during hibernate and yellow bang when it resumes.
>>
>> Please help and show me pointers to fix this issue.
>>
>> Thanks & Regards,
>> Madhukar
>>
>>
>>
>>
>> — NTDEV is sponsored by OSR Visit the list online at: MONTHLY seminars
>> on crash dump analysis, WDF, Windows internals and software drivers!
>> Details at To unsubscribe, visit the List Server section of OSR Online at
>>
>
>