Hi
Are there any ways from DDK (API) to disable a particular interrupt?
thanks
--
Robert

Re: DDK function to disable interrupt? by Maxim

Maxim
Tue Jan 11 11:41:39 CST 2005

KeSynchronizeExecution disables this interrupt, executes your provided
code, then re-enables the interrupt back.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"robert" <robert@discussions.microsoft.com> wrote in message
news:8CD09C7D-D27A-43B3-B691-2C293F4BC1B9@microsoft.com...
> Hi
> Are there any ways from DDK (API) to disable a particular interrupt?
> thanks
> --
> Robert



Re: DDK function to disable interrupt? by robert

robert
Wed Jan 12 12:03:02 CST 2005

Maxim,

What I need is an API, which just disables an interrupt, so other
drivers will not be notified and handle the interrupt. then reenable it,
something like _asm cli.

Thanks
Robert

"Maxim S. Shatskih" wrote:

> KeSynchronizeExecution disables this interrupt, executes your provided
> code, then re-enables the interrupt back.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
> "robert" <robert@discussions.microsoft.com> wrote in message
> news:8CD09C7D-D27A-43B3-B691-2C293F4BC1B9@microsoft.com...
> > Hi
> > Are there any ways from DDK (API) to disable a particular interrupt?
> > thanks
> > --
> > Robert
>
>
>

Re: DDK function to disable interrupt? by Don

Don
Wed Jan 12 12:09:45 CST 2005

So you want to disable other devices interrupts? This is not a nice thing
to do, if the interrupt is shared you could creating serious problems for
other drivers or possibly a system reboot on a watchdog timer. If the
interrupt isn't shared then you shouldn't be playing with it unless you own
the device and if you do you can disable the interrupt in hardware! Note:
CLI only disables interrupts for this processor, nowadays that is rarely
ever useful.

Tell us what you overall problem is and maybe we can suggest a solution.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

"robert" <robert@discussions.microsoft.com> wrote in message
news:A0F3DFF3-3699-4600-B9BE-0E4A2ACC842C@microsoft.com...
> Maxim,
>
> What I need is an API, which just disables an interrupt, so other
> drivers will not be notified and handle the interrupt. then reenable it,
> something like _asm cli.
>
> Thanks
> Robert
>



Re: DDK function to disable interrupt? by Doron

Doron
Wed Jan 12 12:15:01 CST 2005

depends on what you mean by disabling the interrupt. if you want the hw to
stop generating interrupts, that is hw specific and not done generically. if
you want to synchronize execution of code so that the ISR does not
interrupt, what Maxim suggested works.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:%23fVq5SA%23EHA.3988@TK2MSFTNGP11.phx.gbl...
> KeSynchronizeExecution disables this interrupt, executes your provided
> code, then re-enables the interrupt back.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
> "robert" <robert@discussions.microsoft.com> wrote in message
> news:8CD09C7D-D27A-43B3-B691-2C293F4BC1B9@microsoft.com...
>> Hi
>> Are there any ways from DDK (API) to disable a particular interrupt?
>> thanks
>> --
>> Robert
>
>



Re: DDK function to disable interrupt? by Maxim

Maxim
Wed Jan 12 14:40:06 CST 2005

No such API in Windows. It does not need it.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"robert" <robert@discussions.microsoft.com> wrote in message
news:A0F3DFF3-3699-4600-B9BE-0E4A2ACC842C@microsoft.com...
> Maxim,
>
> What I need is an API, which just disables an interrupt, so other
> drivers will not be notified and handle the interrupt. then reenable it,
> something like _asm cli.
>
> Thanks
> Robert
>
> "Maxim S. Shatskih" wrote:
>
> > KeSynchronizeExecution disables this interrupt, executes your provided
> > code, then re-enables the interrupt back.
> >
> > --
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > maxim@storagecraft.com
> > http://www.storagecraft.com
> >
> > "robert" <robert@discussions.microsoft.com> wrote in message
> > news:8CD09C7D-D27A-43B3-B691-2C293F4BC1B9@microsoft.com...
> > > Hi
> > > Are there any ways from DDK (API) to disable a particular interrupt?
> > > thanks
> > > --
> > > Robert
> >
> >
> >



Re: DDK function to disable interrupt? by robert

robert
Wed Jan 12 21:29:02 CST 2005

thanks for your inputs.

My problem:
I have an AHCI enabled PC with OEM driver support. the OEM driver uses
the AHCI memory registers (an interface called Host bus adapters, HBA) to
commicate with SATA devices. However, my driver also needs to use this memory
registers to do some tasks to the SATA devices. If I didn't disable the
interrupt for the HBA, any commands my driver issues and interrupts raised by
HBA are serviced by the OEM driver. I won't get correct data consistantly. If
I disable the interrupts (through the AHCI memory register), I can get
correct results consistantly. However, in this situation, How can my driver
synchronize with the OEM driver to share the same memory registers? so my
driver's write or or OEM driver's write to the memory registers are not
pre-emptied by one another.
Any solutions for my problem?
Thanks


"Don Burn" wrote:

> So you want to disable other devices interrupts? This is not a nice thing
> to do, if the interrupt is shared you could creating serious problems for
> other drivers or possibly a system reboot on a watchdog timer. If the
> interrupt isn't shared then you shouldn't be playing with it unless you own
> the device and if you do you can disable the interrupt in hardware! Note:
> CLI only disables interrupts for this processor, nowadays that is rarely
> ever useful.
>
> Tell us what you overall problem is and maybe we can suggest a solution.
>
>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Remove StopSpam from the email to reply
>
> "robert" <robert@discussions.microsoft.com> wrote in message
> news:A0F3DFF3-3699-4600-B9BE-0E4A2ACC842C@microsoft.com...
> > Maxim,
> >
> > What I need is an API, which just disables an interrupt, so other
> > drivers will not be notified and handle the interrupt. then reenable it,
> > something like _asm cli.
> >
> > Thanks
> > Robert
> >
>
>
>

Re: DDK function to disable interrupt? by Doron

Doron
Thu Jan 13 01:23:01 CST 2005

if the driver in question does not provide you with the ability to
synchronize against, you are out of luck. there is no way to do what you
want in a generic fashion without explicit driver support.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"robert" <robert@discussions.microsoft.com> wrote in message
news:AC1047DC-E78B-4F38-9801-161FF9DF0874@microsoft.com...
> thanks for your inputs.
>
> My problem:
> I have an AHCI enabled PC with OEM driver support. the OEM driver uses
> the AHCI memory registers (an interface called Host bus adapters, HBA) to
> commicate with SATA devices. However, my driver also needs to use this
> memory
> registers to do some tasks to the SATA devices. If I didn't disable the
> interrupt for the HBA, any commands my driver issues and interrupts raised
> by
> HBA are serviced by the OEM driver. I won't get correct data consistantly.
> If
> I disable the interrupts (through the AHCI memory register), I can get
> correct results consistantly. However, in this situation, How can my
> driver
> synchronize with the OEM driver to share the same memory registers? so my
> driver's write or or OEM driver's write to the memory registers are not
> pre-emptied by one another.
> Any solutions for my problem?
> Thanks
>
>
> "Don Burn" wrote:
>
>> So you want to disable other devices interrupts? This is not a nice
>> thing
>> to do, if the interrupt is shared you could creating serious problems for
>> other drivers or possibly a system reboot on a watchdog timer. If the
>> interrupt isn't shared then you shouldn't be playing with it unless you
>> own
>> the device and if you do you can disable the interrupt in hardware!
>> Note:
>> CLI only disables interrupts for this processor, nowadays that is rarely
>> ever useful.
>>
>> Tell us what you overall problem is and maybe we can suggest a solution.
>>
>>
>> --
>> Don Burn (MVP, Windows DDK)
>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> Remove StopSpam from the email to reply
>>
>> "robert" <robert@discussions.microsoft.com> wrote in message
>> news:A0F3DFF3-3699-4600-B9BE-0E4A2ACC842C@microsoft.com...
>> > Maxim,
>> >
>> > What I need is an API, which just disables an interrupt, so other
>> > drivers will not be notified and handle the interrupt. then reenable
>> > it,
>> > something like _asm cli.
>> >
>> > Thanks
>> > Robert
>> >
>>
>>
>>



Re: DDK function to disable interrupt? by robert

robert
Thu Jan 13 12:35:03 CST 2005

