desktop dead while writing to device drivers

Hi,

Background
I had a virtual bus device and several uart port attached to this device. I can write to the bus device and data will go to uarts.
I enabled async io for the bus, while I didn’t use queue for the write dispatch handling. I just use “write spin lock” make the write dispatch handling from calling twice at the same time.

Problem
desktop will dead if I write data to the bus device when the target uart device is removed. but I check this part of code, that is the uart device isn’t there, I just skip the data and mark the IRP as done.

Any help for the problem? thanks in advance.

Br, Chen Gang

Attach a kernel debugger and see what is going on. A guess as to where to start is the app repeatedly sending io on error or the driver spinning a CPU endlessly.

d

debt from my phone

-----Original Message-----
From: xxxxx@gmail.com
Sent: Sunday, August 21, 2011 10:05 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] desktop dead while writing to device drivers

Hi,

Background
I had a virtual bus device and several uart port attached to this device. I can write to the bus device and data will go to uarts.
I enabled async io for the bus, while I didn’t use queue for the write dispatch handling. I just use “write spin lock” make the write dispatch handling from calling twice at the same time.

Problem
desktop will dead if I write data to the bus device when the target uart device is removed. but I check this part of code, that is the uart device isn’t there, I just skip the data and mark the IRP as done.

Any help for the problem? thanks in advance.

Br, Chen Gang


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

The app won’t see the io as error, in driver part, I will mark all write as successfully done. and i don’t see that the application will keep trying.

Why would you complete an io request as successful when the underlying hardware has disappeared? Until you attach a debugger and see what is consuming the CPU, this is all guess work and really a waste of everyone’s time until you have better data to work on.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Sunday, August 21, 2011 11:44 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] desktop dead while writing to device drivers

The app won’t see the io as error, in driver part, I will mark all write as successfully done. and i don’t see that the application will keep trying.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer