> Hi All,
Background info: //Platform Windows NT/2K/9x
We are having a driver (normal KMD) for sending specific commands
(from our application) to the IDE device (a removable Storage HardDisk)
we want to control. This driver directly manipulates the IDE controller
registers. We chk the err/sts registers and then read/write to the
controller regs. We are not making use of any synchronization objects
while accessing the regs. We chk the busy sts and go …
The device may get into a busy state (or the drive may spin down)
from which it takes some considerable amount of time to return. So if we are
chking the busy sts before accessing the IDE controller regs, the wait may
fail.
[We were initially disabling the interrupts while doing some operations
and that resulted in system crashes when some other applications tried to
access the dev. Now the itr: disabling is not thre.]
The device will behave as a normal HDD for the user. ie other drivers may
also work on it. The problem is that our access to the device is not
serialized with the other access. This results in random failures while
reading/writing data.
In 9x, we may make use of the services from IOS for accessing the IDE
Controller regs. Is thre such services available for NT which we can avail
from the KMD?
What are the possible options we have?
(1?)Make our KMD to be a SCSI Miniport driver, making use of SCSI Port
driver functions to access the registers.
(2?)Filter Driver
Can a Filter Driver solve this problem? We are hoping that if we can
route the dev requests thru an FD, the device access may get serialized
…ie one access at a time and hence all the problems may go away.
What inputs do you have on this? Whre shall i begin/end?
Thanks in advance
balan
“What lies behind us and what lies before us are tiny matters compared to
what lies within us.” —Emerson