diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2005-08-26 11:03:19 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-26 17:36:26 -0400 |
commit | b73fc89f6d1f84326e5e897ad249d00a9f218fd7 (patch) | |
tree | 557d5ba51a4f6c58be0717c0da13c2e409fd6008 | |
parent | 31433ea369d250ad011577eee6110d3efcb9d861 (diff) |
[PATCH] libata: regularize dma_start/stop arguments
Needed for a few PATA drivers.
Also fix up a wrong comment.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
-rw-r--r-- | drivers/scsi/libata-core.c | 11 | ||||
-rw-r--r-- | drivers/scsi/sata_qstor.c | 4 | ||||
-rw-r--r-- | include/linux/libata.h | 5 |
3 files changed, 11 insertions, 9 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 19b45c2bfa26..f15a07f9f471 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -3017,7 +3017,7 @@ static void ata_qc_timeout(struct ata_queued_cmd *qc) | |||
3017 | host_stat = ap->ops->bmdma_status(ap); | 3017 | host_stat = ap->ops->bmdma_status(ap); |
3018 | 3018 | ||
3019 | /* before we do anything else, clear DMA-Start bit */ | 3019 | /* before we do anything else, clear DMA-Start bit */ |
3020 | ap->ops->bmdma_stop(ap); | 3020 | ap->ops->bmdma_stop(qc); |
3021 | 3021 | ||
3022 | /* fall through */ | 3022 | /* fall through */ |
3023 | 3023 | ||
@@ -3399,7 +3399,7 @@ static void ata_bmdma_setup_mmio (struct ata_queued_cmd *qc) | |||
3399 | } | 3399 | } |
3400 | 3400 | ||
3401 | /** | 3401 | /** |
3402 | * ata_bmdma_start - Start a PCI IDE BMDMA transaction | 3402 | * ata_bmdma_start_mmio - Start a PCI IDE BMDMA transaction |
3403 | * @qc: Info associated with this ATA transaction. | 3403 | * @qc: Info associated with this ATA transaction. |
3404 | * | 3404 | * |
3405 | * LOCKING: | 3405 | * LOCKING: |
@@ -3570,7 +3570,7 @@ u8 ata_bmdma_status(struct ata_port *ap) | |||
3570 | 3570 | ||
3571 | /** | 3571 | /** |
3572 | * ata_bmdma_stop - Stop PCI IDE BMDMA transfer | 3572 | * ata_bmdma_stop - Stop PCI IDE BMDMA transfer |
3573 | * @ap: Port associated with this ATA transaction. | 3573 | * @qc: Command we are ending DMA for |
3574 | * | 3574 | * |
3575 | * Clears the ATA_DMA_START flag in the dma control register | 3575 | * Clears the ATA_DMA_START flag in the dma control register |
3576 | * | 3576 | * |
@@ -3580,8 +3580,9 @@ u8 ata_bmdma_status(struct ata_port *ap) | |||
3580 | * spin_lock_irqsave(host_set lock) | 3580 | * spin_lock_irqsave(host_set lock) |
3581 | */ | 3581 | */ |
3582 | 3582 | ||
3583 | void ata_bmdma_stop(struct ata_port *ap) | 3583 | void ata_bmdma_stop(struct ata_queued_cmd *qc) |
3584 | { | 3584 | { |
3585 | struct ata_port *ap = qc->ap; | ||
3585 | if (ap->flags & ATA_FLAG_MMIO) { | 3586 | if (ap->flags & ATA_FLAG_MMIO) { |
3586 | void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr; | 3587 | void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr; |
3587 | 3588 | ||
@@ -3633,7 +3634,7 @@ inline unsigned int ata_host_intr (struct ata_port *ap, | |||
3633 | goto idle_irq; | 3634 | goto idle_irq; |
3634 | 3635 | ||
3635 | /* before we do anything else, clear DMA-Start bit */ | 3636 | /* before we do anything else, clear DMA-Start bit */ |
3636 | ap->ops->bmdma_stop(ap); | 3637 | ap->ops->bmdma_stop(qc); |
3637 | 3638 | ||
3638 | /* fall through */ | 3639 | /* fall through */ |
3639 | 3640 | ||
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index 08a84042ce09..2926846cdd6a 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c | |||
@@ -117,7 +117,7 @@ static void qs_phy_reset(struct ata_port *ap); | |||
117 | static void qs_qc_prep(struct ata_queued_cmd *qc); | 117 | static void qs_qc_prep(struct ata_queued_cmd *qc); |
118 | static int qs_qc_issue(struct ata_queued_cmd *qc); | 118 | static int qs_qc_issue(struct ata_queued_cmd *qc); |
119 | static int qs_check_atapi_dma(struct ata_queued_cmd *qc); | 119 | static int qs_check_atapi_dma(struct ata_queued_cmd *qc); |
120 | static void qs_bmdma_stop(struct ata_port *ap); | 120 | static void qs_bmdma_stop(struct ata_queued_cmd *qc); |
121 | static u8 qs_bmdma_status(struct ata_port *ap); | 121 | static u8 qs_bmdma_status(struct ata_port *ap); |
122 | static void qs_irq_clear(struct ata_port *ap); | 122 | static void qs_irq_clear(struct ata_port *ap); |
123 | static void qs_eng_timeout(struct ata_port *ap); | 123 | static void qs_eng_timeout(struct ata_port *ap); |
@@ -198,7 +198,7 @@ static int qs_check_atapi_dma(struct ata_queued_cmd *qc) | |||
198 | return 1; /* ATAPI DMA not supported */ | 198 | return 1; /* ATAPI DMA not supported */ |
199 | } | 199 | } |
200 | 200 | ||
201 | static void qs_bmdma_stop(struct ata_port *ap) | 201 | static void qs_bmdma_stop(struct ata_queud_cmd *qc) |
202 | { | 202 | { |
203 | /* nothing */ | 203 | /* nothing */ |
204 | } | 204 | } |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 724b7d1c18ea..33f3ab4eb827 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -365,7 +365,7 @@ struct ata_port_operations { | |||
365 | 365 | ||
366 | void (*host_stop) (struct ata_host_set *host_set); | 366 | void (*host_stop) (struct ata_host_set *host_set); |
367 | 367 | ||
368 | void (*bmdma_stop) (struct ata_port *ap); | 368 | void (*bmdma_stop) (struct ata_queued_cmd *qc); |
369 | u8 (*bmdma_status) (struct ata_port *ap); | 369 | u8 (*bmdma_status) (struct ata_port *ap); |
370 | }; | 370 | }; |
371 | 371 | ||
@@ -424,9 +424,10 @@ extern unsigned int ata_dev_classify(struct ata_taskfile *tf); | |||
424 | extern void ata_dev_id_string(u16 *id, unsigned char *s, | 424 | extern void ata_dev_id_string(u16 *id, unsigned char *s, |
425 | unsigned int ofs, unsigned int len); | 425 | unsigned int ofs, unsigned int len); |
426 | extern void ata_dev_config(struct ata_port *ap, unsigned int i); | 426 | extern void ata_dev_config(struct ata_port *ap, unsigned int i); |
427 | extern void ata_dev_set_protocol(struct ata_device *dev); | ||
427 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); | 428 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); |
428 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); | 429 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); |
429 | extern void ata_bmdma_stop(struct ata_port *ap); | 430 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |
430 | extern u8 ata_bmdma_status(struct ata_port *ap); | 431 | extern u8 ata_bmdma_status(struct ata_port *ap); |
431 | extern void ata_bmdma_irq_clear(struct ata_port *ap); | 432 | extern void ata_bmdma_irq_clear(struct ata_port *ap); |
432 | extern void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat); | 433 | extern void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat); |