linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Disabling SATA hardware interrupts
@ 2006-12-04 11:08 Thinus Viljoen
  2006-12-04 12:03 ` Alan
  0 siblings, 1 reply; 4+ messages in thread
From: Thinus Viljoen @ 2006-12-04 11:08 UTC (permalink / raw)
  To: linux-ide

Hi

I have the following questions:
1. Is it possible to (temporarily) disable the SATA hardware from
generating interrupts (either the controller or the actual HDD)?
2. if so, how?
3. if so, is it safe?

My setup is as follows:
Modules loaded:
ata_piix, libata, scsi_mod, ahci (ahci doesn't seem to be used)

SATA controller (from lspci):
00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA
Controller (rev 04)

HDD:
Hitachi Travelstar, model HTS541080G9SA00

Reason: I am building a real-time system using RTAI. I do not need to
access the HDD while in real-time mode, but I must access another
peripheral which shares the interrupt with libata. I want do disable
the libata interrupts while in real-time mode, to improve the timing
characteristics of the real-time peripheral.

Thanks
Thinus Viljoen

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Disabling SATA hardware interrupts
  2006-12-04 11:08 Disabling SATA hardware interrupts Thinus Viljoen
@ 2006-12-04 12:03 ` Alan
  2006-12-04 13:34   ` Thinus Viljoen
  0 siblings, 1 reply; 4+ messages in thread
From: Alan @ 2006-12-04 12:03 UTC (permalink / raw)
  To: Thinus Viljoen; +Cc: linux-ide

> Reason: I am building a real-time system using RTAI. I do not need to
> access the HDD while in real-time mode, but I must access another
> peripheral which shares the interrupt with libata. I want do disable
> the libata interrupts while in real-time mode, to improve the timing
> characteristics of the real-time peripheral.

The nIEN bit in the device registers control interrupt generation on ATA
devices. However ATA devices don't generate interrupts except on command
completion or during command processing so if you have no I/O outstanding
you won't have any interrupts anyway.

With funky new stuff like AHCI and NCQ this isn't so simple but for
simple ATA as with the ata_piix driver it is.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Disabling SATA hardware interrupts
  2006-12-04 12:03 ` Alan
@ 2006-12-04 13:34   ` Thinus Viljoen
  2006-12-04 14:47     ` Alan
  0 siblings, 1 reply; 4+ messages in thread
From: Thinus Viljoen @ 2006-12-04 13:34 UTC (permalink / raw)
  To: Alan; +Cc: linux-ide

On 12/4/06, Alan <alan@lxorguk.ukuu.org.uk> wrote:
>
> The nIEN bit in the device registers control interrupt generation on ATA
> devices. However ATA devices don't generate interrupts except on command
> completion or during command processing so if you have no I/O outstanding
> you won't have any interrupts anyway.
>
> With funky new stuff like AHCI and NCQ this isn't so simple but for
> simple ATA as with the ata_piix driver it is.
>

How do I go about setting/clearing this nIEN bit from my own module?
Open a handle to /dev/sda and calling some or other IOCTL, perhaps? (
I haven't accessed the HDD on this low level before, so I would
appreciate some details, or perhaps a small example).

Thanks
Thinus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Disabling SATA hardware interrupts
  2006-12-04 13:34   ` Thinus Viljoen
@ 2006-12-04 14:47     ` Alan
  0 siblings, 0 replies; 4+ messages in thread
From: Alan @ 2006-12-04 14:47 UTC (permalink / raw)
  To: Thinus Viljoen; +Cc: linux-ide

On Mon, 4 Dec 2006 15:34:09 +0200
"Thinus Viljoen" <thinus.viljoen@gmail.com> wrote:

> How do I go about setting/clearing this nIEN bit from my own module?
> Open a handle to /dev/sda and calling some or other IOCTL, perhaps? (
> I haven't accessed the HDD on this low level before, so I would
> appreciate some details, or perhaps a small example).

The ATA layer manages nIEN per command itself so you'll need to do a
rework of parts of the ATA layer. Alternatively you could just make sure
you've flushed all outstanding I/O before doing any realtime work.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-12-04 14:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-04 11:08 Disabling SATA hardware interrupts Thinus Viljoen
2006-12-04 12:03 ` Alan
2006-12-04 13:34   ` Thinus Viljoen
2006-12-04 14:47     ` Alan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).