aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-04-02 05:51:52 -0400
committerJeff Garzik <jeff@garzik.org>2006-04-02 10:09:19 -0400
commit949b38af40a0b88b7267908b1554a45b97b5b737 (patch)
treecff0a143d71c8e03bf8aceefdfec8f735bc33416 /include/linux/libata.h
parentc43c555c3a6db7f0b55fd9b66d7ecff16e827d4e (diff)
[PATCH] libata: clean up constants
* Reorder ATA_DFLAG_* such that feature flags determined by ata_dev_configure() are on lower bits. Reserve lower eight bits for this purpose and allocate dynamic flags from bit 8. * Reorder ATA_FLAG_* such that feature flags determined during driver initiailization are on bits 0:15, dynamic flags on 16:23 and LLDD specific flags on 24:31. * Kill trailing white space and lower-case an one line comment for consistency. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h61
1 files changed, 32 insertions, 29 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index e20b0bfbd5f2..b7488a31e320 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -120,9 +120,10 @@ enum {
120 ATA_SHT_USE_CLUSTERING = 1, 120 ATA_SHT_USE_CLUSTERING = 1,
121 121
122 /* struct ata_device stuff */ 122 /* struct ata_device stuff */
123 ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */ 123 ATA_DFLAG_LBA = (1 << 0), /* device supports LBA */
124 ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */ 124 ATA_DFLAG_LBA48 = (1 << 1), /* device supports LBA48 */
125 ATA_DFLAG_LBA = (1 << 2), /* device supports LBA */ 125
126 ATA_DFLAG_PIO = (1 << 8), /* device currently in PIO mode */
126 127
127 ATA_DEV_UNKNOWN = 0, /* unknown device */ 128 ATA_DEV_UNKNOWN = 0, /* unknown device */
128 ATA_DEV_ATA = 1, /* ATA device */ 129 ATA_DEV_ATA = 1, /* ATA device */
@@ -132,32 +133,34 @@ enum {
132 ATA_DEV_NONE = 5, /* no device */ 133 ATA_DEV_NONE = 5, /* no device */
133 134
134 /* struct ata_port flags */ 135 /* struct ata_port flags */
135 ATA_FLAG_SLAVE_POSS = (1 << 1), /* host supports slave dev */ 136 ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */
136 /* (doesn't imply presence) */ 137 /* (doesn't imply presence) */
137 ATA_FLAG_PORT_DISABLED = (1 << 2), /* port is disabled, ignore it */ 138 ATA_FLAG_SATA = (1 << 1),
138 ATA_FLAG_SATA = (1 << 3), 139 ATA_FLAG_NO_LEGACY = (1 << 2), /* no legacy mode check */
139 ATA_FLAG_NO_LEGACY = (1 << 4), /* no legacy mode check */ 140 ATA_FLAG_MMIO = (1 << 3), /* use MMIO, not PIO */
140 ATA_FLAG_SRST = (1 << 5), /* (obsolete) use ATA SRST, not E.D.D. */ 141 ATA_FLAG_SRST = (1 << 4), /* (obsolete) use ATA SRST, not E.D.D. */
141 ATA_FLAG_MMIO = (1 << 6), /* use MMIO, not PIO */ 142 ATA_FLAG_SATA_RESET = (1 << 5), /* (obsolete) use COMRESET */
142 ATA_FLAG_SATA_RESET = (1 << 7), /* (obsolete) use COMRESET */ 143 ATA_FLAG_NO_ATAPI = (1 << 6), /* No ATAPI support */
143 ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */ 144 ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */
144 ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once 145 ATA_FLAG_PIO_LBA48 = (1 << 8), /* Host DMA engine is LBA28 only */
145 * proper HSM is in place. */ 146 ATA_FLAG_IRQ_MASK = (1 << 9), /* Mask IRQ in PIO xfers */
146 ATA_FLAG_DEBUGMSG = (1 << 10), 147
147 ATA_FLAG_NO_ATAPI = (1 << 11), /* No ATAPI support */ 148 ATA_FLAG_NOINTR = (1 << 16), /* FIXME: Remove this once
148 149 * proper HSM is in place. */
149 ATA_FLAG_SUSPENDED = (1 << 12), /* port is suspended */ 150 ATA_FLAG_DEBUGMSG = (1 << 17),
150 151 ATA_FLAG_FLUSH_PORT_TASK = (1 << 18), /* flush port task */
151 ATA_FLAG_PIO_LBA48 = (1 << 13), /* Host DMA engine is LBA28 only */ 152
152 ATA_FLAG_IRQ_MASK = (1 << 14), /* Mask IRQ in PIO xfers */ 153 ATA_FLAG_PORT_DISABLED = (1 << 19), /* port is disabled, ignore it */
153 154 ATA_FLAG_SUSPENDED = (1 << 20), /* port is suspended */
154 ATA_FLAG_FLUSH_PORT_TASK = (1 << 15), /* Flush port task */ 155
155 156 /* bits 24:31 of ap->flags are reserved for LLDD specific flags */
156 ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */ 157
157 ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */ 158 /* struct ata_queued_cmd flags */
158 ATA_QCFLAG_SINGLE = (1 << 4), /* no s/g, just a single buffer */ 159 ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */
160 ATA_QCFLAG_SG = (1 << 1), /* have s/g table? */
161 ATA_QCFLAG_SINGLE = (1 << 2), /* no s/g, just a single buffer */
159 ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE, 162 ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE,
160 ATA_QCFLAG_EH_SCHEDULED = (1 << 5), /* EH scheduled */ 163 ATA_QCFLAG_EH_SCHEDULED = (1 << 3), /* EH scheduled */
161 164
162 /* host set flags */ 165 /* host set flags */
163 ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host_set only */ 166 ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host_set only */
@@ -206,8 +209,8 @@ enum {
206 /* size of buffer to pad xfers ending on unaligned boundaries */ 209 /* size of buffer to pad xfers ending on unaligned boundaries */
207 ATA_DMA_PAD_SZ = 4, 210 ATA_DMA_PAD_SZ = 4,
208 ATA_DMA_PAD_BUF_SZ = ATA_DMA_PAD_SZ * ATA_MAX_QUEUE, 211 ATA_DMA_PAD_BUF_SZ = ATA_DMA_PAD_SZ * ATA_MAX_QUEUE,
209 212
210 /* Masks for port functions */ 213 /* masks for port functions */
211 ATA_PORT_PRIMARY = (1 << 0), 214 ATA_PORT_PRIMARY = (1 << 0),
212 ATA_PORT_SECONDARY = (1 << 1), 215 ATA_PORT_SECONDARY = (1 << 1),
213 216