提交 badff03d 编写于 作者: A Alan Cox 提交者: Jeff Garzik

libata-core: Expose gtm methods for driver use

Talk to the dark side our driver has to, yes. Much misleading is the
data. Store it in a structure we do so that it may be parsed.
Signed-off-by: NAlan Cox <alan@redhat.com>
--
Whats small, old and shouts phrases out of order across mountains ?
Yodla..
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 70edb185
...@@ -200,7 +200,7 @@ void ata_acpi_associate(struct ata_host *host) ...@@ -200,7 +200,7 @@ void ata_acpi_associate(struct ata_host *host)
* RETURNS: * RETURNS:
* 0 on success, -ENOENT if _GTM doesn't exist, -errno on failure. * 0 on success, -ENOENT if _GTM doesn't exist, -errno on failure.
*/ */
static int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *gtm) int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *gtm)
{ {
struct acpi_buffer output = { .length = ACPI_ALLOCATE_BUFFER }; struct acpi_buffer output = { .length = ACPI_ALLOCATE_BUFFER };
union acpi_object *out_obj; union acpi_object *out_obj;
...@@ -244,6 +244,8 @@ static int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *gtm) ...@@ -244,6 +244,8 @@ static int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *gtm)
return rc; return rc;
} }
EXPORT_SYMBOL_GPL(ata_acpi_gtm);
/** /**
* ata_acpi_stm - execute _STM * ata_acpi_stm - execute _STM
* @ap: target ATA port * @ap: target ATA port
...@@ -257,7 +259,7 @@ static int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *gtm) ...@@ -257,7 +259,7 @@ static int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *gtm)
* RETURNS: * RETURNS:
* 0 on success, -ENOENT if _STM doesn't exist, -errno on failure. * 0 on success, -ENOENT if _STM doesn't exist, -errno on failure.
*/ */
static int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm) int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm)
{ {
acpi_status status; acpi_status status;
struct acpi_object_list input; struct acpi_object_list input;
...@@ -289,6 +291,8 @@ static int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm) ...@@ -289,6 +291,8 @@ static int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(ata_acpi_stm);
/** /**
* ata_dev_get_GTF - get the drive bootup default taskfile settings * ata_dev_get_GTF - get the drive bootup default taskfile settings
* @dev: target ATA device * @dev: target ATA device
......
...@@ -929,6 +929,8 @@ enum { ...@@ -929,6 +929,8 @@ enum {
/* libata-acpi.c */ /* libata-acpi.c */
#ifdef CONFIG_ATA_ACPI #ifdef CONFIG_ATA_ACPI
extern int ata_acpi_cbl_80wire(struct ata_port *ap); extern int ata_acpi_cbl_80wire(struct ata_port *ap);
int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm);
int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *stm);
#else #else
static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; } static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册