aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_pxa.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-10-31 10:59:45 +0100
committerJens Axboe <axboe@kernel.dk>2019-11-01 08:50:51 -0600
commit95364f36701e62dd50eee91e1303187fd1a9f567 (patch)
tree3ba901b8f53c7c667cc1210ee727e5b63d62382b /drivers/ata/pata_pxa.c
parentata: define AC_ERR_OK (diff)
downloadlinux-dev-95364f36701e62dd50eee91e1303187fd1a9f567.tar.xz
linux-dev-95364f36701e62dd50eee91e1303187fd1a9f567.zip
ata: make qc_prep return ata_completion_errors
In case a driver wants to return an error from qc_prep, return enum ata_completion_errors. sata_mv is one of those drivers -- see the next patch. Other drivers return the newly defined AC_ERR_OK. [v2] use enum ata_completion_errors and AC_ERR_OK. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Jens Axboe <axboe@kernel.dk> Cc: linux-ide@vger.kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/ata/pata_pxa.c')
-rw-r--r--drivers/ata/pata_pxa.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c
index 4afcb8e63e21..41430f79663c 100644
--- a/drivers/ata/pata_pxa.c
+++ b/drivers/ata/pata_pxa.c
@@ -44,25 +44,27 @@ static void pxa_ata_dma_irq(void *d)
/*
* Prepare taskfile for submission.
*/
-static void pxa_qc_prep(struct ata_queued_cmd *qc)
+static enum ata_completion_errors pxa_qc_prep(struct ata_queued_cmd *qc)
{
struct pata_pxa_data *pd = qc->ap->private_data;
struct dma_async_tx_descriptor *tx;
enum dma_transfer_direction dir;
if (!(qc->flags & ATA_QCFLAG_DMAMAP))
- return;
+ return AC_ERR_OK;
dir = (qc->dma_dir == DMA_TO_DEVICE ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM);
tx = dmaengine_prep_slave_sg(pd->dma_chan, qc->sg, qc->n_elem, dir,
DMA_PREP_INTERRUPT);
if (!tx) {
ata_dev_err(qc->dev, "prep_slave_sg() failed\n");
- return;
+ return AC_ERR_OK;
}
tx->callback = pxa_ata_dma_irq;
tx->callback_param = pd;
pd->dma_cookie = dmaengine_submit(tx);
+
+ return AC_ERR_OK;
}
/*