summaryrefslogtreecommitdiff
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2004-08-13 23:26:46 -0400
committerJeff Garzik <jgarzik@pobox.com>2004-08-13 23:26:46 -0400
commite4babc07a978f0384da961fc1fea72b518614dba (patch)
treec7867827bbe44c3faf8523b8acef6190ad7d991c /include/linux/libata.h
parent4d8021616effa7a49b6df2ad0083dcce6016a3a7 (diff)
parent27189ec186a3b27accc64ff864c5fa08c148aa7f (diff)
Merge pobox.com:/spare/repo/linux-2.6
into pobox.com:/spare/repo/libata-2.6
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index b646a48345a0..8443cce6971f 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -32,7 +32,6 @@
/*
* compile-time options
*/
-#undef ATA_FORCE_PIO /* do not configure or use DMA */
#undef ATA_DEBUG /* debugging output */
#undef ATA_VERBOSE_DEBUG /* yet more debugging output */
#undef ATA_IRQ_TRAP /* define to ack screaming irqs */
@@ -88,10 +87,7 @@ enum {
/* struct ata_device stuff */
ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */
ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */
- ATA_DFLAG_MASTER = (1 << 2), /* is device 0? */
- ATA_DFLAG_WCACHE = (1 << 3), /* has write cache we can
- * (hopefully) flush? */
- ATA_DFLAG_LOCK_SECTORS = (1 << 4), /* don't adjust max_sectors */
+ ATA_DFLAG_LOCK_SECTORS = (1 << 2), /* don't adjust max_sectors */
ATA_DEV_UNKNOWN = 0, /* unknown device */
ATA_DEV_ATA = 1, /* ATA device */
@@ -111,7 +107,6 @@ enum {
ATA_FLAG_SATA_RESET = (1 << 7), /* use COMRESET */
ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */
- ATA_QCFLAG_DMA = (1 << 2), /* data delivered via DMA */
ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */
ATA_QCFLAG_SINGLE = (1 << 4), /* no s/g, just a single buffer */
ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE,
@@ -140,6 +135,13 @@ enum {
PORT_UNKNOWN = 0,
PORT_ENABLED = 1,
PORT_DISABLED = 2,
+
+ /* encoding various smaller bitmaps into a single
+ * unsigned long bitmap
+ */
+ ATA_SHIFT_UDMA = 0,
+ ATA_SHIFT_MWDMA = 8,
+ ATA_SHIFT_PIO = 11,
};
enum pio_task_states {
@@ -188,6 +190,7 @@ struct ata_probe_ent {
struct ata_ioports port[ATA_MAX_PORTS];
unsigned int n_ports;
unsigned int pio_mask;
+ unsigned int mwdma_mask;
unsigned int udma_mask;
unsigned int legacy_mode;
unsigned long irq;
@@ -215,6 +218,9 @@ struct ata_queued_cmd {
struct scsi_cmnd *scsicmd;
void (*scsidone)(struct scsi_cmnd *);
+ struct ata_taskfile tf;
+ u8 cdb[ATAPI_CDB_LEN];
+
unsigned long flags; /* ATA_QCFLAG_xxx */
unsigned int tag;
unsigned int n_elem;
@@ -226,7 +232,6 @@ struct ata_queued_cmd {
unsigned int cursg;
unsigned int cursg_ofs;
- struct ata_taskfile tf;
struct scatterlist sgent;
void *buf_virt;
@@ -251,8 +256,10 @@ struct ata_device {
unsigned int class; /* ATA_DEV_xxx */
unsigned int devno; /* 0 or 1 */
u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */
- unsigned int pio_mode;
- unsigned int udma_mode;
+ u8 pio_mode;
+ u8 dma_mode;
+ u8 xfer_mode;
+ unsigned int xfer_shift; /* ATA_SHIFT_xxx */
/* cache info about current transfer mode */
u8 xfer_protocol; /* taskfile xfer protocol */
@@ -277,8 +284,10 @@ struct ata_port {
unsigned int bus_state;
unsigned int port_state;
unsigned int pio_mask;
+ unsigned int mwdma_mask;
unsigned int udma_mask;
unsigned int cbl; /* cable type; ATA_CBL_xxx */
+ unsigned int cdb_len;
struct ata_device device[ATA_MAX_DEVICES];
@@ -303,10 +312,8 @@ struct ata_port_operations {
void (*dev_config) (struct ata_port *, struct ata_device *);
- void (*set_piomode) (struct ata_port *, struct ata_device *,
- unsigned int);
- void (*set_udmamode) (struct ata_port *, struct ata_device *,
- unsigned int);
+ void (*set_piomode) (struct ata_port *, struct ata_device *);
+ void (*set_dmamode) (struct ata_port *, struct ata_device *);
void (*tf_load) (struct ata_port *ap, struct ata_taskfile *tf);
void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
@@ -342,6 +349,7 @@ struct ata_port_info {
Scsi_Host_Template *sht;
unsigned long host_flags;
unsigned long pio_mask;
+ unsigned long mwdma_mask;
unsigned long udma_mask;
struct ata_port_operations *port_ops;
};
@@ -472,7 +480,6 @@ static inline u8 ata_wait_idle(struct ata_port *ap)
static inline void ata_qc_set_polling(struct ata_queued_cmd *qc)
{
- qc->flags &= ~ATA_QCFLAG_DMA;
qc->tf.ctl |= ATA_NIEN;
}