@@ -1219,6 +1219,7 @@ static void sata_fsl_host_intr(struct ata_port *ap)
u32 SError;
u32 tag;
u32 status_mask = INT_ON_ERROR;
+ unsigned int max_queue = ap->host->queue_depth;
hstatus = ioread32(hcr_base + HSTATUS);
@@ -1229,7 +1230,7 @@ static void sata_fsl_host_intr(struct ata_port *ap)
/* Workaround for data length mismatch errata */
if (unlikely(hstatus & INT_ON_DATA_LENGTH_MISMATCH)) {
- for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
+ for (tag = 0; tag < max_queue; tag++) {
qc = ata_qc_from_tag(ap, tag);
if (qc && ata_is_atapi(qc->tf.protocol)) {
u32 hcontrol;
@@ -1509,6 +1510,8 @@ static int sata_fsl_probe(struct platform_device *ofdev)
goto error_exit_with_cleanup;
}
+ ata_host_set_queue_depth(host, SATA_FSL_QUEUE_DEPTH);
+
/* host->iomap is not used currently */
host->private_data = host_priv;
The fsl sata controller only implement a queue depth of 16. So use the ata_host_set_queue_depth() to set the correct queue depth for host controller. Signed-off-by: Kevin Hao <haokexin@gmail.com> --- drivers/ata/sata_fsl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)