Skip to contentSkip to conversation

ACPI support for SATA/PATA

PATCH In review zhao, forrest 3 participants 6 messages Jul 26, 2006 – Aug 8, 2006 libata

lore
Share & tools
lore
#0 lore raw

cover ACPI support for SATA/PATA

Hello, all

In ACPI spec 3.0, section 9.9 defines 4 objects for PATA/SATA:

_GTF is for both PATA and SATA, which is used to return ATA task file needed to re-init the drive;
_SDD is SATA-only object, which is used to inform the platform of the type of device attached to a port;
_GTM and _STM are PATA-only objects, which are used to get/set PATA timing information(i.e. PIO and DMA speed).

In this patch set,
ata_acpi_exec_tfs() is for getting ATA task file from _GTF and executing them for a given drive;
ata_acpi_push_id() is for setting _SDD.

NOTE: this patch doesn't include the support for _GTM and _STM because libata defines ->set_piomode(), ->set_dmamode() callbacks for LLDD, which do the same work as _GTM and _STM. So I think it's not necessary to provide redundant functionality by _GTM and _STM.

Randy,
I'll add your sign-off line after you review the patch.

Thanks,
Forrest

#1 lore raw
Quoted 10 lines · forrest

Hello, all

In ACPI spec 3.0, section 9.9 defines 4 objects for PATA/SATA:

_GTF is for both PATA and SATA, which is used to return ATA task file needed to re-init the drive;
_SDD is SATA-only object, which is used to inform the platform of the type of device attached to a port;
_GTM and _STM are PATA-only objects, which are used to get/set PATA timing information(i.e. PIO and DMA speed).

It seems to be quite common for ICH*M notebooks to use the SATA ports to attach PATA drives with PATA->SATA bridge chips in the middle.

In this case, one would expect the _GTM and _STM objects to be necessary, even though Linux thinks it's a SATA situation.

Do the patches take this into account?

Cheers

#2 lore raw
Quoted 12 lines · Mark Lord
Quoted 10 lines · forrest

Hello, all

In ACPI spec 3.0, section 9.9 defines 4 objects for PATA/SATA:

_GTF is for both PATA and SATA, which is used to return ATA task file needed to re-init the drive;
_SDD is SATA-only object, which is used to inform the platform of the type of device attached to a port;
_GTM and _STM are PATA-only objects, which are used to get/set PATA timing information(i.e. PIO and DMA speed).

Quoted 6 lines

It seems to be quite common for ICH*M notebooks to use the SATA ports to attach PATA drives with PATA->SATA bridge chips in the middle.

In this case, one would expect the _GTM and _STM objects to be necessary, even though Linux thinks it's a SATA situation.

Hi Mark,

I re-read the section 9.9 of ACPI spec 3.0, but didn't find any description about how to deal with "PATA->SATA bridge". Is this version of APCI spec outdated?
Would you please point me to spec(or document), which has the description of how to deal with "PATA->SATA bridge"?

Thanks,
Forrest

#3 lore raw
Quoted 19 lines · forrest
Quoted 11 lines · Mark Lord
Quoted 10 lines · forrest

Hello, all

In ACPI spec 3.0, section 9.9 defines 4 objects for PATA/SATA:

_GTF is for both PATA and SATA, which is used to return ATA task file needed to re-init the drive;
_SDD is SATA-only object, which is used to inform the platform of the type of device attached to a port;
_GTM and _STM are PATA-only objects, which are used to get/set PATA timing information(i.e. PIO and DMA speed).

Quoted 6 lines

It seems to be quite common for ICH*M notebooks to use the SATA ports to attach PATA drives with PATA->SATA bridge chips in the middle.

In this case, one would expect the _GTM and _STM objects to be necessary, even though Linux thinks it's a SATA situation.

Quoted 7 lines

Hi Mark,

I re-read the section 9.9 of ACPI spec 3.0, but didn't find any description about how to deal with "PATA->SATA bridge". Is this version of APCI spec outdated?
Would you please point me to spec(or document), which has the description of how to deal with "PATA->SATA bridge"?

I don't have any documents, just machines that implement it.

Cheers

#4 lore raw
In reply to zhao, forrest
Quoted 20 lines · forrest
Quoted 12 lines · Mark Lord
Quoted 10 lines · forrest

Hello, all

In ACPI spec 3.0, section 9.9 defines 4 objects for PATA/SATA:

_GTF is for both PATA and SATA, which is used to return ATA task file needed to re-init the drive;
_SDD is SATA-only object, which is used to inform the platform of the type of device attached to a port;
_GTM and _STM are PATA-only objects, which are used to get/set PATA timing information(i.e. PIO and DMA speed).

Quoted 6 lines

It seems to be quite common for ICH*M notebooks to use the SATA ports to attach PATA drives with PATA->SATA bridge chips in the middle.

In this case, one would expect the _GTM and _STM objects to be necessary, even though Linux thinks it's a SATA situation.

Quoted 7 lines

Hi Mark,

I re-read the section 9.9 of ACPI spec 3.0, but didn't find any description about how to deal with "PATA->SATA bridge". Is this version of APCI spec outdated?
Would you please point me to spec(or document), which has the description of how to deal with "PATA->SATA bridge"?

(I would have said SATA->PATA bridge. :)

No docs. When I was at Intel, I asked the (MPG) BIOS people about this. Their reply was something like (IIRC), "You do whatever ACPI commands that the host side thinks it is talking to."
In other words, use SATA commands here.
However, I had added some code to attempt to handle this, although Jens and Alan (and maybe Jeff) all told me that it was
incorrect: I attempted to use some flag (e.g., <legacy_mode>, but I'm not sure which name exactly) to determine the full configuration, but that idea was nack-ed.

Probably the best thing to do is ask them or some other (Intel) BIOS people what they think about it and what their recommendation is.

---
~Randy

#5 lore raw
In reply to zhao, forrest
Quoted 17 lines · forrest

Hello, all

In ACPI spec 3.0, section 9.9 defines 4 objects for PATA/SATA:

_GTF is for both PATA and SATA, which is used to return ATA task file needed to re-init the drive;
_SDD is SATA-only object, which is used to inform the platform of the type of device attached to a port;
_GTM and _STM are PATA-only objects, which are used to get/set PATA timing information(i.e. PIO and DMA speed).

In this patch set,
ata_acpi_exec_tfs() is for getting ATA task file from _GTF and executing them for a given drive;
ata_acpi_push_id() is for setting _SDD.

Quoted 4 lines

NOTE: this patch doesn't include the support for _GTM and _STM because libata defines ->set_piomode(), ->set_dmamode() callbacks for LLDD, which do the same work as _GTM and _STM. So I think it's not necessary to provide redundant functionality by _GTM and _STM.

Do LLDDs use set_piomode() and set_dmamode() to save those modes before suspend and restore them on resume?

Thanks,
---
~Randy