diff options
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 41ea7dbc1755..a43c95f8f968 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -124,6 +124,8 @@ 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 | |||
127 | ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */ | 129 | ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */ |
128 | ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */ | 130 | ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */ |
129 | ATA_QCFLAG_SINGLE = (1 << 4), /* no s/g, just a single buffer */ | 131 | ATA_QCFLAG_SINGLE = (1 << 4), /* no s/g, just a single buffer */ |
@@ -136,6 +138,8 @@ enum { | |||
136 | ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* hueristic */ | 138 | ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* hueristic */ |
137 | ATA_TMOUT_CDB = 30 * HZ, | 139 | ATA_TMOUT_CDB = 30 * HZ, |
138 | ATA_TMOUT_CDB_QUICK = 5 * HZ, | 140 | ATA_TMOUT_CDB_QUICK = 5 * HZ, |
141 | ATA_TMOUT_INTERNAL = 30 * HZ, | ||
142 | ATA_TMOUT_INTERNAL_QUICK = 5 * HZ, | ||
139 | 143 | ||
140 | /* ATA bus states */ | 144 | /* ATA bus states */ |
141 | BUS_UNKNOWN = 0, | 145 | BUS_UNKNOWN = 0, |
@@ -195,7 +199,7 @@ struct ata_port; | |||
195 | struct ata_queued_cmd; | 199 | struct ata_queued_cmd; |
196 | 200 | ||
197 | /* typedefs */ | 201 | /* typedefs */ |
198 | typedef int (*ata_qc_cb_t) (struct ata_queued_cmd *qc, unsigned int err_mask); | 202 | typedef int (*ata_qc_cb_t) (struct ata_queued_cmd *qc); |
199 | 203 | ||
200 | struct ata_ioports { | 204 | struct ata_ioports { |
201 | unsigned long cmd_addr; | 205 | unsigned long cmd_addr; |
@@ -280,9 +284,9 @@ struct ata_queued_cmd { | |||
280 | /* DO NOT iterate over __sg manually, use ata_for_each_sg() */ | 284 | /* DO NOT iterate over __sg manually, use ata_for_each_sg() */ |
281 | struct scatterlist *__sg; | 285 | struct scatterlist *__sg; |
282 | 286 | ||
283 | ata_qc_cb_t complete_fn; | 287 | unsigned int err_mask; |
284 | 288 | ||
285 | struct completion *waiting; | 289 | ata_qc_cb_t complete_fn; |
286 | 290 | ||
287 | void *private_data; | 291 | void *private_data; |
288 | }; | 292 | }; |
@@ -331,8 +335,6 @@ struct ata_port { | |||
331 | 335 | ||
332 | u8 ctl; /* cache of ATA control register */ | 336 | u8 ctl; /* cache of ATA control register */ |
333 | u8 last_ctl; /* Cache last written value */ | 337 | u8 last_ctl; /* Cache last written value */ |
334 | unsigned int bus_state; | ||
335 | unsigned int port_state; | ||
336 | unsigned int pio_mask; | 338 | unsigned int pio_mask; |
337 | unsigned int mwdma_mask; | 339 | unsigned int mwdma_mask; |
338 | unsigned int udma_mask; | 340 | unsigned int udma_mask; |
@@ -436,6 +438,8 @@ extern void ata_std_ports(struct ata_ioports *ioaddr); | |||
436 | extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | 438 | extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, |
437 | unsigned int n_ports); | 439 | unsigned int n_ports); |
438 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 440 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
441 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state); | ||
442 | extern int ata_pci_device_resume(struct pci_dev *pdev); | ||
439 | #endif /* CONFIG_PCI */ | 443 | #endif /* CONFIG_PCI */ |
440 | extern int ata_device_add(const struct ata_probe_ent *ent); | 444 | extern int ata_device_add(const struct ata_probe_ent *ent); |
441 | extern void ata_host_set_remove(struct ata_host_set *host_set); | 445 | extern void ata_host_set_remove(struct ata_host_set *host_set); |
@@ -445,6 +449,10 @@ extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmn | |||
445 | extern int ata_scsi_error(struct Scsi_Host *host); | 449 | extern int ata_scsi_error(struct Scsi_Host *host); |
446 | extern int ata_scsi_release(struct Scsi_Host *host); | 450 | extern int ata_scsi_release(struct Scsi_Host *host); |
447 | extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); | 451 | extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); |
452 | extern int ata_scsi_device_resume(struct scsi_device *); | ||
453 | extern int ata_scsi_device_suspend(struct scsi_device *); | ||
454 | extern int ata_device_resume(struct ata_port *, struct ata_device *); | ||
455 | extern int ata_device_suspend(struct ata_port *, struct ata_device *); | ||
448 | extern int ata_ratelimit(void); | 456 | extern int ata_ratelimit(void); |
449 | 457 | ||
450 | /* | 458 | /* |
@@ -478,9 +486,10 @@ extern void ata_bmdma_start (struct ata_queued_cmd *qc); | |||
478 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 486 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |
479 | extern u8 ata_bmdma_status(struct ata_port *ap); | 487 | extern u8 ata_bmdma_status(struct ata_port *ap); |
480 | extern void ata_bmdma_irq_clear(struct ata_port *ap); | 488 | extern void ata_bmdma_irq_clear(struct ata_port *ap); |
481 | extern void ata_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask); | 489 | extern void ata_qc_complete(struct ata_queued_cmd *qc); |
482 | extern void ata_eng_timeout(struct ata_port *ap); | 490 | extern void ata_eng_timeout(struct ata_port *ap); |
483 | extern void ata_scsi_simulate(u16 *id, struct scsi_cmnd *cmd, | 491 | extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, |
492 | struct scsi_cmnd *cmd, | ||
484 | void (*done)(struct scsi_cmnd *)); | 493 | void (*done)(struct scsi_cmnd *)); |
485 | extern int ata_std_bios_param(struct scsi_device *sdev, | 494 | extern int ata_std_bios_param(struct scsi_device *sdev, |
486 | struct block_device *bdev, | 495 | struct block_device *bdev, |
@@ -670,6 +679,7 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc) | |||
670 | qc->cursect = qc->cursg = qc->cursg_ofs = 0; | 679 | qc->cursect = qc->cursg = qc->cursg_ofs = 0; |
671 | qc->nsect = 0; | 680 | qc->nsect = 0; |
672 | qc->nbytes = qc->curbytes = 0; | 681 | qc->nbytes = qc->curbytes = 0; |
682 | qc->err_mask = 0; | ||
673 | 683 | ||
674 | ata_tf_init(qc->ap, &qc->tf, qc->dev->devno); | 684 | ata_tf_init(qc->ap, &qc->tf, qc->dev->devno); |
675 | } | 685 | } |