IDE Driver Design (Choosing the Driver Architecture)

> 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

Hi,
Itz documented that scsi miniport drivers are for newer Host Bus
Adapters. And SCSI filter drivers (over class driver)are supposed to allow
us sending vendor unique commands.

So is filter driver, the only option?

For normal commands we can directly call the lower class driver for
performing the task. How to perform device level access from the filter
driver? Surely we need to make use of the services of lower KMDs.

Say for performing one device specific operation, i need to read from one of
the registers of the IDE controller and write some value back to another
register. But this sequence is unknown to the lower KMD.
i may have to issue multiple IO Read/Write request to the
lower class driver by sending IRPs. can thre be a performance issue?

//Hey…Have i lost the way completely?

TIA
balan

—>>
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

…[snip]

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

<<—


“What lies behind us and what lies before us are tiny matters compared to
what lies within us.” —Emerson