If I raise the IRQL to dispatch level before accessing the registers, will
this help at all?
thanks


"Doron Holan [MS]" wrote:

> if the driver in question does not provide you with the ability to
> synchronize against, you are out of luck. there is no way to do what you
> want in a generic fashion without explicit driver support.
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "robert" <robert@discussions.microsoft.com> wrote in message
> news:AC1047DC-E78B-4F38-9801-161FF9DF0874@microsoft.com...
> > thanks for your inputs.
> >
> > My problem:
> > I have an AHCI enabled PC with OEM driver support. the OEM driver uses
> > the AHCI memory registers (an interface called Host bus adapters, HBA) to
> > commicate with SATA devices. However, my driver also needs to use this
> > memory
> > registers to do some tasks to the SATA devices. If I didn't disable the
> > interrupt for the HBA, any commands my driver issues and interrupts raised
> > by
> > HBA are serviced by the OEM driver. I won't get correct data consistantly.
> > If
> > I disable the interrupts (through the AHCI memory register), I can get
> > correct results consistantly. However, in this situation, How can my
> > driver
> > synchronize with the OEM driver to share the same memory registers? so my
> > driver's write or or OEM driver's write to the memory registers are not
> > pre-emptied by one another.
> > Any solutions for my problem?
> > Thanks
> >
> >
> > "Don Burn" wrote:
> >
> >> So you want to disable other devices interrupts? This is not a nice
> >> thing
> >> to do, if the interrupt is shared you could creating serious problems for
> >> other drivers or possibly a system reboot on a watchdog timer. If the
> >> interrupt isn't shared then you shouldn't be playing with it unless you
> >> own
> >> the device and if you do you can disable the interrupt in hardware!
> >> Note:
> >> CLI only disables interrupts for this processor, nowadays that is rarely
> >> ever useful.
> >>
> >> Tell us what you overall problem is and maybe we can suggest a solution.
> >>
> >>
> >> --
> >> Don Burn (MVP, Windows DDK)
> >> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> >> Remove StopSpam from the email to reply
> >>
> >> "robert" <robert@discussions.microsoft.com> wrote in message
> >> news:A0F3DFF3-3699-4600-B9BE-0E4A2ACC842C@microsoft.com...
> >> > Maxim,
> >> >
> >> > What I need is an API, which just disables an interrupt, so other
> >> > drivers will not be notified and handle the interrupt. then reenable
> >> > it,
> >> > something like _asm cli.
> >> >
> >> > Thanks
> >> > Robert
> >> >
> >>
> >>
> >>
>
>
>

Re: DDK function to disable interrupt? by Don

Don
Thu Jan 13 12:54:10 CST 2005

NO. Even if you can stop the driver from accesses, you are not sure what
state the device/driver are in. The driver could be in the middle of an
operation that if you touch the device bad things will happen. Can you use
IOCTL_ATA_PASS_THROUGH_DIRECT
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/storage/hh/storage/k307_8f1da276-e1bf-405e-8e01-a633b8671d5f.xml.asp
to achieve what you want?


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply


