]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
libata: ATA_12/16 doesn't fall into ATAPI_MISC
authorTejun Heo <htejun@gmail.com>
Wed, 2 Apr 2008 08:35:19 +0000 (17:35 +0900)
committerJeff Garzik <jeff@garzik.org>
Fri, 4 Apr 2008 06:43:36 +0000 (02:43 -0400)
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: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c
include/linux/libata.h

index e9b69ba489d28930a3f5ee3d80fe99ca4283ca17..be95fdb6972680dd9ea12193599ae25827f28b2c 100644 (file)
@@ -353,6 +353,11 @@ int atapi_cmd_type(u8 opcode)
        case GPCMD_READ_CD_MSF:
                return ATAPI_READ_CD;
 
+       case ATA_16:
+       case ATA_12:
+               if (atapi_passthru16)
+                       return ATAPI_PASS_THRU;
+               /* fall thru */
        default:
                return ATAPI_MISC;
        }
index 92c64909ed251636b1bf60c129c57190e4d36a30..37ee881c42ac0a1ccefde3cbbe06cf39e8f52cec 100644 (file)
@@ -350,7 +350,8 @@ enum {
        ATAPI_READ              = 0,            /* READs */
        ATAPI_WRITE             = 1,            /* WRITEs */
        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 {