Device Timeout for realtime devices

Hi,

I need to implement a timeout mechanism for my WDM for a realtime device( a
memory mapped PCI FIFO card).
I am shipping the data from a tester to the FIFO card and the FIFO card
interrupts when
a. it has recived a RESET signal from TESTER.
b. every time it is half full.
c. when the end of data is reached.

I need to reset and cancel the timer in my ISR. I wanted to implement the
timeout using KeSetTimer. But that function cannot be used in ISR. So, I
think the only way to do it is to use IoStartTimer. But I do not prefer
this method since I/O timer routine gets called every one second. Is there
any other more suitable method ??

Thanks for all help
Madhu


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You can’t manage the timer in your ISR since all of the management routines
require <= DISPATCH_LEVEL. Create and schedule a DPC that will manage the
timer.

Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com

-----Original Message-----
From: xxxxx@yahoo.com [mailto:xxxxx@yahoo.com]
Sent: Tuesday, July 10, 2001 1:32 AM
To: NT Developers Interest List
Subject: [ntdev] Device Timeout for realtime devices

Hi,

I need to implement a timeout mechanism for my WDM for a realtime device( a
memory mapped PCI FIFO card).
I am shipping the data from a tester to the FIFO card and the FIFO card
interrupts when
a. it has recived a RESET signal from TESTER.
b. every time it is half full.
c. when the end of data is reached.

I need to reset and cancel the timer in my ISR. I wanted to implement the
timeout using KeSetTimer. But that function cannot be used in ISR. So, I
think the only way to do it is to use IoStartTimer. But I do not prefer
this method since I/O timer routine gets called every one second. Is there
any other more suitable method ??

Thanks for all help
Madhu


You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> I need to reset and cancel the timer in my ISR. I wanted to implement the

timeout using KeSetTimer. But that function cannot be used in ISR. So, I

Maintain some BOOLEAN or bitwise flags in your device extension which can be
touched from the ISR and will prevent the timer work from being done.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Actually I am using an unsigned variable to check for
my timeout. I initialize this variable as -1 until I
receive my first interrupt ( as sugested by Art
Baker’s book).In the timer function, I simply check
this variable. If it is -1 I return without doing
anything.
After receiving the first interrupt I set this
variable as 1. In the timeout function, I check this
variable to see if it is = 0 after
InterlockedDecrement(). If it is, I do the necessary
actions required for timeout.
But my doubt is, since the timer routine keeps getting
called every 1 second after I call IoSetTimer, there
are chances of it being called between interrupts
although the device has not timed out. So how do I
handle this ??

Thanks for all help
Madhu

— “Maxim S. Shatskih”
wrote:
> > I need to reset and cancel the timer in my ISR. I
> wanted to implement the
> > timeout using KeSetTimer. But that function cannot
> be used in ISR. So, I
>
> Maintain some BOOLEAN or bitwise flags in your
> device extension which can be
> touched from the ISR and will prevent the timer work
> from being done.
>
> Max
>
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com