"robert" <robert@discussions.microsoft.com> wrote in message
news:0EB7FEFE-F6D9-489F-B5BE-1C7E6521DCCC@microsoft.com...
> If I raise the IRQL to dispatch level before accessing the registers, will
> this help at all?
> thanks
>
>
> "Doron Holan [MS]" wrote:
>
> > if the driver in question does not provide you with the ability to
> > synchronize against, you are out of luck. there is no way to do what
you
> > want in a generic fashion without explicit driver support.
> >
> > d
> >
> > --
> > Please do not send e-mail directly to this alias. this alias is for
> > newsgroup purposes only.
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "robert" <robert@discussions.microsoft.com> wrote in message
> > news:AC1047DC-E78B-4F38-9801-161FF9DF0874@microsoft.com...
> > > thanks for your inputs.
> > >
> > > My problem:
> > > I have an AHCI enabled PC with OEM driver support. the OEM driver
uses
> > > the AHCI memory registers (an interface called Host bus adapters, HBA)
to
> > > commicate with SATA devices. However, my driver also needs to use this
> > > memory
> > > registers to do some tasks to the SATA devices. If I didn't disable
the
> > > interrupt for the HBA, any commands my driver issues and interrupts
raised
> > > by
> > > HBA are serviced by the OEM driver. I won't get correct data
consistantly.
> > > If
> > > I disable the interrupts (through the AHCI memory register), I can get
> > > correct results consistantly. However, in this situation, How can my
> > > driver
> > > synchronize with the OEM driver to share the same memory registers? so
my
> > > driver's write or or OEM driver's write to the memory registers are
not
> > > pre-emptied by one another.
> > > Any solutions for my problem?
> > > Thanks
> > >
> > >
> > > "Don Burn" wrote:
> > >
> > >> So you want to disable other devices interrupts? This is not a nice
> > >> thing
> > >> to do, if the interrupt is shared you could creating serious problems
for
> > >> other drivers or possibly a system reboot on a watchdog timer. If
the
> > >> interrupt isn't shared then you shouldn't be playing with it unless
you
> > >> own
> > >> the device and if you do you can disable the interrupt in hardware!
> > >> Note:
> > >> CLI only disables interrupts for this processor, nowadays that is
rarely
> > >> ever useful.
> > >>
> > >> Tell us what you overall problem is and maybe we can suggest a
solution.
> > >>
> > >>
> > >> --
> > >> Don Burn (MVP, Windows DDK)
> > >> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> > >> Remove StopSpam from the email to reply
> > >>
> > >> "robert" <robert@discussions.microsoft.com> wrote in message
> > >> news:A0F3DFF3-3699-4600-B9BE-0E4A2ACC842C@microsoft.com...
> > >> > Maxim,
> > >> >
> > >> > What I need is an API, which just disables an interrupt, so
other
> > >> > drivers will not be notified and handle the interrupt. then
reenable
> > >> > it,
> > >> > something like _asm cli.
> > >> >
> > >> > Thanks
> > >> > Robert
> > >> >
> > >>
> > >>
> > >>
> >
> >
> >



Re: DDK function to disable interrupt? by robert

robert
Thu Jan 13 13:57:04 CST 2005

Yes, this is what I would like to do. However, this is only supported on XP
SP2. My driver is using this for tasks on this version of OS whenever this
IOCTL is supported in the system. However, if Windows driver is replaced by a
vendor driver, which doesn't implement this function, then I have a problem.
On the AHCI enabled PC, XP SP2, when I send ATA_PASS_THROUGH IOCTL, this
causes the OS to reboot.
thanks


"Don Burn" wrote:

