linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] libata: implement dev->acpi_init_gtm
@ 2007-11-02 15:20 Tejun Heo
  2007-11-02 15:21 ` [PATCH 2/3] libata: extend ata_acpi_cbl_80wire() and fix cable detection in pata_via and pata_amd Tejun Heo
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Tejun Heo @ 2007-11-02 15:20 UTC (permalink / raw)
  To: Jeff Garzik, IDE/ATA development list, Alan Cox

Add dev->acpi_init_gtm and store initial GTM values on host
initialization.  If the field is valid, ATA_PFLAG_INIT_GTM_VALID flag
is set.  This is to remember BIOS/firmware programmed initial timing
for later use before reset and mode configuration modify it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 drivers/ata/libata-acpi.c |    3 +++
 include/linux/libata.h    |    2 ++
 2 files changed, 5 insertions(+)

Index: work/drivers/ata/libata-acpi.c
===================================================================
--- work.orig/drivers/ata/libata-acpi.c
+++ work/drivers/ata/libata-acpi.c
@@ -94,6 +94,9 @@ static void ata_acpi_associate_ide_port(
 
 		dev->acpi_handle = acpi_get_child(ap->acpi_handle, i);
 	}
+
+	if (ata_acpi_gtm(ap, &ap->acpi_init_gtm) == 0)
+		ap->pflags |= ATA_PFLAG_INIT_GTM_VALID;
 }
 
 static void ata_acpi_handle_hotplug(struct ata_port *ap, struct kobject *kobj,
Index: work/include/linux/libata.h
===================================================================
--- work.orig/include/linux/libata.h
+++ work/include/linux/libata.h
@@ -209,6 +209,7 @@ enum {
 	ATA_PFLAG_SUSPENDED	= (1 << 17), /* port is suspended (power) */
 	ATA_PFLAG_PM_PENDING	= (1 << 18), /* PM operation pending */
 	ATA_PFLAG_GTM_VALID	= (1 << 19), /* acpi_gtm data valid */
+	ATA_PFLAG_INIT_GTM_VALID = (1 << 20), /* initial gtm data valid */
 
 	/* struct ata_queued_cmd flags */
 	ATA_QCFLAG_ACTIVE	= (1 << 0), /* cmd not yet ack'd to scsi lyer */
@@ -633,6 +634,7 @@ struct ata_port {
 #ifdef CONFIG_ATA_ACPI
 	acpi_handle		acpi_handle;
 	struct ata_acpi_gtm	acpi_gtm;
+	struct ata_acpi_gtm	acpi_init_gtm;
 #endif
 	u8			sector_buf[ATA_SECT_SIZE]; /* owned by EH */
 };

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

end of thread, other threads:[~2007-11-03 12:33 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-02 15:20 [PATCH 1/3] libata: implement dev->acpi_init_gtm Tejun Heo
2007-11-02 15:21 ` [PATCH 2/3] libata: extend ata_acpi_cbl_80wire() and fix cable detection in pata_via and pata_amd Tejun Heo
2007-11-02 15:22   ` [PATCH 3/3] pata_amd: fix and improve cable detection Tejun Heo
2007-11-02 15:44     ` Alan Cox
2007-11-02 22:22       ` Tejun Heo
2007-11-03  0:10         ` Alan Cox
2007-11-03  0:35           ` Tejun Heo
2007-11-03  0:42           ` Tejun Heo
2007-11-02 15:42   ` [PATCH 2/3] libata: extend ata_acpi_cbl_80wire() and fix cable detection in pata_via and pata_amd Alan Cox
2007-11-02 22:18     ` Tejun Heo
2007-11-02 23:45       ` Alan Cox
2007-11-03  0:46         ` Tejun Heo
2007-11-03  1:12           ` Alan Cox
2007-11-03  1:16             ` Tejun Heo
2007-11-03  1:23               ` Alan Cox
2007-11-03  7:03                 ` Tejun Heo
2007-11-03  0:57     ` Bartlomiej Zolnierkiewicz
2007-11-03  1:12       ` Bartlomiej Zolnierkiewicz
2007-11-02 15:36 ` [PATCH 1/3] libata: implement dev->acpi_init_gtm Jeff Garzik
2007-11-02 22:12   ` Tejun Heo
2007-11-03  7:10     ` Tejun Heo
2007-11-03 12:33       ` Jeff Garzik
2007-11-02 15:44 ` Alan Cox
2007-11-02 22:08   ` Tejun Heo

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).