aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2006-01-19 11:39:33 -0500
committerAnton Altaparmakov <aia21@cantab.net>2006-01-19 11:39:33 -0500
commit944d79559d154c12becde0dab327016cf438f46c (patch)
tree50c101806f4d3b6585222dda060559eb4f3e005a /include/linux/libata.h
parentd087e4bdd24ebe3ae3d0b265b6573ec901af4b4b (diff)
parent0f36b018b2e314d45af86449f1a97facb1fbe300 (diff)
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h35
1 files changed, 25 insertions, 10 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 41ea7dbc1755..9e5db2949c58 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -124,18 +124,25 @@ enum {
124 ATA_FLAG_DEBUGMSG = (1 << 10), 124 ATA_FLAG_DEBUGMSG = (1 << 10),
125 ATA_FLAG_NO_ATAPI = (1 << 11), /* No ATAPI support */ 125 ATA_FLAG_NO_ATAPI = (1 << 11), /* No ATAPI support */
126 126
127 ATA_FLAG_SUSPENDED = (1 << 12), /* port is suspended */
128
129 ATA_FLAG_PIO_LBA48 = (1 << 13), /* Host DMA engine is LBA28 only */
130 ATA_FLAG_IRQ_MASK = (1 << 14), /* Mask IRQ in PIO xfers */
131
127 ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */ 132 ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */
128 ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */ 133 ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */
129 ATA_QCFLAG_SINGLE = (1 << 4), /* no s/g, just a single buffer */ 134 ATA_QCFLAG_SINGLE = (1 << 4), /* no s/g, just a single buffer */
130 ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE, 135 ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE,
131 136
132 /* various lengths of time */ 137 /* various lengths of time */
133 ATA_TMOUT_EDD = 5 * HZ, /* hueristic */ 138 ATA_TMOUT_EDD = 5 * HZ, /* heuristic */
134 ATA_TMOUT_PIO = 30 * HZ, 139 ATA_TMOUT_PIO = 30 * HZ,
135 ATA_TMOUT_BOOT = 30 * HZ, /* hueristic */ 140 ATA_TMOUT_BOOT = 30 * HZ, /* heuristic */
136 ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* hueristic */ 141 ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* heuristic */
137 ATA_TMOUT_CDB = 30 * HZ, 142 ATA_TMOUT_CDB = 30 * HZ,
138 ATA_TMOUT_CDB_QUICK = 5 * HZ, 143 ATA_TMOUT_CDB_QUICK = 5 * HZ,
144 ATA_TMOUT_INTERNAL = 30 * HZ,
145 ATA_TMOUT_INTERNAL_QUICK = 5 * HZ,
139 146
140 /* ATA bus states */ 147 /* ATA bus states */
141 BUS_UNKNOWN = 0, 148 BUS_UNKNOWN = 0,
@@ -195,7 +202,7 @@ struct ata_port;
195struct ata_queued_cmd; 202struct ata_queued_cmd;
196 203
197/* typedefs */ 204/* typedefs */
198typedef int (*ata_qc_cb_t) (struct ata_queued_cmd *qc, unsigned int err_mask); 205typedef int (*ata_qc_cb_t) (struct ata_queued_cmd *qc);
199 206
200struct ata_ioports { 207struct ata_ioports {
201 unsigned long cmd_addr; 208 unsigned long cmd_addr;
@@ -280,9 +287,9 @@ struct ata_queued_cmd {
280 /* DO NOT iterate over __sg manually, use ata_for_each_sg() */ 287 /* DO NOT iterate over __sg manually, use ata_for_each_sg() */
281 struct scatterlist *__sg; 288 struct scatterlist *__sg;
282 289
283 ata_qc_cb_t complete_fn; 290 unsigned int err_mask;
284 291
285 struct completion *waiting; 292 ata_qc_cb_t complete_fn;
286 293
287 void *private_data; 294 void *private_data;
288}; 295};
@@ -331,8 +338,6 @@ struct ata_port {
331 338
332 u8 ctl; /* cache of ATA control register */ 339 u8 ctl; /* cache of ATA control register */
333 u8 last_ctl; /* Cache last written value */ 340 u8 last_ctl; /* Cache last written value */
334 unsigned int bus_state;
335 unsigned int port_state;
336 unsigned int pio_mask; 341 unsigned int pio_mask;
337 unsigned int mwdma_mask; 342 unsigned int mwdma_mask;
338 unsigned int udma_mask; 343 unsigned int udma_mask;
@@ -436,6 +441,8 @@ extern void ata_std_ports(struct ata_ioports *ioaddr);
436extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, 441extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,
437 unsigned int n_ports); 442 unsigned int n_ports);
438extern void ata_pci_remove_one (struct pci_dev *pdev); 443extern void ata_pci_remove_one (struct pci_dev *pdev);
444extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state);
445extern int ata_pci_device_resume(struct pci_dev *pdev);
439#endif /* CONFIG_PCI */ 446#endif /* CONFIG_PCI */
440extern int ata_device_add(const struct ata_probe_ent *ent); 447extern int ata_device_add(const struct ata_probe_ent *ent);
441extern void ata_host_set_remove(struct ata_host_set *host_set); 448extern void ata_host_set_remove(struct ata_host_set *host_set);
@@ -445,6 +452,10 @@ extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmn
445extern int ata_scsi_error(struct Scsi_Host *host); 452extern int ata_scsi_error(struct Scsi_Host *host);
446extern int ata_scsi_release(struct Scsi_Host *host); 453extern int ata_scsi_release(struct Scsi_Host *host);
447extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); 454extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc);
455extern int ata_scsi_device_resume(struct scsi_device *);
456extern int ata_scsi_device_suspend(struct scsi_device *);
457extern int ata_device_resume(struct ata_port *, struct ata_device *);
458extern int ata_device_suspend(struct ata_port *, struct ata_device *);
448extern int ata_ratelimit(void); 459extern int ata_ratelimit(void);
449 460
450/* 461/*
@@ -478,9 +489,10 @@ extern void ata_bmdma_start (struct ata_queued_cmd *qc);
478extern void ata_bmdma_stop(struct ata_queued_cmd *qc); 489extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
479extern u8 ata_bmdma_status(struct ata_port *ap); 490extern u8 ata_bmdma_status(struct ata_port *ap);
480extern void ata_bmdma_irq_clear(struct ata_port *ap); 491extern void ata_bmdma_irq_clear(struct ata_port *ap);
481extern void ata_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask); 492extern void ata_qc_complete(struct ata_queued_cmd *qc);
482extern void ata_eng_timeout(struct ata_port *ap); 493extern void ata_eng_timeout(struct ata_port *ap);
483extern void ata_scsi_simulate(u16 *id, struct scsi_cmnd *cmd, 494extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev,
495 struct scsi_cmnd *cmd,
484 void (*done)(struct scsi_cmnd *)); 496 void (*done)(struct scsi_cmnd *));
485extern int ata_std_bios_param(struct scsi_device *sdev, 497extern int ata_std_bios_param(struct scsi_device *sdev,
486 struct block_device *bdev, 498 struct block_device *bdev,
@@ -490,6 +502,8 @@ extern int ata_scsi_slave_config(struct scsi_device *sdev);
490/* 502/*
491 * Timing helpers 503 * Timing helpers
492 */ 504 */
505
506extern unsigned int ata_pio_need_iordy(const struct ata_device *);
493extern int ata_timing_compute(struct ata_device *, unsigned short, 507extern int ata_timing_compute(struct ata_device *, unsigned short,
494 struct ata_timing *, int, int); 508 struct ata_timing *, int, int);
495extern void ata_timing_merge(const struct ata_timing *, 509extern void ata_timing_merge(const struct ata_timing *,
@@ -670,6 +684,7 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
670 qc->cursect = qc->cursg = qc->cursg_ofs = 0; 684 qc->cursect = qc->cursg = qc->cursg_ofs = 0;
671 qc->nsect = 0; 685 qc->nsect = 0;
672 qc->nbytes = qc->curbytes = 0; 686 qc->nbytes = qc->curbytes = 0;
687 qc->err_mask = 0;
673 688
674 ata_tf_init(qc->ap, &qc->tf, qc->dev->devno); 689 ata_tf_init(qc->ap, &qc->tf, qc->dev->devno);
675} 690}