> NO. Even if you can stop the driver from accesses, you are not sure what
> state the device/driver are in. The driver could be in the middle of an
> operation that if you touch the device bad things will happen. Can you use
> IOCTL_ATA_PASS_THROUGH_DIRECT
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/storage/hh/storage/k307_8f1da276-e1bf-405e-8e01-a633b8671d5f.xml.asp
> to achieve what you want?
>
>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Remove StopSpam from the email to reply
>
>
> "robert" <robert@discussions.microsoft.com> wrote in message
> news:0EB7FEFE-F6D9-489F-B5BE-1C7E6521DCCC@microsoft.com...
> > If I raise the IRQL to dispatch level before accessing the registers, will
> > this help at all?
> > thanks
> >
> >
> > "Doron Holan [MS]" wrote:
> >
> > > if the driver in question does not provide you with the ability to
> > > synchronize against, you are out of luck. there is no way to do what
> you
> > > want in a generic fashion without explicit driver support.
> > >
> > > d
> > >
> > > --
> > > Please do not send e-mail directly to this alias. this alias is for
> > > newsgroup purposes only.
> > > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > >
> > >
> > > "robert" <robert@discussions.microsoft.com> wrote in message
> > > news:AC1047DC-E78B-4F38-9801-161FF9DF0874@microsoft.com...
> > > > thanks for your inputs.
> > > >
> > > > My problem:
> > > > I have an AHCI enabled PC with OEM driver support. the OEM driver
> uses
> > > > the AHCI memory registers (an interface called Host bus adapters, HBA)
> to
> > > > commicate with SATA devices. However, my driver also needs to use this
> > > > memory
> > > > registers to do some tasks to the SATA devices. If I didn't disable
> the
> > > > interrupt for the HBA, any commands my driver issues and interrupts
> raised
> > > > by
> > > > HBA are serviced by the OEM driver. I won't get correct data
> consistantly.
> > > > If
> > > > I disable the interrupts (through the AHCI memory register), I can get
> > > > correct results consistantly. However, in this situation, How can my
> > > > driver
> > > > synchronize with the OEM driver to share the same memory registers? so
> my
> > > > driver's write or or OEM driver's write to the memory registers are
> not
> > > > pre-emptied by one another.
> > > > Any solutions for my problem?
> > > > Thanks
> > > >
> > > >
> > > > "Don Burn" wrote:
> > > >
> > > >> So you want to disable other devices interrupts? This is not a nice
> > > >> thing
> > > >> to do, if the interrupt is shared you could creating serious problems
> for
> > > >> other drivers or possibly a system reboot on a watchdog timer. If
> the
> > > >> interrupt isn't shared then you shouldn't be playing with it unless
> you
> > > >> own
> > > >> the device and if you do you can disable the interrupt in hardware!
> > > >> Note:
> > > >> CLI only disables interrupts for this processor, nowadays that is
> rarely
> > > >> ever useful.
> > > >>
> > > >> Tell us what you overall problem is and maybe we can suggest a
> solution.
> > > >>
> > > >>
> > > >> --
> > > >> Don Burn (MVP, Windows DDK)
> > > >> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> > > >> Remove StopSpam from the email to reply
> > > >>
> > > >> "robert" <robert@discussions.microsoft.com> wrote in message
> > > >> news:A0F3DFF3-3699-4600-B9BE-0E4A2ACC842C@microsoft.com...
> > > >> > Maxim,
> > > >> >
> > > >> > What I need is an API, which just disables an interrupt, so
> other
> > > >> > drivers will not be notified and handle the interrupt. then
> reenable
> > > >> > it,
> > > >> > something like _asm cli.
> > > >> >
> > > >> > Thanks
> > > >> > Robert
> > > >> >
> > > >>
> > > >>
> > > >>
> > >
> > >
> > >
>
>
>

Re: DDK function to disable interrupt? by robert

robert
Thu Jan 13 18:01:03 CST 2005

Doron,
Is it possible to write a filter driver layed above the OEM driver to
solve this problem? this driver will filter all IRPs coming to the OEM
driver, hold up/queing the IRPs when my driver want to access the memory
registers.
thanks


"Doron Holan [MS]" wrote:

> if the driver in question does not provide you with the ability to
> synchronize against, you are out of luck. there is no way to do what you
> want in a generic fashion without explicit driver support.
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "robert" <robert@discussions.microsoft.com> wrote in message
> news:AC1047DC-E78B-4F38-9801-161FF9DF0874@microsoft.com...
> > thanks for your inputs.
> >
> > My problem:
> > I have an AHCI enabled PC with OEM driver support. the OEM driver uses
> > the AHCI memory registers (an interface called Host bus adapters, HBA) to
> > commicate with SATA devices. However, my driver also needs to use this
> > memory
> > registers to do some tasks to the SATA devices. If I didn't disable the
> > interrupt for the HBA, any commands my driver issues and interrupts raised
> > by
> > HBA are serviced by the OEM driver. I won't get correct data consistantly.
> > If
> > I disable the interrupts (through the AHCI memory register), I can get
> > correct results consistantly. However, in this situation, How can my
> > driver
> > synchronize with the OEM driver to share the same memory registers? so my
> > driver's write or or OEM driver's write to the memory registers are not
> > pre-emptied by one another.
> > Any solutions for my problem?
> > Thanks
> >
> >
> > "Don Burn" wrote:
> >
> >> So you want to disable other devices interrupts? This is not a nice
> >> thing
> >> to do, if the interrupt is shared you could creating serious problems for
> >> other drivers or possibly a system reboot on a watchdog timer. If the
> >> interrupt isn't shared then you shouldn't be playing with it unless you
> >> own
> >> the device and if you do you can disable the interrupt in hardware!
> >> Note:
> >> CLI only disables interrupts for this processor, nowadays that is rarely
> >> ever useful.
> >>
> >> Tell us what you overall problem is and maybe we can suggest a solution.
> >>
> >>
> >> --
> >> Don Burn (MVP, Windows DDK)
> >> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> >> Remove StopSpam from the email to reply
> >>
> >> "robert" <robert@discussions.microsoft.com> wrote in message
> >> news:A0F3DFF3-3699-4600-B9BE-0E4A2ACC842C@microsoft.com...
> >> > Maxim,
> >> >
> >> > What I need is an API, which just disables an interrupt, so other
> >> > drivers will not be notified and handle the interrupt. then reenable
> >> > it,
> >> > something like _asm cli.
> >> >
> >> > Thanks
> >> > Robert
> >> >
> >>
> >>
> >>
>
>
>

