From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kiwoong Kim Subject: RE: [PATCH v1] ufs: introduce UFSHCI_QUIRK_SKIP_INTR_AGGR quirk Date: Thu, 10 Nov 2016 10:28:08 +0900 Message-ID: <000001d23af1$b18b6e40$14a24ac0$@samsung.com> References: <002401d23996$1986d4b0$4c947e10$@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: 7bit Return-path: Received: from mailout3.samsung.com ([203.254.224.33]:47955 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754429AbcKJB2L (ORCPT ); Wed, 9 Nov 2016 20:28:11 -0500 In-reply-to: Content-language: ko Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: 'Subhash Jadavani' Cc: "'James E.J. Bottomley'" , linux-scsi@vger.kernel.org, "'Martin K. Petersen'" , vinholikatti@gmail.com, '???' , linux-scsi-owner@vger.kernel.org, cpgs@samsung.com Hi, Subhash I'll update this patch referring what you said (including adding comments of other quirks) > > If UFS driver resets interrupt aggregation timer and counter when > > there is a pending doorbell, an interrupt of IO completion of a > > corresponding task may be missed. > > That would cause a command timeout. > > > > If UFS driver resets interrupt aggregation timer and counter when > > there is a pending doorbell, a competion interrupt of a corresponing > > task may be issued. > > That would casue a command timeout. > > > > Signed-off-by: Kiwoong Kim > > --- > > drivers/scsi/ufs/ufshcd.c | 4 +++- > > drivers/scsi/ufs/ufshcd.h | 1 + > > 2 files changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > > index c904854..65bbf59 100644 > > --- a/drivers/scsi/ufs/ufshcd.c > > +++ b/drivers/scsi/ufs/ufshcd.c > > @@ -3730,7 +3730,9 @@ 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_INTR_AGGR)) > > Why do we need this new quirk? If controller has the issue with interrupt > aggregation, you can remove this UFSHCD_CAP_INTR_AGGR to disable the > aggregation altogether. > > > + ufshcd_reset_intr_aggr(hba); > > 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 6a96f24..6a9c6e9 100644 > > --- a/drivers/scsi/ufs/ufshcd.h > > +++ b/drivers/scsi/ufs/ufshcd.h > > @@ -497,6 +497,7 @@ struct ufs_hba { > > #define UFSHCD_QUIRK_BROKEN_DWORD_UTRD UFS_BIT(7) > > #define UFSHCD_QUIRK_BROKEN_REQ_LIST_CLR UFS_BIT(8) > > #define UFSHCD_QUIRK_USE_OF_HCE UFS_BIT(9) > > + #define UFSHCI_QUIRK_SKIP_INTR_AGGR UFS_BIT(10) > > > > > > unsigned int quirks; /* Deviations from standard UFSHCI spec. > */ > > -- > The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a > Linux Foundation Collaborative Project > -- > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majordomo@vger.kernel.org More majordomo info at > http://vger.kernel.org/majordomo-info.html