Merge branch 'master'
[powerpc.git] / include / linux / libata.h
index 00a8a57..d1b2166 100644 (file)
@@ -98,6 +98,7 @@ enum {
        ATA_DFLAG_PIO           = (1 << 1), /* device currently in PIO mode */
        ATA_DFLAG_LOCK_SECTORS  = (1 << 2), /* don't adjust max_sectors */
        ATA_DFLAG_LBA           = (1 << 3), /* device supports LBA */
+       ATA_DFLAG_CDB_INTR      = (1 << 4), /* device asserts INTRQ when ready for CDB */
 
        ATA_DEV_UNKNOWN         = 0,    /* unknown device */
        ATA_DEV_ATA             = 1,    /* ATA device */
@@ -116,8 +117,8 @@ enum {
        ATA_FLAG_MMIO           = (1 << 6), /* use MMIO, not PIO */
        ATA_FLAG_SATA_RESET     = (1 << 7), /* use COMRESET */
        ATA_FLAG_PIO_DMA        = (1 << 8), /* PIO cmds via DMA */
-       ATA_FLAG_NOINTR         = (1 << 9), /* FIXME: Remove this once
-                                            * proper HSM is in place. */
+       ATA_FLAG_PIO_POLLING    = (1 << 9), /* use polling PIO if LLD
+                                            * doesn't handle PIO interrupts */
 
        ATA_QCFLAG_ACTIVE       = (1 << 1), /* cmd not yet ack'd to scsi lyer */
        ATA_QCFLAG_SG           = (1 << 3), /* have s/g table? */
@@ -129,8 +130,8 @@ enum {
        ATA_TMOUT_PIO           = 30 * HZ,
        ATA_TMOUT_BOOT          = 30 * HZ,      /* hueristic */
        ATA_TMOUT_BOOT_QUICK    = 7 * HZ,       /* hueristic */
-       ATA_TMOUT_CDB           = 30 * HZ,
-       ATA_TMOUT_CDB_QUICK     = 5 * HZ,
+       ATA_TMOUT_DATAOUT       = 30 * HZ,
+       ATA_TMOUT_DATAOUT_QUICK = 5 * HZ,
 
        /* ATA bus states */
        BUS_UNKNOWN             = 0,
@@ -162,14 +163,16 @@ enum {
 };
 
 enum hsm_task_states {
-       HSM_ST_UNKNOWN,
-       HSM_ST_IDLE,
-       HSM_ST_POLL,
-       HSM_ST_TMOUT,
-       HSM_ST,
-       HSM_ST_LAST,
-       HSM_ST_LAST_POLL,
-       HSM_ST_ERR,
+       HSM_ST_UNKNOWN,         /* state unknown */
+       HSM_ST_IDLE,            /* no command on going */
+       HSM_ST_POLL,            /* same as HSM_ST, waits longer */
+       HSM_ST_TMOUT,           /* timeout */
+       HSM_ST,                 /* (waiting the device to) transfer data */
+       HSM_ST_LAST,            /* (waiting the device to) complete command */
+       HSM_ST_LAST_POLL,       /* same as HSM_ST_LAST, waits longer */
+       HSM_ST_ERR,             /* error */
+       HSM_ST_FIRST,           /* (waiting the device to)
+                                  write CDB or first data block */
 };
 
 /* forward declarations */
@@ -324,7 +327,7 @@ struct ata_port {
        struct ata_host_stats   stats;
        struct ata_host_set     *host_set;
 
-       struct work_struct      packet_task;
+       struct work_struct      dataout_task;
 
        struct work_struct      pio_task;
        unsigned int            hsm_task_state;