Re: [PATCH] libata-acpi: fix _GTF command protocol for ATAPI devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
>> ---
>>  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
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux