* [PATCH] libata-acpi: fix _GTF command protocol for ATAPI devices
@ 2007-04-22 17:06 Tejun Heo
2007-04-22 17:38 ` Alan Cox
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Tejun Heo @ 2007-04-22 17:06 UTC (permalink / raw)
To: Jeff Garzik, linux-ide
_GTF command is never ATA_PROT_ATAPI_NODATA whether the device is
ATAPI or not. It's always ATA_PROT_NODATA.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/ata/libata-acpi.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 03a0acf..cb3eab6 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -489,8 +489,7 @@ static void taskfile_load_raw(struct ata_port *ap,
/* convert gtf to tf */
tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; /* TBD */
- tf.protocol = atadev->class == ATA_DEV_ATAPI ?
- ATA_PROT_ATAPI_NODATA : ATA_PROT_NODATA;
+ tf.protocol = ATA_PROT_NODATA;
tf.feature = gtf->tfa[0]; /* 0x1f1 */
tf.nsect = gtf->tfa[1]; /* 0x1f2 */
tf.lbal = gtf->tfa[2]; /* 0x1f3 */
--
1.5.0.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] libata-acpi: fix _GTF command protocol for ATAPI devices
2007-04-22 17:06 [PATCH] libata-acpi: fix _GTF command protocol for ATAPI devices Tejun Heo
@ 2007-04-22 17:38 ` Alan Cox
2007-04-28 18:53 ` Jeff Garzik
2007-05-10 0:16 ` Jeff Garzik
2 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2007-04-22 17:38 UTC (permalink / raw)
To: Tejun Heo; +Cc: Jeff Garzik, linux-ide
On Mon, 23 Apr 2007 02:06:46 +0900
Tejun Heo <htejun@gmail.com> wrote:
> _GTF command is never ATA_PROT_ATAPI_NODATA whether the device is
> ATAPI or not. It's always ATA_PROT_NODATA.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] libata-acpi: fix _GTF command protocol for ATAPI devices
2007-04-22 17:06 [PATCH] libata-acpi: fix _GTF command protocol for ATAPI devices Tejun Heo
2007-04-22 17:38 ` Alan Cox
@ 2007-04-28 18:53 ` Jeff Garzik
2007-04-29 2:51 ` Tejun Heo
2007-05-10 0:16 ` Jeff Garzik
2 siblings, 1 reply; 6+ messages in thread
From: Jeff Garzik @ 2007-04-28 18:53 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide
Tejun Heo wrote:
> _GTF command is never ATA_PROT_ATAPI_NODATA whether the device is
> ATAPI or not. It's always ATA_PROT_NODATA.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> ---
> drivers/ata/libata-acpi.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
> index 03a0acf..cb3eab6 100644
> --- a/drivers/ata/libata-acpi.c
> +++ b/drivers/ata/libata-acpi.c
> @@ -489,8 +489,7 @@ static void taskfile_load_raw(struct ata_port *ap,
>
> /* convert gtf to tf */
> tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; /* TBD */
> - tf.protocol = atadev->class == ATA_DEV_ATAPI ?
> - ATA_PROT_ATAPI_NODATA : ATA_PROT_NODATA;
> + tf.protocol = ATA_PROT_NODATA;
Elaboration?
ATA_PROT_ATAPI_NODATA is the ATAPI version of the non-data protocol, so
this change is unexpected.
Jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] libata-acpi: fix _GTF command protocol for ATAPI devices
2007-04-28 18:53 ` Jeff Garzik
@ 2007-04-29 2:51 ` Tejun Heo
2007-04-29 3:13 ` Jeff Garzik
0 siblings, 1 reply; 6+ messages in thread
From: Tejun Heo @ 2007-04-29 2:51 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide
Jeff Garzik wrote:
> Tejun Heo wrote:
>> _GTF command is never ATA_PROT_ATAPI_NODATA whether the device is
>> ATAPI or not. It's always ATA_PROT_NODATA.
>>
>> Signed-off-by: Tejun Heo <htejun@gmail.com>
>> ---
>> drivers/ata/libata-acpi.c | 3 +--
>> 1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
>> index 03a0acf..cb3eab6 100644
>> --- a/drivers/ata/libata-acpi.c
>> +++ b/drivers/ata/libata-acpi.c
>> @@ -489,8 +489,7 @@ static void taskfile_load_raw(struct ata_port *ap,
>>
>> /* convert gtf to tf */
>> tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; /* TBD */
>> - tf.protocol = atadev->class == ATA_DEV_ATAPI ?
>> - ATA_PROT_ATAPI_NODATA : ATA_PROT_NODATA;
>> + tf.protocol = ATA_PROT_NODATA;
>
> Elaboration?
>
> ATA_PROT_ATAPI_NODATA is the ATAPI version of the non-data protocol, so
> this change is unexpected.
ATA_PROT_ATAPI_NODATA is used for PACKET command without CDB. ACPI _GTF
never contains PACKET command. It's always ATA commands. So, without
the change, it basically ends up issuing an ATA command than tries to
transmit non-existent CDB and gets a HSM violation.
--
tejun
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] libata-acpi: fix _GTF command protocol for ATAPI devices
2007-04-29 2:51 ` Tejun Heo
@ 2007-04-29 3:13 ` Jeff Garzik
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2007-04-29 3:13 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide
Tejun Heo wrote:
> ATA_PROT_ATAPI_NODATA is used for PACKET command without CDB. ACPI _GTF
> never contains PACKET command. It's always ATA commands.
Ah yes. Thanks for the reminder about the code I wrote :)
Jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] libata-acpi: fix _GTF command protocol for ATAPI devices
2007-04-22 17:06 [PATCH] libata-acpi: fix _GTF command protocol for ATAPI devices Tejun Heo
2007-04-22 17:38 ` Alan Cox
2007-04-28 18:53 ` Jeff Garzik
@ 2007-05-10 0:16 ` Jeff Garzik
2 siblings, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2007-05-10 0:16 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide
Tejun Heo wrote:
> _GTF command is never ATA_PROT_ATAPI_NODATA whether the device is
> ATAPI or not. It's always ATA_PROT_NODATA.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> ---
> drivers/ata/libata-acpi.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
> index 03a0acf..cb3eab6 100644
> --- a/drivers/ata/libata-acpi.c
> +++ b/drivers/ata/libata-acpi.c
> @@ -489,8 +489,7 @@ static void taskfile_load_raw(struct ata_port *ap,
>
> /* convert gtf to tf */
> tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; /* TBD */
> - tf.protocol = atadev->class == ATA_DEV_ATAPI ?
> - ATA_PROT_ATAPI_NODATA : ATA_PROT_NODATA;
> + tf.protocol = ATA_PROT_NODATA;
> tf.feature = gtf->tfa[0]; /* 0x1f1 */
> tf.nsect = gtf->tfa[1]; /* 0x1f2 */
> tf.lbal = gtf->tfa[2]; /* 0x1f3 */
applied
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-05-10 0:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-22 17:06 [PATCH] libata-acpi: fix _GTF command protocol for ATAPI devices Tejun Heo
2007-04-22 17:38 ` Alan Cox
2007-04-28 18:53 ` Jeff Garzik
2007-04-29 2:51 ` Tejun Heo
2007-04-29 3:13 ` Jeff Garzik
2007-05-10 0:16 ` Jeff Garzik
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).