Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752116AbbKIF2v (ORCPT ); Mon, 9 Nov 2015 00:28:51 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:55096 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751419AbbKIF2s (ORCPT ); Mon, 9 Nov 2015 00:28:48 -0500 X-AuditID: cbfee68f-f796f6d0000014a4-1e-56402f0e7c77 From: Alim Akhtar To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: JBottomley@odin.com, vinholikatti@gmail.com, gautam.vivek@samsung.com, essuuj@gmail.com, devicetree@vger.kernel.org, kishon@ti.com Subject: [PATCH v5 05/11] scsi: ufs: add quirk not to allow reset of interrupt aggregation Date: Mon, 09 Nov 2015 10:56:21 +0530 Message-id: <1447046787-480-6-git-send-email-alim.akhtar@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1447046787-480-1-git-send-email-alim.akhtar@samsung.com> References: <1447046787-480-1-git-send-email-alim.akhtar@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsWyRsSkRpdP3yHM4MwndYv5R86xWiy/sITJ ou3KQXaL/+tvs1hceNrDZnF51xw2i+7rO9gsdiyscuDw2DnrLrvH4R8/mD36tqxi9Dh+YzuT x+dNcgGsUVw2Kak5mWWpRfp2CVwZm7bfZy54zFPxsm0pSwPjDa4uRk4OCQETie7bM1ghbDGJ C/fWs3UxcnEICaxglLj3djI7TNGGte/YIRJLGSV+nX3OCuH8ZJSY/+YRG0gVm4C2xN3pW5hA bBEBG4nzNx8wgRQxC3QwSnSe2wJWJCwQI3H1ZRcLiM0ioCrxbN9lZhCbV8BVYufmq4wQ6xQl up9NAKvnFHCTODezAaxGCKim6/VJFoiaZewSB49EQ8wRkPg2+RBQnAMoLiux6QAzRImkxMEV N1gmMAovYGRYxSiaWpBcUJyUXmSsV5yYW1yal66XnJ+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2+i/mxal KFUfffAhw8edZ0t585oHU3/otote/yH/9d761IhuZa7A1xHtv3Kin/luXnFRdeOTNKH2oPtM Vfr1cROWLXy3YvK8pRIMbwMXdMzUZJj4689k7yw1qRMFAtNOfV0qe6V/kxJLcUaioRZzUXEi AGvo4cvBAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1834 Lines: 51 From: Seungwon Jeon Some host controller supports interrupt aggregation, but doesn't allow to reset counter and timer by s/w. Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar --- drivers/scsi/ufs/ufshcd.c | 3 ++- drivers/scsi/ufs/ufshcd.h | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 2b16eb363203..ca7483cd899e 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -3199,7 +3199,8 @@ static void ufshcd_transfer_req_compl(struct ufs_hba *hba) * false interrupt if device completes another request after resetting * aggregation and before reading the DB. */ - if (ufshcd_is_intr_aggr_allowed(hba)) + if (ufshcd_is_intr_aggr_allowed(hba) && + !(hba->quirks & UFSHCI_QUIRK_SKIP_RESET_INTR_AGGR)) ufshcd_reset_intr_aggr(hba); tr_doorbell = ufshcd_readl(hba, REG_UTP_TRANSFER_REQ_DOOR_BELL); diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index d625d01110b0..4ae32e9316de 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -479,6 +479,12 @@ struct ufs_hba { */ #define UFSHCI_QUIRK_BROKEN_REQ_LIST_CLR UFS_BIT(7) + /* + * This quirk needs to be enabled if host controller doesn't allow + * that the interrupt aggregation timer and counter are reset by s/w. + */ + #define UFSHCI_QUIRK_SKIP_RESET_INTR_AGGR UFS_BIT(8) + unsigned int quirks; /* Deviations from standard UFSHCI spec. */ wait_queue_head_t tm_wq; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/