Re: IDE _GTM/_STM support

Alan Cox
2005-05-23T11:08:05Z

On Llu, 2005-05-23 at 03:07, Shaohua Li wrote:
> > Its waiting for the I/O to finish. The IDE layer needs the request
> > queues to be running so you probably need to defer the taskfile calls.
> The ACPI spec the _GTF task should be invoked very early. Eg. before
> other commands. Deferring the taskfile call possibly can't meet the
> requirement, can it? Sorry, I don't understand Linux IDE. The generic
> ide resume routine invokes a 'PM_RESUME' request, could _GTF commands be
> invoked before the PM_RESUME request?

Linux IDE is entirely request queue driven (almost anyway). If you
wanted to run a taskfile early you'd really need to go around the IDE
layer and perform the task file operations directly. For almost all of
the controllers that should not be a big problem as the register
addresses, operations and related information are in the IDE hwif
structure and issuing a polled taskfile is relatively trivial and
standardised code.

ie you can go
ACPI -> PCI device
PCI device -> IDE hwif
IDE hwif -> register addresses, ops
Directly issue polled taskfile
Poll for completion

and you can do that even before interrupts are enabled.

In the SATA world it gets more complicated but Jeff Garzik's SATA layer
seems to have the right functions exposed to issue taskfiles directly.