Re: DDK function to disable interrupt? by Doron

Doron
Thu Jan 13 21:03:42 CST 2005

that still doesn't help if the device spuriously sends an interrupt of the
oem driver has a periodic timers which touch the hw to make sure it isn't
hung (as an example, it could have many other ways of periodically touching
the hw that is not based on IRP traffic).

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"robert" <robert@discussions.microsoft.com> wrote in message
news:4ED4631C-D1B7-4448-9852-5540B80C1798@microsoft.com...
> Doron,
> Is it possible to write a filter driver layed above the OEM driver to
> solve this problem? this driver will filter all IRPs coming to the OEM
> driver, hold up/queing the IRPs when my driver want to access the memory
> registers.
> thanks
>
>
> "Doron Holan [MS]" wrote:
>
>> if the driver in question does not provide you with the ability to
>> synchronize against, you are out of luck. there is no way to do what you
>> want in a generic fashion without explicit driver support.
>>
>> d
>>
>> --
>> Please do not send e-mail directly to this alias. this alias is for
>> newsgroup purposes only.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>> "robert" <robert@discussions.microsoft.com> wrote in message
>> news:AC1047DC-E78B-4F38-9801-161FF9DF0874@microsoft.com...
>> > thanks for your inputs.
>> >
>> > My problem:
>> > I have an AHCI enabled PC with OEM driver support. the OEM driver
>> > uses
>> > the AHCI memory registers (an interface called Host bus adapters, HBA)
>> > to
>> > commicate with SATA devices. However, my driver also needs to use this
>> > memory
>> > registers to do some tasks to the SATA devices. If I didn't disable the
>> > interrupt for the HBA, any commands my driver issues and interrupts
>> > raised
>> > by
>> > HBA are serviced by the OEM driver. I won't get correct data
>> > consistantly.
>> > If
>> > I disable the interrupts (through the AHCI memory register), I can get
>> > correct results consistantly. However, in this situation, How can my
>> > driver
>> > synchronize with the OEM driver to share the same memory registers? so
>> > my
>> > driver's write or or OEM driver's write to the memory registers are not
>> > pre-emptied by one another.
>> > Any solutions for my problem?
>> > Thanks
>> >
>> >
>> > "Don Burn" wrote:
>> >
>> >> So you want to disable other devices interrupts? This is not a nice
>> >> thing
>> >> to do, if the interrupt is shared you could creating serious problems
>> >> for
>> >> other drivers or possibly a system reboot on a watchdog timer. If the
>> >> interrupt isn't shared then you shouldn't be playing with it unless
>> >> you
>> >> own
>> >> the device and if you do you can disable the interrupt in hardware!
>> >> Note:
>> >> CLI only disables interrupts for this processor, nowadays that is
>> >> rarely
>> >> ever useful.
>> >>
>> >> Tell us what you overall problem is and maybe we can suggest a
>> >> solution.
>> >>
>> >>
>> >> --
>> >> Don Burn (MVP, Windows DDK)
>> >> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> >> Remove StopSpam from the email to reply
>> >>
>> >> "robert" <robert@discussions.microsoft.com> wrote in message
>> >> news:A0F3DFF3-3699-4600-B9BE-0E4A2ACC842C@microsoft.com...
>> >> > Maxim,
>> >> >
>> >> > What I need is an API, which just disables an interrupt, so
>> >> > other
>> >> > drivers will not be notified and handle the interrupt. then reenable
>> >> > it,
>> >> > something like _asm cli.
>> >> >
>> >> > Thanks
>> >> > Robert
>> >> >
>> >>
>> >>
>> >>
>>
>>
>>