aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-09 11:16:14 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-09 11:16:14 -0400
commitc4052da6f0c01a0b059d125d72bb934d0980b798 (patch)
treead50a17e4d14b8f6f1773158d956d424575d1712 /include/linux/libata.h
parentcedc9a478d8c6265879dc3839ef3d4849a709184 (diff)
parent3d3467f0fdf61a421361c00cf84fcf0f1a6dc1e8 (diff)
Merge branch 'upstream'
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h34
1 files changed, 23 insertions, 11 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 3ab67622ef93..0f89f4121fa3 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -97,6 +97,7 @@ enum {
97 ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */ 97 ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */
98 ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */ 98 ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */
99 ATA_DFLAG_LOCK_SECTORS = (1 << 2), /* don't adjust max_sectors */ 99 ATA_DFLAG_LOCK_SECTORS = (1 << 2), /* don't adjust max_sectors */
100 ATA_DFLAG_LBA = (1 << 3), /* device supports LBA */
100 101
101 ATA_DEV_UNKNOWN = 0, /* unknown device */ 102 ATA_DEV_UNKNOWN = 0, /* unknown device */
102 ATA_DEV_ATA = 1, /* ATA device */ 103 ATA_DEV_ATA = 1, /* ATA device */
@@ -158,17 +159,21 @@ enum {
158 /* size of buffer to pad xfers ending on unaligned boundaries */ 159 /* size of buffer to pad xfers ending on unaligned boundaries */
159 ATA_DMA_PAD_SZ = 4, 160 ATA_DMA_PAD_SZ = 4,
160 ATA_DMA_PAD_BUF_SZ = ATA_DMA_PAD_SZ * ATA_MAX_QUEUE, 161 ATA_DMA_PAD_BUF_SZ = ATA_DMA_PAD_SZ * ATA_MAX_QUEUE,
162
163 /* Masks for port functions */
164 ATA_PORT_PRIMARY = (1 << 0),
165 ATA_PORT_SECONDARY = (1 << 1),
161}; 166};
162 167
163enum pio_task_states { 168enum hsm_task_states {
164 PIO_ST_UNKNOWN, 169 HSM_ST_UNKNOWN,
165 PIO_ST_IDLE, 170 HSM_ST_IDLE,
166 PIO_ST_POLL, 171 HSM_ST_POLL,
167 PIO_ST_TMOUT, 172 HSM_ST_TMOUT,
168 PIO_ST, 173 HSM_ST,
169 PIO_ST_LAST, 174 HSM_ST_LAST,
170 PIO_ST_LAST_POLL, 175 HSM_ST_LAST_POLL,
171 PIO_ST_ERR, 176 HSM_ST_ERR,
172}; 177};
173 178
174/* forward declarations */ 179/* forward declarations */
@@ -291,6 +296,11 @@ struct ata_device {
291 u8 xfer_protocol; /* taskfile xfer protocol */ 296 u8 xfer_protocol; /* taskfile xfer protocol */
292 u8 read_cmd; /* opcode to use on read */ 297 u8 read_cmd; /* opcode to use on read */
293 u8 write_cmd; /* opcode to use on write */ 298 u8 write_cmd; /* opcode to use on write */
299
300 /* for CHS addressing */
301 u16 cylinders; /* Number of cylinders */
302 u16 heads; /* Number of heads */
303 u16 sectors; /* Number of sectors per track */
294}; 304};
295 305
296struct ata_port { 306struct ata_port {
@@ -331,7 +341,7 @@ struct ata_port {
331 struct work_struct packet_task; 341 struct work_struct packet_task;
332 342
333 struct work_struct pio_task; 343 struct work_struct pio_task;
334 unsigned int pio_task_state; 344 unsigned int hsm_task_state;
335 unsigned long pio_task_timeout; 345 unsigned long pio_task_timeout;
336 346
337 void *private_data; 347 void *private_data;
@@ -412,6 +422,8 @@ extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmn
412extern int ata_scsi_error(struct Scsi_Host *host); 422extern int ata_scsi_error(struct Scsi_Host *host);
413extern int ata_scsi_release(struct Scsi_Host *host); 423extern int ata_scsi_release(struct Scsi_Host *host);
414extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); 424extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc);
425extern int ata_ratelimit(void);
426
415/* 427/*
416 * Default driver ops implementations 428 * Default driver ops implementations
417 */ 429 */
@@ -464,7 +476,7 @@ struct pci_bits {
464 476
465extern void ata_pci_host_stop (struct ata_host_set *host_set); 477extern void ata_pci_host_stop (struct ata_host_set *host_set);
466extern struct ata_probe_ent * 478extern struct ata_probe_ent *
467ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port); 479ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask);
468extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits); 480extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits);
469 481
470#endif /* CONFIG_PCI */ 482#endif /* CONFIG_PCI */