ata: make qc_prep return ata_completion_errors
commit 95364f36701e62dd50eee91e1303187fd1a9f567 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a34e3ce81d
commit
c9a512f8fa
@@ -4996,7 +4996,10 @@ int ata_std_qc_defer(struct ata_queued_cmd *qc)
|
||||
return ATA_DEFER_LINK;
|
||||
}
|
||||
|
||||
void ata_noop_qc_prep(struct ata_queued_cmd *qc) { }
|
||||
enum ata_completion_errors ata_noop_qc_prep(struct ata_queued_cmd *qc)
|
||||
{
|
||||
return AC_ERR_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* ata_sg_init - Associate command with scatter-gather table.
|
||||
@@ -5483,7 +5486,9 @@ void ata_qc_issue(struct ata_queued_cmd *qc)
|
||||
return;
|
||||
}
|
||||
|
||||
ap->ops->qc_prep(qc);
|
||||
qc->err_mask |= ap->ops->qc_prep(qc);
|
||||
if (unlikely(qc->err_mask))
|
||||
goto err;
|
||||
trace_ata_qc_issue(qc);
|
||||
qc->err_mask |= ap->ops->qc_issue(qc);
|
||||
if (unlikely(qc->err_mask))
|
||||
|
||||
Reference in New Issue
Block a user