From patchwork Thu Jul 3 12:09:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 366851 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A36C914012F for ; Thu, 3 Jul 2014 22:10:49 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751689AbaGCMKt (ORCPT ); Thu, 3 Jul 2014 08:10:49 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:46637 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751817AbaGCMKs (ORCPT ); Thu, 3 Jul 2014 08:10:48 -0400 Received: by mail-pd0-f179.google.com with SMTP id w10so120397pde.38 for ; Thu, 03 Jul 2014 05:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ca+UYPJOYgzLBnIB3fBeG5pKWS38RNoJ57w81unRaZY=; b=xQERdw+ZguBS+fbR1IayTyZ6035zdv90xH9ZH/mfHp8P9JjmPyCp3P+RC+sVMPmPO+ U5e9G14NhjdEoqetKcU1aHA6Rx0UMCB50anDdkzXiGhMoca7zzLfpO+3wuxKWfFWc6qM tXssiVSm6fGBxh1GlKVE4q+1T3OzJJm2dCTA8tpvD5EzBfBu1zxnzxeqRQGy7sEjRNbr aQmALFbX1Y3mQYcFrqprWiQg7aR90+qVAU7g7gnv6XFahx2PNIoiPHy+Vs1wTXUNYjjW cbns13Nh/bP1rpWsmhZ7EBwvnzX1BxPzaNfzAEWJ289+bc0Vm/BX+oePpNs4Z/JsI1oY ytoA== X-Received: by 10.66.231.139 with SMTP id tg11mr4174217pac.87.1404389448155; Thu, 03 Jul 2014 05:10:48 -0700 (PDT) Received: from pek-khao-d1.corp.ad.wrs.com ([1.202.252.122]) by mx.google.com with ESMTPSA id wg4sm142212848pab.47.2014.07.03.05.10.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Jul 2014 05:10:47 -0700 (PDT) From: Kevin Hao To: linux-ide@vger.kernel.org Cc: Tejun Heo , Dan Williams Subject: [PATCH 5/5] sata_fsl: set the correct queue depth for the host controller Date: Thu, 3 Jul 2014 20:09:42 +0800 Message-Id: <1404389382-27298-6-git-send-email-haokexin@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1404389382-27298-1-git-send-email-haokexin@gmail.com> References: <1404389382-27298-1-git-send-email-haokexin@gmail.com> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org 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 --- drivers/ata/sata_fsl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index bffdd96538ff..7174998cf1bc 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c @@ -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;