]> Pileus Git - ~andy/linux/blobdiff - include/linux/ata.h
Input: add driver for USB VoIP phones with CM109 chipset
[~andy/linux] / include / linux / ata.h
index c17e9404c88d662a6b1336d75cd93071f451cd7f..1c622e2b0504749e7fdc59b7406a12a1819f6651 100644 (file)
@@ -341,9 +341,9 @@ enum ata_tf_protocols {
        ATA_PROT_PIO,           /* PIO data xfer */
        ATA_PROT_DMA,           /* DMA */
        ATA_PROT_NCQ,           /* NCQ */
-       ATA_PROT_ATAPI,         /* packet command, PIO data xfer*/
-       ATA_PROT_ATAPI_NODATA,  /* packet command, no data */
-       ATA_PROT_ATAPI_DMA,     /* packet command with special DMA sauce */
+       ATAPI_PROT_NODATA,      /* packet command, no data */
+       ATAPI_PROT_PIO,         /* packet command, PIO data xfer*/
+       ATAPI_PROT_DMA,         /* packet command with special DMA sauce */
 };
 
 enum ata_ioctls {
@@ -354,8 +354,8 @@ enum ata_ioctls {
 /* core structures */
 
 struct ata_prd {
-       u32                     addr;
-       u32                     flags_len;
+       __le32                  addr;
+       __le32                  flags_len;
 };
 
 struct ata_taskfile {
@@ -395,11 +395,11 @@ static inline unsigned int ata_prot_flags(u8 prot)
                return ATA_PROT_FLAG_DMA;
        case ATA_PROT_NCQ:
                return ATA_PROT_FLAG_DMA | ATA_PROT_FLAG_NCQ;
-       case ATA_PROT_ATAPI_NODATA:
+       case ATAPI_PROT_NODATA:
                return ATA_PROT_FLAG_ATAPI;
-       case ATA_PROT_ATAPI:
+       case ATAPI_PROT_PIO:
                return ATA_PROT_FLAG_ATAPI | ATA_PROT_FLAG_PIO;
-       case ATA_PROT_ATAPI_DMA:
+       case ATAPI_PROT_DMA:
                return ATA_PROT_FLAG_ATAPI | ATA_PROT_FLAG_DMA;
        }
        return 0;
@@ -659,6 +659,11 @@ static inline int atapi_command_packet_set(const u16 *dev_id)
        return (dev_id[0] >> 8) & 0x1f;
 }
 
+static inline int atapi_id_dmadir(const u16 *dev_id)
+{
+       return ata_id_major_version(dev_id) >= 7 && (dev_id[62] & 0x8000);
+}
+
 static inline int is_multi_taskfile(struct ata_taskfile *tf)
 {
        return (tf->command == ATA_CMD_READ_MULTI) ||