Commit b73fc89f authored by Alan Cox's avatar Alan Cox Committed by Jeff Garzik

[PATCH] libata: regularize dma_start/stop arguments

Needed for a few PATA drivers.

Also fix up a wrong comment.
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 31433ea3
...@@ -3017,7 +3017,7 @@ static void ata_qc_timeout(struct ata_queued_cmd *qc) ...@@ -3017,7 +3017,7 @@ static void ata_qc_timeout(struct ata_queued_cmd *qc)
host_stat = ap->ops->bmdma_status(ap); host_stat = ap->ops->bmdma_status(ap);
/* before we do anything else, clear DMA-Start bit */ /* before we do anything else, clear DMA-Start bit */
ap->ops->bmdma_stop(ap); ap->ops->bmdma_stop(qc);
/* fall through */ /* fall through */
...@@ -3399,7 +3399,7 @@ static void ata_bmdma_setup_mmio (struct ata_queued_cmd *qc) ...@@ -3399,7 +3399,7 @@ static void ata_bmdma_setup_mmio (struct ata_queued_cmd *qc)
} }
/** /**
* ata_bmdma_start - Start a PCI IDE BMDMA transaction * ata_bmdma_start_mmio - Start a PCI IDE BMDMA transaction
* @qc: Info associated with this ATA transaction. * @qc: Info associated with this ATA transaction.
* *
* LOCKING: * LOCKING:
...@@ -3570,7 +3570,7 @@ u8 ata_bmdma_status(struct ata_port *ap) ...@@ -3570,7 +3570,7 @@ u8 ata_bmdma_status(struct ata_port *ap)
/** /**
* ata_bmdma_stop - Stop PCI IDE BMDMA transfer * ata_bmdma_stop - Stop PCI IDE BMDMA transfer
* @ap: Port associated with this ATA transaction. * @qc: Command we are ending DMA for
* *
* Clears the ATA_DMA_START flag in the dma control register * Clears the ATA_DMA_START flag in the dma control register
* *
...@@ -3580,8 +3580,9 @@ u8 ata_bmdma_status(struct ata_port *ap) ...@@ -3580,8 +3580,9 @@ u8 ata_bmdma_status(struct ata_port *ap)
* spin_lock_irqsave(host_set lock) * spin_lock_irqsave(host_set lock)
*/ */
void ata_bmdma_stop(struct ata_port *ap) void ata_bmdma_stop(struct ata_queued_cmd *qc)
{ {
struct ata_port *ap = qc->ap;
if (ap->flags & ATA_FLAG_MMIO) { if (ap->flags & ATA_FLAG_MMIO) {
void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr; void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr;
...@@ -3633,7 +3634,7 @@ inline unsigned int ata_host_intr (struct ata_port *ap, ...@@ -3633,7 +3634,7 @@ inline unsigned int ata_host_intr (struct ata_port *ap,
goto idle_irq; goto idle_irq;
/* before we do anything else, clear DMA-Start bit */ /* before we do anything else, clear DMA-Start bit */
ap->ops->bmdma_stop(ap); ap->ops->bmdma_stop(qc);
/* fall through */ /* fall through */
......
...@@ -117,7 +117,7 @@ static void qs_phy_reset(struct ata_port *ap); ...@@ -117,7 +117,7 @@ static void qs_phy_reset(struct ata_port *ap);
static void qs_qc_prep(struct ata_queued_cmd *qc); static void qs_qc_prep(struct ata_queued_cmd *qc);
static int qs_qc_issue(struct ata_queued_cmd *qc); static int qs_qc_issue(struct ata_queued_cmd *qc);
static int qs_check_atapi_dma(struct ata_queued_cmd *qc); static int qs_check_atapi_dma(struct ata_queued_cmd *qc);
static void qs_bmdma_stop(struct ata_port *ap); static void qs_bmdma_stop(struct ata_queued_cmd *qc);
static u8 qs_bmdma_status(struct ata_port *ap); static u8 qs_bmdma_status(struct ata_port *ap);
static void qs_irq_clear(struct ata_port *ap); static void qs_irq_clear(struct ata_port *ap);
static void qs_eng_timeout(struct ata_port *ap); 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,7 +198,7 @@ static int qs_check_atapi_dma(struct ata_queued_cmd *qc)
return 1; /* ATAPI DMA not supported */ return 1; /* ATAPI DMA not supported */
} }
static void qs_bmdma_stop(struct ata_port *ap) static void qs_bmdma_stop(struct ata_queud_cmd *qc)
{ {
/* nothing */ /* nothing */
} }
......
...@@ -365,7 +365,7 @@ struct ata_port_operations { ...@@ -365,7 +365,7 @@ struct ata_port_operations {
void (*host_stop) (struct ata_host_set *host_set); void (*host_stop) (struct ata_host_set *host_set);
void (*bmdma_stop) (struct ata_port *ap); void (*bmdma_stop) (struct ata_queued_cmd *qc);
u8 (*bmdma_status) (struct ata_port *ap); u8 (*bmdma_status) (struct ata_port *ap);
}; };
...@@ -424,9 +424,10 @@ extern unsigned int ata_dev_classify(struct ata_taskfile *tf); ...@@ -424,9 +424,10 @@ extern unsigned int ata_dev_classify(struct ata_taskfile *tf);
extern void ata_dev_id_string(u16 *id, unsigned char *s, extern void ata_dev_id_string(u16 *id, unsigned char *s,
unsigned int ofs, unsigned int len); unsigned int ofs, unsigned int len);
extern void ata_dev_config(struct ata_port *ap, unsigned int i); extern void ata_dev_config(struct ata_port *ap, unsigned int i);
extern void ata_dev_set_protocol(struct ata_device *dev);
extern void ata_bmdma_setup (struct ata_queued_cmd *qc); extern void ata_bmdma_setup (struct ata_queued_cmd *qc);
extern void ata_bmdma_start (struct ata_queued_cmd *qc); extern void ata_bmdma_start (struct ata_queued_cmd *qc);
extern void ata_bmdma_stop(struct ata_port *ap); extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
extern u8 ata_bmdma_status(struct ata_port *ap); extern u8 ata_bmdma_status(struct ata_port *ap);
extern void ata_bmdma_irq_clear(struct ata_port *ap); extern void ata_bmdma_irq_clear(struct ata_port *ap);
extern void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat); extern void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment