diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-15 08:03:43 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-15 08:03:43 -0400 |
commit | dedaf2b0365ccec50714fbde0b3215e7e94fa47c (patch) | |
tree | d98e2a928793e6072d4ff65b0e2ceedaa600e25d /include/linux | |
parent | 6cec4a3943bdfe46e2952bc246f17670f747be8d (diff) |
[PATCH] libata-ncq: implement ap->qc_active, ap->sactive and complete helper
Add ap->qc_active and ap->sactive, mask of all active qcs and libata's
view of the SActive register, respectively. Also, implement
ata_qc_complete_multiple() which takes new qc_active mask and complete
multiple qcs according to the mask.
These will be used to track NCQ commands and complete them. The
distinction between ap->qc_active and ap->sactive is also useful for
later PM implementation.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/libata.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index b3a4f8bea828..dd0db2d21bc5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -475,7 +475,10 @@ struct ata_port { | |||
475 | 475 | ||
476 | struct ata_queued_cmd qcmd[ATA_MAX_QUEUE]; | 476 | struct ata_queued_cmd qcmd[ATA_MAX_QUEUE]; |
477 | unsigned long qc_allocated; | 477 | unsigned long qc_allocated; |
478 | unsigned int qc_active; | ||
479 | |||
478 | unsigned int active_tag; | 480 | unsigned int active_tag; |
481 | u32 sactive; | ||
479 | 482 | ||
480 | struct ata_host_stats stats; | 483 | struct ata_host_stats stats; |
481 | struct ata_host_set *host_set; | 484 | struct ata_host_set *host_set; |
@@ -668,6 +671,8 @@ extern void ata_bmdma_drive_eh(struct ata_port *ap, | |||
668 | extern void ata_bmdma_error_handler(struct ata_port *ap); | 671 | extern void ata_bmdma_error_handler(struct ata_port *ap); |
669 | extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc); | 672 | extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc); |
670 | extern void ata_qc_complete(struct ata_queued_cmd *qc); | 673 | extern void ata_qc_complete(struct ata_queued_cmd *qc); |
674 | extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active, | ||
675 | void (*finish_qc)(struct ata_queued_cmd *)); | ||
671 | extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, | 676 | extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, |
672 | void (*done)(struct scsi_cmnd *)); | 677 | void (*done)(struct scsi_cmnd *)); |
673 | extern int ata_std_bios_param(struct scsi_device *sdev, | 678 | extern int ata_std_bios_param(struct scsi_device *sdev, |