aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2005-12-05 02:38:02 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-06 04:49:22 -0500
commita22e2eb0710798009b8e696ae911aef745089dd6 (patch)
tree93421443499249db0301868e07f24156c456cf7a /include/linux/libata.h
parentc14b8331ec4843e4f2b67a4d847a0d812a50e43c (diff)
[PATCH] libata: move err_mask to ata_queued_cmd
- remove err_mask from the parameter list of the complete functions - move err_mask to ata_queued_cmd - initialize qc->err_mask when needed - for each function call to ata_qc_complete(), replace the err_mask parameter with qc->err_mask. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> =============== Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 83a83babff84..e18ce039cdfd 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -194,7 +194,7 @@ struct ata_port;
194struct ata_queued_cmd; 194struct ata_queued_cmd;
195 195
196/* typedefs */ 196/* typedefs */
197typedef int (*ata_qc_cb_t) (struct ata_queued_cmd *qc, unsigned int err_mask); 197typedef int (*ata_qc_cb_t) (struct ata_queued_cmd *qc);
198 198
199struct ata_ioports { 199struct ata_ioports {
200 unsigned long cmd_addr; 200 unsigned long cmd_addr;
@@ -279,6 +279,8 @@ struct ata_queued_cmd {
279 /* DO NOT iterate over __sg manually, use ata_for_each_sg() */ 279 /* DO NOT iterate over __sg manually, use ata_for_each_sg() */
280 struct scatterlist *__sg; 280 struct scatterlist *__sg;
281 281
282 unsigned int err_mask;
283
282 ata_qc_cb_t complete_fn; 284 ata_qc_cb_t complete_fn;
283 285
284 struct completion *waiting; 286 struct completion *waiting;
@@ -475,7 +477,7 @@ extern void ata_bmdma_start (struct ata_queued_cmd *qc);
475extern void ata_bmdma_stop(struct ata_queued_cmd *qc); 477extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
476extern u8 ata_bmdma_status(struct ata_port *ap); 478extern u8 ata_bmdma_status(struct ata_port *ap);
477extern void ata_bmdma_irq_clear(struct ata_port *ap); 479extern void ata_bmdma_irq_clear(struct ata_port *ap);
478extern void ata_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask); 480extern void ata_qc_complete(struct ata_queued_cmd *qc);
479extern void ata_eng_timeout(struct ata_port *ap); 481extern void ata_eng_timeout(struct ata_port *ap);
480extern void ata_scsi_simulate(u16 *id, struct scsi_cmnd *cmd, 482extern void ata_scsi_simulate(u16 *id, struct scsi_cmnd *cmd,
481 void (*done)(struct scsi_cmnd *)); 483 void (*done)(struct scsi_cmnd *));
@@ -667,6 +669,7 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
667 qc->cursect = qc->cursg = qc->cursg_ofs = 0; 669 qc->cursect = qc->cursg = qc->cursg_ofs = 0;
668 qc->nsect = 0; 670 qc->nsect = 0;
669 qc->nbytes = qc->curbytes = 0; 671 qc->nbytes = qc->curbytes = 0;
672 qc->err_mask = 0;
670 673
671 ata_tf_init(qc->ap, &qc->tf, qc->dev->devno); 674 ata_tf_init(qc->ap, &qc->tf, qc->dev->devno);
672} 675}