2006-02-22 22:11:33

by Randy Dunlap

[permalink] [raw]
Subject: [PATCH 13/13] ATA ACPI: enable writing PATA taskfiles

From: Randy Dunlap <[email protected]>

Move 'noacpi' option handling to top of functions.
Enable writing taskfiles for PATA drives.

Signed-off-by: Randy Dunlap <[email protected]>
---
drivers/scsi/libata-acpi.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)

--- linux-2616-rc4-ata.orig/drivers/scsi/libata-acpi.c
+++ linux-2616-rc4-ata/drivers/scsi/libata-acpi.c
@@ -303,13 +303,14 @@ int ata_acpi_push_id(struct ata_port *ap
struct acpi_object_list input;
union acpi_object in_params[1];

+ if (noacpi)
+ return 0;
+
if (ap->legacy_mode) {
printk(KERN_DEBUG "%s: skipping for PATA mode\n",
__FUNCTION__);
return 0;
}
- if (noacpi)
- return 0;

if (ata_msg_probe(ap))
printk(KERN_DEBUG
@@ -655,11 +656,6 @@ int do_drive_set_taskfiles(struct ata_po

if (noacpi)
return 0;
- if (ap->legacy_mode) {
- printk(KERN_DEBUG "%s: skipping non-SATA drive\n",
- __FUNCTION__);
- return 0;
- }

if (!ata_dev_present(atadev) ||
(ap->flags & ATA_FLAG_PORT_DISABLED))
@@ -707,12 +703,12 @@ int ata_acpi_exec_tfs(struct ata_port *a
unsigned long gtf_address;
unsigned long obj_loc;

- if (ata_msg_probe(ap))
- printk(KERN_DEBUG "%s: ENTER:\n", __FUNCTION__);
-
if (noacpi)
return 0;

+ if (ata_msg_probe(ap))
+ printk(KERN_DEBUG "%s: ENTER:\n", __FUNCTION__);
+
for (ix = 0; ix < ATA_MAX_DEVICES; ix++) {
if (ata_msg_probe(ap))
printk(KERN_DEBUG "%s: call get_GTF, ix=%d\n",


2006-02-28 12:01:49

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH 13/13] ATA ACPI: enable writing PATA taskfiles

On St 22-02-06 14:07:14, Randy Dunlap wrote:
> From: Randy Dunlap <[email protected]>
>
> Move 'noacpi' option handling to top of functions.
> Enable writing taskfiles for PATA drives.

Changes order of return and debug message. It does not seem too useful
to me.
Pavel

> Signed-off-by: Randy Dunlap <[email protected]>
> ---
> drivers/scsi/libata-acpi.c | 16 ++++++----------
> 1 file changed, 6 insertions(+), 10 deletions(-)
>
> --- linux-2616-rc4-ata.orig/drivers/scsi/libata-acpi.c
> +++ linux-2616-rc4-ata/drivers/scsi/libata-acpi.c
> @@ -303,13 +303,14 @@ int ata_acpi_push_id(struct ata_port *ap
> struct acpi_object_list input;
> union acpi_object in_params[1];
>
> + if (noacpi)
> + return 0;
> +
> if (ap->legacy_mode) {
> printk(KERN_DEBUG "%s: skipping for PATA mode\n",
> __FUNCTION__);
> return 0;
> }
> - if (noacpi)
> - return 0;
>
> if (ata_msg_probe(ap))
> printk(KERN_DEBUG
...
> @@ -707,12 +703,12 @@ int ata_acpi_exec_tfs(struct ata_port *a
> unsigned long gtf_address;
> unsigned long obj_loc;
>
> - if (ata_msg_probe(ap))
> - printk(KERN_DEBUG "%s: ENTER:\n", __FUNCTION__);
> -
> if (noacpi)
> return 0;
>
> + if (ata_msg_probe(ap))
> + printk(KERN_DEBUG "%s: ENTER:\n", __FUNCTION__);
> +
> for (ix = 0; ix < ATA_MAX_DEVICES; ix++) {
> if (ata_msg_probe(ap))
> printk(KERN_DEBUG "%s: call get_GTF, ix=%d\n",


--
Web maintainer for suspend.sf.net (http://www.sf.net/projects/suspend) wanted...