Commit e52dcc48 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

libata: ATA_12/16 doesn't fall into ATAPI_MISC

SAT passthrus don't really fit into ATAPI_MISC class.  SAT passthru
commands always transfer multiple of 512 bytes and variable length
response is not allowed.  This patch creates a separate category -
ATAPI_PASS_THRU - for these.

This fixes HSM violation on "hdparm -I".
Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 436d34b3
...@@ -353,6 +353,11 @@ int atapi_cmd_type(u8 opcode) ...@@ -353,6 +353,11 @@ int atapi_cmd_type(u8 opcode)
case GPCMD_READ_CD_MSF: case GPCMD_READ_CD_MSF:
return ATAPI_READ_CD; return ATAPI_READ_CD;
case ATA_16:
case ATA_12:
if (atapi_passthru16)
return ATAPI_PASS_THRU;
/* fall thru */
default: default:
return ATAPI_MISC; return ATAPI_MISC;
} }
......
...@@ -350,7 +350,8 @@ enum { ...@@ -350,7 +350,8 @@ enum {
ATAPI_READ = 0, /* READs */ ATAPI_READ = 0, /* READs */
ATAPI_WRITE = 1, /* WRITEs */ ATAPI_WRITE = 1, /* WRITEs */
ATAPI_READ_CD = 2, /* READ CD [MSF] */ ATAPI_READ_CD = 2, /* READ CD [MSF] */
ATAPI_MISC = 3, /* the rest */ ATAPI_PASS_THRU = 3, /* SAT pass-thru */
ATAPI_MISC = 4, /* the rest */
}; };
enum ata_xfer_mask { enum ata_xfer_mask {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment