diff options
author | Albert Lee <albertcc@tw.ibm.com> | 2005-12-05 02:38:02 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-06 04:49:22 -0500 |
commit | a22e2eb0710798009b8e696ae911aef745089dd6 (patch) | |
tree | 93421443499249db0301868e07f24156c456cf7a /include | |
parent | c14b8331ec4843e4f2b67a4d847a0d812a50e43c (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')
-rw-r--r-- | include/linux/libata.h | 7 |
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; | |||
194 | struct ata_queued_cmd; | 194 | struct ata_queued_cmd; |
195 | 195 | ||
196 | /* typedefs */ | 196 | /* typedefs */ |
197 | typedef int (*ata_qc_cb_t) (struct ata_queued_cmd *qc, unsigned int err_mask); | 197 | typedef int (*ata_qc_cb_t) (struct ata_queued_cmd *qc); |
198 | 198 | ||
199 | struct ata_ioports { | 199 | struct 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); | |||
475 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 477 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |
476 | extern u8 ata_bmdma_status(struct ata_port *ap); | 478 | extern u8 ata_bmdma_status(struct ata_port *ap); |
477 | extern void ata_bmdma_irq_clear(struct ata_port *ap); | 479 | extern void ata_bmdma_irq_clear(struct ata_port *ap); |
478 | extern void ata_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask); | 480 | extern void ata_qc_complete(struct ata_queued_cmd *qc); |
479 | extern void ata_eng_timeout(struct ata_port *ap); | 481 | extern void ata_eng_timeout(struct ata_port *ap); |
480 | extern void ata_scsi_simulate(u16 *id, struct scsi_cmnd *cmd, | 482 | extern 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 | } |